Skip to content

Commit

Permalink
Fix mason spack branch (#25427)
Browse files Browse the repository at this point in the history
Mason's Spack support relied on being able to clone the
`releases/latest` branch from[ spack's
repo](https://github.com/spack/spack/), but it appears to have been
removed with the latest spack release yesterday.

This PR hardcodes the branch to `releases/v0.22` to avoid test failures
caused by this problem.

It's possible that the spack developers will reintroduce a
`releases/latest` branch soon (not sure if this is something that
happened intentionally, or was just missed in their recent release), in
which case I will revert this PR.

- [x] mason tests passing

[ trivial - not reviewed ]
  • Loading branch information
jeremiah-corrado authored Jul 5, 2024
2 parents 617de1f + f161749 commit a0f0d6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/mason/mason-help-tests/masonHelpTests.good
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$ mason new -h
Usage:
mason new [options] <project name>
mason new Starts an interactive session

Options:
-h, --help Display this message
Expand Down
3 changes: 2 additions & 1 deletion tools/mason/MasonExternal.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const major = spackVersion.major:string;
const minor = spackVersion.minor:string;
const spackBranch = 'releases/v' + '.'.join(major, minor);
const spackDefaultPath = MASON_HOME + "/spack";
const latestSpackRelease = "v0.22";

use ArgumentParser;
use FileSystem;
Expand Down Expand Up @@ -184,7 +185,7 @@ proc setupSpack() throws {
const destCLI = MASON_HOME + "/spack/";
const spackLatestBranch = ' --branch v' + spackVersion.str() + ' ';
const destPackages = MASON_HOME + "/spack-registry";
const spackMasterBranch = ' --branch releases/latest ';
const spackMasterBranch = ' --branch releases/' + latestSpackRelease + ' ';
const statusCLI = cloneSpackRepository(spackLatestBranch, destCLI);
const statusPackages = cloneSpackRepository(spackMasterBranch, destPackages);
generateYAML();
Expand Down

0 comments on commit a0f0d6b

Please sign in to comment.