You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2022/10/12 10:02:00 UTC

[jira] [Comment Edited] (MNG-7561) DefaultVersionRangeResolver should not try to resolve request with same upper and lower bound

    [ https://issues.apache.org/jira/browse/MNG-7561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616329#comment-17616329 ] 

Tamas Cservenak edited comment on MNG-7561 at 10/12/22 10:01 AM:
-----------------------------------------------------------------

This issue to me looks like some sort of (maybe "premature") optimization? Also, the term "resolve" as I understand is used wrongly here "... should not [...] resolve..."at least with what "resolve" means in resolver. Or in other words, resolver _must ensure_ that given version exists, and the PR does a "shortcut" here, as it "does not resolve" but just pretends it does exists, which is IMHO wrong.


was (Author: cstamas):
This issue to me looks like some sort of (maybe "premature") optimization? Also, the term "resolve" as I understand is used wrongly here "... should not [...] resolve..." means that Artifact belonging File should not be provided to Maven (from resolver?) – as this is what "resolve" means. Or in other words, resolver _must ensure_ that given version exists, and the PR does a "shortcut" here, as it "does not resolve" but just pretends it does exists, which is IMHO wrong.

> DefaultVersionRangeResolver should not try to resolve request with same upper and lower bound
> ---------------------------------------------------------------------------------------------
>
>                 Key: MNG-7561
>                 URL: https://issues.apache.org/jira/browse/MNG-7561
>             Project: Maven
>          Issue Type: Improvement
>          Components: Artifacts and Repositories
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>
> For dependencies having e.g. version {{[1.0]}} the DefaultVersionRangeResolver still tries to resolve versions although only a single version (namely 1.0) is valid here according to https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification. 
> This leads in the worst case to long-running calls against a remote repository for no reason.
> There should be a shortcut in https://github.com/apache/maven/blob/3f90e7028e0338c110aea267b44362653d55273a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java#L108 when the range has the same upper and lower bound.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)