Add a custom hook for dev_path changes#46529
Merged
Conversation
Contributor
Author
|
Why I haven't thrown in the sparse checkout fix here: Logically it is not that hard. Query for the sparse paths attribute and loop over those with the filesystem recursive check. There is a gotcha though in that sparse checkout also includes all the files in the base directory (skips dirs). So we'd also need to add in a non-recursive check too. Rather than iterating the details in a PR to core, I'd like to work it out in our project since we have lots of developers eager to test drive |
1 task
Open
3 tasks
becker33
requested changes
Sep 25, 2024
becker33
requested changes
Sep 25, 2024
Member
becker33
left a comment
There was a problem hiding this comment.
Couple requests to bring the docs and comments into line with the new code.
0bf453c to
2128fd7
Compare
Co-authored-by: Greg Becker <[email protected]>
becker33
approved these changes
Sep 26, 2024
BOUDAOUD34
pushed a commit
to CINES-HPC/spack
that referenced
this pull request
Sep 27, 2024
* Add a custom hook for dev_path changes Co-authored-by: Greg Becker <[email protected]>
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.
Using the recent addition of
git_sparse_pathsin #45473 shows yet another way that our current develop change detection breaks down. In this case if you try to develop withspack develop --ppointing to the full source then any change to the code triggers a rebuild of everything.There have also been filesytem performance issues as noted in #41976 and #41013
This PR proposes to add a package hook to allow custom overriding of the standard filesystem behavior. I think I can also put in something that resolves the sparse-paths issue more directly, but since there are limited users of that feature (my team at SNL) I think a custom hook is sufficient until more users adopt that feature or a longer term trajectory for base implementation of detecting changes is settled on.
The current form as implemented is probably the "safest" form for all package types so I think it makes sense to leave it as a default.
Pinging @scheibelp @tgamblin