Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: global update should add new executables #2298

Conversation

nichmor
Copy link
Contributor

@nichmor nichmor commented Oct 16, 2024

This PR aims to change how pixi global update picks up and exposes new binaries.

  • If the user initially chooses to auto-exposed everything, after the update we will remove binaries that are not anymore present and will expose the new ones. A good example of this could be python upgrade - we will remove python3.8 and will add python.39
  • If the user initially exposed only a small subset of binaries, we will not auto-expose the new ones.

image

  • adding python 3.8 and then modifying it manually to >=3.8, <3.10 as spec will result in this output

@nichmor nichmor marked this pull request as draft October 16, 2024 15:03
@nichmor nichmor marked this pull request as ready for review October 17, 2024 09:19
Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a review of the code, since I didn't test it locally yet. I added a few comments.

In the description of this PR, you outlined quite nicely how the new behavior works. Could you please also do that in the docstring of the command?

.pre-commit-config.yaml Outdated Show resolved Hide resolved
src/cli/global/list.rs Outdated Show resolved Hide resolved
src/global/common.rs Outdated Show resolved Hide resolved
src/global/common.rs Outdated Show resolved Hide resolved
let exposed_binaries_names = exposed_mapping_binaries
.iter()
.map(|mapping| mapping.executable_name())
.collect_vec();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ here I think it will not work because I need to check if a name is in this exposed list. Changed it to hashset though ( instead of vec )

src/global/project/manifest.rs Outdated Show resolved Hide resolved
src/global/project/mod.rs Outdated Show resolved Hide resolved
src/global/project/mod.rs Show resolved Hide resolved
tests/integration/test_global.py Outdated Show resolved Hide resolved
tests/integration/test_global.py Outdated Show resolved Hide resolved
@Hofer-Julian
Copy link
Contributor

I've now tested it locally and it works fine.

The tests on Windows are failing though.

nichmor and others added 10 commits October 17, 2024 14:38
Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
@Hofer-Julian Hofer-Julian merged commit d412ea0 into prefix-dev:main Oct 18, 2024
40 checks passed
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.

2 participants