Conversation
…changes Modifications to `[package.build.config]` previously invalidated backend metadata cache but left `ArtifactCacheKey` and `WorkspaceKey` unchanged, causing pixi to install stale built packages from the artifact cache without rebuilding. Now, `ConfigurationHash` is derived with `Hash` and included in both `compute_artifact_cache_key` and `compute_workspace_key`, properly invalidating build artifacts and workspaces when build configuration changes. Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
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.
Description
Modifications to
[package.build.config](such as backend-specific compiler flags, ignore flags, or custom mappings) previously invalidated the backend metadata cache, butArtifactCacheKeyandWorkspaceKeyomitted the build configuration hash. Consequently, runningpixi installafter editing[package.build.config]reused stale built packages from the artifact cache without triggering a rebuild.This PR:
HashonConfigurationHashso it can be hashed into cache keys.configuration_hashfromresolve_backend_identityalongside the backend identifier string.configuration_hashintocompute_artifact_cache_keyandcompute_workspace_key, ensuring changes to[package.build.config]invalidate cached artifacts and workspace scratch directories.How Has This Been Tested?
test_package_rebuilt_across_sessions_when_build_config_modifiedincrates/pixi_command_dispatcher/tests/integration/main.rs:[package.build.config]in one package without altering source files.cargo test -p pixi_command_dispatcher test_package_rebuilt_across_sessions_when_build_config_modified.AI Disclosure
Tools: Claude
Checklist: