-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
deprecate spack diy in favor of spack dev-build #13374
Conversation
Will this fix #3642? That is, can I use |
@adamjstewart: yes |
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.
@becker33: minor change requests.
It would be really nice to have a test or two for this -- I am not sure we have time before the release.
lib/spack/spack/cmd/diy.py
Outdated
@@ -50,6 +50,7 @@ def setup_parser(subparser): | |||
|
|||
|
|||
def diy(self, args): | |||
tty.warn("`spack diy` is deprecated in favor of `spack dev-build`.") |
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.
This should really say that all the functionality of diy has moved to dev-build
, and that the diy
command will be removed in a future Spack version.
To remove redundant code, I would recommend that we implement diy
the same way spack compilers
is implemented -- that is, delete all the code here and have the parser setup and the code in this method call dev-build
. You can just import spack.cmd.diy
and call its methods.
Rename the `spack diy` command to `spack dev-build` to make the use case clearer. The `spack diy` command has some useful functionality for developers using Spack to build their dependencies and configure/build/install the code they are developing. Developers do not notice it, partly because of the obscure name. The `spack dev-build` command has a `-u/--until PHASE` option to stop after a given phase of the build. This can be used to configure your project, run cmake on your project, or similarly stop after any stage of the build the user wants. These options are analogous to the existing `spack configure` and `spack build` commands, but for developer builds. To unify the syntax, we have deprecated the `spack configure` and `spack build` commands, and added a `-u/--until PHASE` option to the `spack install` command as well. The functionality in `spack dev-build` (specifically `spack dev-build -u cmake`) may be able to supersede the `spack setup` command, but this PR does not deprecate that command as that will require slightly more thought.
Fixes #3642.
We've decided to rename the
spack diy
command tospack dev-build
to make the use case clearer.The
spack diy
command has some useful functionality for developers using Spack to build their dependencies and configure/build/install the code they are developing. We've realized that as this becomes a developer tool, the namespack diy
is less useful. Hence the rename.The
spack dev-build
command has a-u/--until PHASE
option to stop after a given phase of the build. This can be used to configure your project, run cmake on your project, or similarly stop after any stage of the build the user wants. These options are analogous to the existingspack configure
andspack build
commands, but for developer builds. To unify the syntax, we have deprecated thespack configure
andspack build
commands, and added a-u/--until PHASE
option to thespack install
command.I believe the functionality in
spack dev-build
(specificallyspack dev-build -u cmake
) can supersede thespack setup
command, but this PR does not deprecate that command as that will require slightly more thought.