Skip to content

Bug: GitVersion with assigned ref not parsing with variants without space#32184

Closed
psakievich wants to merge 16 commits intospack:developfrom
psakievich:bug/git-hashes
Closed

Bug: GitVersion with assigned ref not parsing with variants without space#32184
psakievich wants to merge 16 commits intospack:developfrom
psakievich:bug/git-hashes

Conversation

@psakievich
Copy link
Copy Markdown
Contributor

@psakievich psakievich commented Aug 16, 2022

spec::__str__ places variants next to versions with no spaces. This is not parsing with the GitVersions when the references is assigned (foo@git.[hash]=develop+var1). The error shows up when spack tries to read a spack.lock and is unable to parse the root specs.

An example from a lock file

  "roots": [
    {
      "hash": "pqiebnzqdv7tpuwepniftbdwxoplokag",
      "spec": "[email protected]=master+hypre+openfast arch=linux-None-x86_64"
    },

So there are two potential fixes:

  1. Make it so there is always a space between the version and the variants
  2. Make the spec parser able to distinguish this as a valid spec.

I've been pursuing path 2, which seems better, but more complicated. Not sure I understand why the parser is hanging onto the these variants when it creates the version.

There is a second bug in that GitVersions fetch calls are not cloning submodules recursively. I want to fix both, but will open a second PR for this issue if it is not a simple fix.

@becker33

@spackbot-app spackbot-app bot added core PR affects Spack core functionality tests General test capability(ies) labels Aug 16, 2022
@psakievich psakievich marked this pull request as draft August 16, 2022 19:50
@spackbot-app spackbot-app bot added the documentation Improvements or additions to documentation label Aug 17, 2022
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.

1 participant