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: prototype additional hash #3140

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Feb 14, 2025

The idea here is the following:

Instead of adding additional files to the glob, it might be useful if the backends could add some metadata to break caches when they know it's needed.

For example, we had the situation that changing the cmake version (or any build-time dependency for that matter) did not trigger a rebuild. We solved this (as far as I understand) by globbing the entire input file as part of the hash. This is a little broader than what we would like because now adding empty lines and so on would also break the cache.

Ideally, the backend would tell us: these are the files that are concerned, and these are some extra data that should influence the hash. This extra data could be build time dependencies and other things, and it would just be injected into the hash.

However, then the problem becomes that pixi cannot itself determine whether it needs to call CondaGetMetadata.

So I think we should ideally have two sets of globs:

  • first set contains source files + metadata files (like recipe)
  • second set contains source files without metadata files (but instead, the additional_hash data returned from getMetadata call)

Maybe someone can elaborate a bit why we have input_globs in the CondaMetadataResult, but it's currently None in all backends?

Maybe this is also a bit premature optimization and what we have now works well enough.

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.

1 participant