-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix patched dependencies across repositories #42463
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we fix the underlying issue without resorting to using globals? Also, can we add a regression test?
Just want to say that this fixes an important issue for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5f93a75
to
a00d6b2
Compare
a00d6b2
to
fa5b6ad
Compare
@alalazo see if you like the test here. I do not see a good way to do this without using |
7469aec
to
7ddf20d
Compare
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
7ddf20d
to
2e6760c
Compare
Greg and I reviewed each other's changes and this is addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with @becker33's approach (see above). He's ok with/my tests. We also now have scaffolding for multi-repo tests in CI, which likely we will need more of.
@@ -530,7 +530,7 @@ def update_package(self, pkg_fullname: str) -> None: | |||
|
|||
# update the index with per-package patch indexes | |||
pkg_cls = self.repository.get_pkg_class(pkg_fullname) | |||
partial_index = self._index_patches(pkg_cls, self.repository) | |||
partial_index = self._index_patches(pkg_cls) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tgamblin @becker33 Note that this and the line above:
pkg_cls = self.repository.get_pkg_class(pkg_fullname)
partial_index = self._index_patches(pkg_cls)
was the main cause for my request ☝️ Now we are using both self.repository
and spack.repo.PATH
. We should keep that in mind, because if they ever get out of sync (and they probably do if this fixes the issue), they will cause bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be out of sync here? In any given Spack run, the dependency a name refers to is the one in spack.repo.PATH
. So this is the only way I see right now to resolve a name that's not in the local repo, and it's the only one we really support (unless the dependency explicitly specifies a namespace, but then you want to go through PATH
as well).
I'm not sure what you want this to do.
I'm baffled how this auto-merged without passing tests. Working on a fix. If I can't I'll revert. |
Currently, if a package has a dependency from another repository and patches it, generation of the patch cache will fail. Concretization succeeds if a fixed patch cache is in place. - [x] don't assume that patched dependencies are in the same repo when indexing - [x] add some test fixtures to support multi-repo tests. --------- Signed-off-by: Todd Gamblin <tgamblin@llnl.gov> Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
…pack#47519) This reverts commit da1d533.
Currently, if a package has a dependency from another repository and patches it, generation of the patch cache will fail. Concretization succeeds if a fixed patch cache is in place.