cargo pueue 4.0.0-rc.1

17 days ago

[4.0.0] - unreleased

This release aims to further improve Pueue and to rectify some old design decisions.

This is a release candidate for v4.0.0
There're some quite big changes, please test and provide feedback.

Removing internal channel communication

Until recently, Pueue managed subprocess (task) states in a dedicated thread.
Client commands affecting subprocesses, such as pueue start --immediate, were relayed to this special thread via an mpsc channel for processing.

This setup caused short delays before the instructions were executed.
For instance, tasks would begin a few hundred milliseconds after the client received an Ok from the daemon, despite using the --immediate flag.
This behavior was unintuitive and often led to commands like pueue add --immediate install_something && pueue send 0 'y\n' failing, as the task had not started by the time pueue send was called.

The new state design resolves this issue by allowing Pueue to manipulate subprocess states directly within the client message handlers, eliminating any delays.

TLDR: Commands that start/stop/kill/pause tasks now only return when the task is actually started/stopped/killed/paused.

New editing

Task editing was a bit tedious until recently.
One could only edit a single task at a time and you had to specify which properties you wanted to add.
Each property was then opened in a new $EDITOR session, which meant that users had to open and close editors up to four times to edit a single task.

After a lot of consideration, a new way of editing tasks has been designed that allows simple and convenient editing of multiple tasks at once.
For this, a temporary directory is created for every task to edit and a new file for every property, resulting in the following structure:

   📁 0/
   │ * command
   │ * label
   │ * path
   └ * priority

You can then just navigate the resulting file structure and edit the properties you want in the editor of your choice.

I'm aware that this might not be for everyone, so feedback is very much encouraged over here.

Change

  • Breaking: Refactor internal task state. Some task variables have been moved into the TaskStatus enum, which now enforces various invariants during compile time via the type system.
    Due to this, several subtle time related inconsistencies (task start/stop/enqueue times) have been fixed. #556
    Important: This completely breaks backwards compatibility, including previous state.
    Important: The Pueue daemon needs to be restarted and the state will be wiped clean.
  • Breaking: Streamlined pueue log parameters to behave the same way as start, pause or kill. #509
  • Breaking: Remove the --children commandline flags, that have been deprecated and no longer serve any function since v3.0.0.
  • Send log output to stderr instead of stdout #562.
  • Change default log level from error to warning #562.
  • Bumped MSRV to 1.70.
  • Breaking: Redesigned task editing process #553.

Add

  • Add support for NetBSD.
  • Add --all and --group to pueue log. #509
  • Add --all and --group to pueue enqueue. #558
  • Add --all and --group to pueue stash. #558
  • Add pueue reset --groups [group_names] to allow resetting individual groups. #482
    This also refactors the way resets are done internally, resulting in a cleaner code architecture.
  • Ability to set the Unix socket permissions through the new unix_socket_permissions configuration option. #544
  • Add command filter to pueue status. #524 #560
  • Allow pueue status to order tasks by enqueue_at. #554
  • Added Windows service on Windows to allow a true daemon experience. #344 #567
  • Add queued_count and stashed_count to callback template variables. This allows users to fire callbacks when whole groups are finished. #578
  • Add new subcommand to set or unset environment variables for tasks. #503

Fixed

  • Fixed delay after sending process related commands from client. #548
  • Callback templating arguments were html escaped by accident. #564
  • Print incompatible version warning info as a log message instead of plain stdout input, which broke json outputs #562.
  • Fixed -d daemon mode on Windows. #344

Don't miss a new pueue release

NewReleases is sending notifications on new releases.