You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [2]: spack.spec.Spec('mpich@3.1,3.1.1:3.1.2')
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~/spack/lib/spack/spack/cmd/python.py in <module>
----> 1 spack.spec.Spec('mpich@3.1,3.1.1:3.1.2')
~/spack/lib/spack/spack/spec.py in __init__(self, spec_like, normal, concrete, external_path, external_modules)
1092
1093 if isinstance(spec_like, six.string_types):
-> 1094 spec_list = SpecParser(self).parse(spec_like)
1095 if len(spec_list) > 1:
1096 raise ValueError("More than one spec in string: " + spec_like)
~/spack/lib/spack/spack/parse.py in parse(self, text)
151 def parse(self, text):
152 self.setup(text)
--> 153 return self.do_parse()
154
155
~/spack/lib/spack/spack/spec.py in do_parse(self)
4687 # Cannot do lookups for versions in anonymous specs
4688 # Only allow concrete versions using git for now
-> 4689 if spec.name and spec.versions.concrete and spec.version.is_commit:
4690 pkg = spec.package
4691 if hasattr(pkg, 'git'):
AttributeError: 'VersionRange' object has no attribute 'is_commit'
In [1]: spack.spec.Spec('mpich@3.1,3.1.1:3.1.2')
Out[1]: mpich@3.1:3.1
Note that this is technically incorrect, since it should be a version list of a concrete version and a range. This also hits yet another bug in spack, namely:
In [2]: spack.spec.Spec('mpich@3.1,3.1.1:3.1.2').versions.concrete
Out[2]: Version('3.1')
:/
The text was updated successfully, but these errors were encountered:
@becker33 I guess the issue is not on the git version side, but rather with VersionRange x:x being concrete -- which is a bug imho. I've tried to address that here: #26208 but spack seems to rely on this behavior
haampie
changed the title
Version list is broken
VersionRange is broken
Oct 4, 2021
The tl;dr VersionList incorrectly simplifies ranges x,x.y:x.z to x:x, which is considered a concrete version, which triggers a bug in the new git commit code which assume that concrete versions === Version objects.
Steps to reproduce
After #24639
Before #24639
Note that this is technically incorrect, since it should be a version list of a concrete version and a range. This also hits yet another bug in spack, namely:
:/
The text was updated successfully, but these errors were encountered: