spack edit -b: support specifying build_system repos/namespace#51084
spack edit -b: support specifying build_system repos/namespace#51084
Conversation
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for specifying repository/namespace when editing build systems with spack edit -b, allowing users to access build systems from repos other than the highest priority one.
- Removes the
ComputeBuildSystemPathActionclass and replaces it with simpler logic - Updates argument parsing to support repo/namespace specification for build systems
- Adds a
repo_from_argsfunction to determine the appropriate repository based on command arguments
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| lib/spack/spack/cmd/edit.py | Main implementation adding repo/namespace support for build systems |
| lib/spack/spack/repo.py | Adds build_systems_path attribute to Repo class |
| lib/spack/spack/test/cmd/edit.py | Regression test for the new functionality |
| share/spack/spack-completion.fish | Updates help text to reflect new fullname support |
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
I'm not really sure this PR is much of an improvement to
at this point I would have just run (also, you just somehow have to know what the name of a build system is, in this case |
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]> Signed-off-by: Massimiliano Culpo <[email protected]>
Signed-off-by: Gregory Becker <[email protected]> Signed-off-by: Massimiliano Culpo <[email protected]>
Currently, there is no way to use
spack edit -bto edit a build system that is not in the highest priority repo. This is a problem for users with multiple repos, as they often use the build systems frombuiltin.This PR supports specifying the repo or namespace for a build system passed to
spack edit -b.Things it does not support:
spack edit -bcommandThose are not supported because they would require more substantial additions to the
spack.repo.RepoPathobject, and it's dubious whether the usefulness for this command is worth the additional maintenance burden in the codeIncludes regression test.