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

deprecate spack diy in favor of spack dev-build #13374

Merged
merged 5 commits into from
Oct 24, 2019

Conversation

becker33
Copy link
Member

@becker33 becker33 commented Oct 22, 2019

Fixes #3642.

We've decided to 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. We've realized that as this becomes a developer tool, the name spack 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 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.

I believe the functionality in spack dev-build (specifically spack dev-build -u cmake) can supersede the spack setup command, but this PR does not deprecate that command as that will require slightly more thought.

@adamjstewart
Copy link
Member

adamjstewart commented Oct 22, 2019

Will this fix #3642? That is, can I use spack install --until foo bar where foo is an arbitrary phase defined in a custom Package class for package bar?

@tgamblin
Copy link
Member

@adamjstewart: yes

@tgamblin tgamblin closed this Oct 23, 2019
@tgamblin tgamblin reopened this Oct 23, 2019
Spack v0.13.0 release automation moved this from In Review to In Progress Oct 23, 2019
@tgamblin tgamblin moved this from In Progress to In Review in Spack v0.13.0 release Oct 23, 2019
Copy link
Member

@tgamblin tgamblin left a 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/build.py Show resolved Hide resolved
lib/spack/spack/cmd/configure.py Show resolved Hide resolved
@@ -50,6 +50,7 @@ def setup_parser(subparser):


def diy(self, args):
tty.warn("`spack diy` is deprecated in favor of `spack dev-build`.")
Copy link
Member

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.

@tgamblin tgamblin added the dev-specs Anything related to dev-specs in environments label Oct 24, 2019
@tgamblin tgamblin merged commit 8c7a3e5 into develop Oct 24, 2019
Spack v0.13.0 release automation moved this from In Review to Done Oct 24, 2019
@tgamblin tgamblin deleted the features/unify-install-build-diy branch October 25, 2019 06:48
jrmadsen pushed a commit to jrmadsen/spack that referenced this pull request Oct 30, 2019
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commands dev-specs Anything related to dev-specs in environments
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

spack configure/build doesn't work for all package base classes
3 participants