Bug #2159
Analysis of maven version ranges does not work correctly
Status: | Resolved | Start date: | 01/16/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Project Analysis | |||
Target version: | 0.3 |
Description
Some version constraints for dependencies in maven are parsed incorrectly. E.g. in rsb-xml-java 0.11, the following is requested:
<dependency> <groupId>rsb</groupId> <artifactId>rst</artifactId> <version>[0.11,0.12-SNAPSHOT)</version> </dependency>
The build generator ends up with a dependency error like this:
#<VERSION-SPEC rsb-xml-java:0.11 {100B839FA3}> (2 missing dependencies): No provider for (:MAVEN "rsb/rst" (0 "11,0" 12 "SNAPSHOT")). No provider for (:MAVEN "rsb/rsb" (0 "11,0" 12 "SNAPSHOT")).
Associated revisions
Improved parsing of Maven version ranges in src/analysis/maven.lisp
fixes #2159
Version ranges like [0.11,0.12-SNAPSHOT) were parsed completely
incorrectly. Now a crappy approximation (i.e. ">= 0.11" for the above)
is produced instead.
- src/analysis/maven.lisp (header): updated copyright
(%parse-maven-version-spec): terminate lower-bound version at first
"," character
Backport: Improved parsing of Maven version ranges in src/analysis/maven.lisp
refs #2159
Version ranges like [0.11,0.12-SNAPSHOT) were parsed completely
incorrectly. Now a crappy approximation (i.e. ">= 0.11" for the above)
is produced instead.
- src/analysis/maven.lisp (header): updated copyright
(%parse-maven-version-spec): terminate lower-bound version at first
"," character
Improved parsing of Maven version ranges in src/analysis/maven.lisp
fixes #2159
Version ranges like [0.11,0.12-SNAPSHOT) were parsed completely
incorrectly. Now a crappy approximation (i.e. ">= 0.11" for the above)
is produced instead.
- src/analysis/maven.lisp (header): updated copyright
(analyze pathname eql :maven): produced better output for unversioned
requirements
(%parse-maven-version-spec): terminate lower-bound version at first
"," character; allow trailing "," character; allow multiple version
ranges
Backport: Improved parsing of Maven version ranges in src/analysis/maven.lisp
refs #2159
Version ranges like [0.11,0.12-SNAPSHOT) were parsed completely
incorrectly. Now a crappy approximation (i.e. ">= 0.11" for the above)
is produced instead.
- src/analysis/maven.lisp (header): updated copyright
(analyze pathname eql :maven): produced better output for unversioned
requirements
(%parse-maven-version-spec): terminate lower-bound version at first
"," character; allow trailing "," character; allow multiple version
ranges
History
#1 Updated by J. Moringen over 9 years ago
Would this parse-tree make sense:
(parse-version-spec 'list "[0.11,0.12-SNAPSHOT)")
(:VERSION-OPERATOR
:OPERATOR AND
(:VERSION-PREDICATE NIL
:OPERATOR >=
:VERSION (:VERSION NIL :COMPONENTS (0 11 0)))
(:VERSION-PREDICATE NIL
:OPERATOR <
:VERSION (:VERSION NIL :COMPONENTS (0 12 0 "SNAPSHOT"))))
?
#2 Updated by J. Wienke over 9 years ago
looks right to me
#3 Updated by J. Moringen over 9 years ago
Well, the current generator still uses a the crappy regex-based parser, but the problem can be "fixed" there as well.
#4 Updated by J. Moringen over 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset 5ec1816773af3b5532b084cee034a5173a11130b.