Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adamjstewart
Copy link
Member

@adamjstewart adamjstewart commented Nov 5, 2019

Fixes #13529
Fixes #13509

@becker33 @alalazo feel free to push additional commits to this if you want to add unit tests or modify the behavior. I've been using this for a few days now without any unintended side-effects.

@alalazo
Copy link
Member

alalazo commented Nov 6, 2019

It could be beneficial to warn users in some way if we are activating a partially installed / incomplete environment:

$ spack env activate ...
==> Warning: the environment is only partially installed and as such it might be inconsistent with the requests in spack.yaml. Run `spack install` to complete its installation and reactivate it.

$

Suggestions for better wording are welcome, the idea being to let users know when an environment is not yet ready to be used (this was the case here with python not being installed).

@alalazo alalazo self-assigned this Nov 6, 2019
@healther
Copy link
Contributor

healther commented Nov 6, 2019

I actually think spack should be more proactive here and offer to do the spack install automatically

@adamjstewart
Copy link
Member Author

I agree that trying to activate a partially installed environment should elicit a warning, but this PR is more general than that. The issue arises when any Spack Environments command is run, including spack concretize and spack install. That warning message should go elsewhere.

@alalazo
Copy link
Member

alalazo commented Nov 7, 2019

That warning message should go elsewhere.

Do you mean in another PR or in another place in the code? For the PR, I'm fine with both cases. This PR fixes a bug - and it's not only about command it's about prerequisites like in #11115 (if you ask for runtime modifications you expect the spec to be installed).

The message is related to this in the sense that the issue arise when some of the specs in the environment are not already installed. It can be implemented independently though. My preference would be to have the warning message in this PR along with some regression test, but I'm fine if people want to merge this PR first and fast.

@adamjstewart
Copy link
Member Author

My preference would be to have the warning message in this PR along with some regression test

Feel free to add commits to this PR 😄

@alalazo
Copy link
Member

alalazo commented Nov 7, 2019

Feel free to add commits to this PR

Will try to do tomorrow

@alalazo
Copy link
Member

alalazo commented Nov 11, 2019

Opened #13675 to keep track of the other modifications I was suggesting here. Merging this as is.

@alalazo alalazo merged commit bd99078 into spack:develop Nov 11, 2019
@adamjstewart adamjstewart deleted the fixes/python-env branch November 11, 2019 14:55
tgamblin added a commit that referenced this pull request Dec 5, 2019
v0.13.2

This release contains major performance improvements for Spack environments, as well as some bugfixes and minor changes.

* allow missing modules if they are blacklisted (#13540)
* speed up environment activation (#13557)
* mirror path works for unknown versions (#13626)
* environments: don't try to modify run-env if a spec is not installed (#13589)
* use semicolons instead of newlines in module/python command (#13904)
* verify.py: os.path.exists exception handling (#13656)
* Document use of the maintainers field (#13479)
* bugfix with config caching (#13755)
* hwloc: added 'master' version pointing at the HEAD of the master branch (#13734)
* config option to allow gpg warning suppression (#13744)
* fix for relative symlinks when relocating binary packages (#13727)
* allow binary relocation of strings in relative binaries (#13724)
tgamblin added a commit that referenced this pull request Dec 5, 2019
v0.13.2

This release contains major performance improvements for Spack environments, as well as some bugfixes and minor changes.

* allow missing modules if they are blacklisted (#13540)
* speed up environment activation (#13557)
* mirror path works for unknown versions (#13626)
* environments: don't try to modify run-env if a spec is not installed (#13589)
* use semicolons instead of newlines in module/python command (#13904)
* verify.py: os.path.exists exception handling (#13656)
* Document use of the maintainers field (#13479)
* bugfix with config caching (#13755)
* hwloc: added 'master' version pointing at the HEAD of the master branch (#13734)
* config option to allow gpg warning suppression (#13744)
* fix for relative symlinks when relocating binary packages (#13727)
* allow binary relocation of strings in relative binaries (#13724)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to concretize environment if python isn't installed yet Spack trying to use a python that it was told to build but never actually built

3 participants