Skip to content

Conversation

@Premkumar-2004
Copy link

@Premkumar-2004 Premkumar-2004 commented Feb 7, 2026

Description

Adds reactivate option to tasks. When set to true, it forces re-running activation scripts before the task executes.
activation:
scripts = ["ros2_ws/install/setup.sh"]

tasks:
build-ros2 = { cwd = "ros2_ws", cmd = "colcon build" }
pyright-ros2 = { cmd = "basedpyright", depends-on = ["build-ros2"], reactivate = true }

Fixes #5433

How Has This Been Tested?

All existing tests pass (cargo test --package pixi_manifest --package pixi_task --package pixi_cli)

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: claude

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

@EzraBrooks
Copy link

This looks like a great way to do this, assuming (@Hofer-Julian @ruben-arts) we'd prefer this be opt-in vs opt-out.

For ROS users, it being opt-in will probably be a common rake to step on - most people will want reactivation to happen.

However, for other users who might not need this by default, if their environment activation is non-idempotent it could cause weird issues to have it be opt-out. Thoughts?

@Premkumar-2004
Copy link
Author

Went with opt-in to avoid breaking existing workflows. Happy to change the default if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Environment is not reactivated between tasks

2 participants