Skip to content

Provide meaningful message for empty environment installs#28031

Merged
tgamblin merged 2 commits intospack:developfrom
tldahlgren:bugfix/empty-env-install
Dec 16, 2021
Merged

Provide meaningful message for empty environment installs#28031
tgamblin merged 2 commits intospack:developfrom
tldahlgren:bugfix/empty-env-install

Conversation

@tldahlgren
Copy link
Copy Markdown
Contributor

@tldahlgren tldahlgren commented Dec 15, 2021

Not sure if this is the goal, but this PR provides a meaningful error message before terminating the spack install of an empty environment. Without this change,

$ spack install
==> Error: list index out of range

with the change, a an error message about no specs is output before terminating calling the code to regenerate the view:

$ spack install
==> <env-name> environment has no specs to install

The reason for terminating is because we do that if no specs are provided on the command line. If that is not the desired behavior, this PR can be changed.

@spackbot-app spackbot-app bot added commands tests General test capability(ies) labels Dec 15, 2021
@tldahlgren
Copy link
Copy Markdown
Contributor Author

@haampie mentioned someone could remove specs before 'spack install' so we might want to do more than terminate if the environment has no specs.

@becker33 What are your thoughts on whether the view should be regenerated in this case and or a better message?

@tldahlgren
Copy link
Copy Markdown
Contributor Author

The test failure appears to be the spurious one described in #28021 .

@tldahlgren
Copy link
Copy Markdown
Contributor Author

Force re-testing.

@tldahlgren tldahlgren closed this Dec 16, 2021
@tldahlgren tldahlgren reopened this Dec 16, 2021
@tgamblin tgamblin merged commit ac49ce8 into spack:develop Dec 16, 2021
haampie pushed a commit that referenced this pull request Dec 16, 2021
* Provide a meaningful failure message for installation of an empty environment

* Allow regenerating view per offline discussion
@haampie haampie mentioned this pull request Dec 16, 2021
24 tasks
alalazo pushed a commit that referenced this pull request Dec 23, 2021
* Provide a meaningful failure message for installation of an empty environment

* Allow regenerating view per offline discussion
capitalaslash pushed a commit to capitalaslash/spack that referenced this pull request Aug 30, 2022
* Provide a meaningful failure message for installation of an empty environment

* Allow regenerating view per offline discussion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands tests General test capability(ies)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants