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

Make literal spack commit available in spack view #203

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Nov 22, 2024

Similar to #199, this makes the literal spack commit specified in the recipe available as UENV_SPACK_COMMIT_LITERAL in a spack view. However, UENV_SPACK_COMMIT stays as the commit hash as before.

I've now crammed everything into the --spack command line argument of envvars.py. Searching around a bit, I think in theory commas are allowed in e.g. branch names, and could therefore end up breaking the parsing (which relies on the repo, literal commit, and commit hash being separated by commas), but it seems like in practice one should not use commas, and I've certainly never seen it in the wild. Just pointing it out in case someone thinks it's worth handling that.

I've gone with the name "commit literal" as suggested by @bcumming. I think it fits as it's the "literal" that was used to configure the recipe. I'm not sure if there's a common git term for anything that can be checked out that could be a better option? I considered "reference" since a branch or tag is a reference, but if I understand correctly a commit hash is not a reference (but a commit hash is allowed to be used here), so it doesn't quite fit.

Edit: this is now using "ref" and UENV_SPACK_REF for what is called "literal" above.

With a freshly built stack:

$ uenv start --view spack store.squashfs
loading the view cuda-12.6:spack
$ printenv | grep '^UENV_SPACK'
UENV_SPACK_COMMIT=ed1dbea77b442cd55848b11e633f6626e83a999d
UENV_SPACK_REF=develop
UENV_SPACK_CONFIG_PATH=/user-environment/config
UENV_SPACK_URL=https://github.com/spack/spack.git

@msimberg msimberg requested a review from bcumming November 22, 2024 11:15
@msimberg msimberg force-pushed the store-literal-commit branch from 5e5a5b5 to c13b07f Compare November 22, 2024 11:17
@bcumming bcumming merged commit b8cca5b into master Nov 26, 2024
13 checks passed
@msimberg msimberg deleted the store-literal-commit branch November 26, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants