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: do not re-install if source does not change #2118

Conversation

tdejager
Copy link
Contributor

@tdejager tdejager commented Sep 23, 2024

This should ensure that a build/rebuild is only triggered when the source is changed.

The final todo, I would say is to move the merge the reinstall_globs.rs file and the new struct that have been created in environment.rs.

@tdejager tdejager marked this pull request as ready for review September 24, 2024 06:55
@baszalmstra baszalmstra force-pushed the feat/check-glob-source-reinstall branch from 20548a5 to 28d21d6 Compare September 24, 2024 15:19
@baszalmstra baszalmstra added the area:build Related to pixi build label Sep 24, 2024
@baszalmstra baszalmstra force-pushed the feat/check-glob-source-reinstall branch from 28d21d6 to e3bd34d Compare September 24, 2024 15:20
@baszalmstra
Copy link
Contributor

Soooo I have refactored almost everything. I had a long discussion with @wolfv today and we decided that instead of storing the caching information in the prefix itself we would store it in a cache together with the built artifact. This is then very similar to what we do with the metadata basically.

@tdejager
Copy link
Contributor Author

Could you elaborate why :)?

@wolfv
Copy link
Member

wolfv commented Sep 26, 2024

In my opinion the cache information doesn't really belong in the prefix information. My understanding is that we now have a two layered cache:

pixi.toml -> metadata cache -> artifact cache -> prefix

It's one more "cache" but we would have needed that cache anyways and now it can be shared across multiple projects. The cache should know when it needs to generate a new artifact based on mtime, etc, and then return a new hash that should be used as part of the package build string to be installed in the prefix.

@tdejager
Copy link
Contributor Author

Yes that makes sense! Thanks for explaining!

Copy link
Contributor Author

@tdejager tdejager left a comment

Choose a reason for hiding this comment

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

Nice, missing some docs mainly.

src/build/cache/build_cache.rs Show resolved Hide resolved
crates/pixi_record/src/pinned_source.rs Show resolved Hide resolved
crates/pixi_record/src/pinned_source.rs Show resolved Hide resolved
crates/pixi_record/src/pinned_source.rs Show resolved Hide resolved
src/build/mod.rs Show resolved Hide resolved
@baszalmstra baszalmstra merged commit fcf8705 into prefix-dev:feature/pixi-build Oct 10, 2024
11 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:build Related to pixi build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants