Skip to content

Conversation

mrswastik-robot
Copy link
Contributor

@mrswastik-robot mrswastik-robot commented Aug 2, 2025

tries to fix #3873

This PR introduces 3 new functions:

  • solve_for_dry_run()
  • report_dry_run_environment_update()
  • output_json_results()

Couldn't use install_environment() for the --dry-run, as it was solving correctly, but then also updated the packages (not expected in dry-run mode). So, had to extract the solving logic in solve_for_dry_run() to simulate the updates (stops after solving, never calls install_pixi_environment()). The reporting function report_dry_run_environment_update() is custom for dry-run, so it says "Would update ...". output_json_results() extracts real changes from StateChanges/EnvironmentUpdate, basically converts state changes to JSON output!

Example screenshot:
Screenshot_20250802_171623

@lucascolley lucascolley added enhancement New features area:global Related to pixi global labels Aug 2, 2025
@lucascolley
Copy link
Collaborator

@phreed would you be interested in checking this out?

@mrswastik-robot mrswastik-robot force-pushed the add_dry-run_cap_to_pixi_global_update branch from 23835d4 to b762538 Compare August 8, 2025 09:08
@bollwyvl bollwyvl mentioned this pull request Aug 13, 2025
@mrswastik-robot mrswastik-robot force-pushed the add_dry-run_cap_to_pixi_global_update branch from 4894546 to daefb03 Compare August 26, 2025 20:42
@lucascolley lucascolley changed the title feat: Add --dry-run & --json capability to pixi global update commands feat(global): add --dry-run & --json to global update Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:global Related to pixi global enhancement New features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --dry-run capability to pixi global update
2 participants