We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4469bee commit f3a9969Copy full SHA for f3a9969
1 file changed
python/private/version.bzl
@@ -782,9 +782,11 @@ def version(version_str, strict = False):
782
]
783
784
for p, fn in fns:
785
+ start = len(parser.context()["norm"])
786
fn(parser)
- parts[p] = parser.context()["norm"]
787
- parser.context()["norm"] = "" # Clear out the buffer so that it is easy to separate the fields
+ parts[p] = parser.context()["norm"][start:]
788
+
789
+ parts["norm"] = parser.context()["norm"]
790
791
is_prefix = version_str.endswith(".*")
792
parts["is_prefix"] = is_prefix
@@ -805,5 +807,4 @@ def version(version_str, strict = False):
805
807
# If we fail to parse the version return None
806
808
return None
809
- parts["norm"] = "".join([parts[p] for p, _ in fns])
810
return _new_version(**parts)
0 commit comments