Enable native process manager for flake integration users#2610
Open
mpscholten wants to merge 2 commits into
Open
Enable native process manager for flake integration users#2610mpscholten wants to merge 2 commits into
mpscholten wants to merge 2 commits into
Conversation
The native Rust process manager didn't work when devenv was integrated via Nix flakes because: 1. cli.version is null in flake mode, so the process manager default fell through to "process-compose" 2. native.nix had an error stub instead of a real command Fix by: - Adding flakesIntegration check to the process manager default in processes.nix, so native is selected for both CLI 2.0+ and flake mode - Replacing the error stub in native.nix with a proper devenv-tasks run invocation that manages all enabled processes This works because TasksUi::run() already calls process_manager.run_foreground() when processes are still running after task completion, so devenv-tasks run naturally stays alive supervising processes. cli.version is intentionally left as null to preserve the enterShell bash hook behavior (which depends on cli.version == null to run tasks via the devenv-tasks binary rather than the Rust CLI). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For ihp it would be nice to use the native process manager to stay close to the standard devenv experience. This patch makes it work.
What was the motivation on not supporting the native pm for flakes users?
Summary
devenv-tasks) when devenv is used via Nix flakes integration, not just via the devenv CLI 2.0+native.nixwith a properdevenv-tasks runinvocationflakesIntegrationcheck to the process manager default inprocesses.nixDepends on #2609
Problem
The native process manager doesn't work when devenv is integrated via Nix flakes because:
cli.versionisnullin flake mode, so the process manager default falls through to"process-compose"native.nixhad an error stub instead of a real command — it assumed the Rust CLI would invoke the process manager directlyThis forces flake users to depend on
process-composeeven though the native manager is available and preferred.Fix
processes.nix: Select"native"whenconfig.devenv.flakesIntegrationis true (in addition to the existing CLI 2.0+ check).native.nix: Replace the error stub with adevenv-tasks runinvocation that:--task-file,--mode all,--cache-dir,--runtime-dirprocfileScriptcan manage itThis works because
TasksUi::run()already callsprocess_manager.run_foreground()when processes are still running after task completion — sodevenv-tasks runnaturally stays alive supervising processes.cli.versionis intentionally left asnullto preserve theenterShellbash hook behavior (which depends oncli.version == nullto run tasks via thedevenv-tasksbinary rather than the Rust CLI).Test plan
devenv upin a flake-based project starts postgres and app processes via native managerdevenv uprestarts cleanly without stale PID files🤖 Generated with Claude Code