You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Carl Quinn (JIRA)" <ji...@apache.org> on 2010/02/10 22:56:28 UTC

[jira] Created: (IVY-1170) LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses

LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses
--------------------------------------------------------------------------

                 Key: IVY-1170
                 URL: https://issues.apache.org/jira/browse/IVY-1170
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.1.0
            Reporter: Carl Quinn


While tracking down some unexpected behavior in our Ivy-based build system, I ran across what looks like a bug in LatestVersionMatcher.needModuleDescriptor(). In that method, it has a hard-coded check for "latest.integration" to determine when to not require a module descriptor and just grab the newest thing.

    public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid) { 
        return !"latest.integration".equals(askedMrid.getRevision()); 
    } 

In our case, we have redefined our status to be the maven-like names: 

    <statuses default="snapshot"> 
        <status name="release" integration="false"/> 
        <status name="snapshot" integration="true"/> 
    </statuses> 

Where in our case "snapshot" replaces "integration". And this LatestVersionMatcher then fails to allow "latest.snapshot" to grab artifacts w/o module descriptors. (all those old jars that I haven't Ivy-fied yet :) 

I will work on developing a patch.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-1170) LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses

Posted by "Carl Quinn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Quinn updated IVY-1170:
----------------------------

    Attachment: ivy-1170.patch

I've attached a patch which makes the choice of the tail for "latest.integration" be dynamically selected from the configured statuses. With a default setup, this will remain "latest.integration", but when a different status is the least released, it will be used instead, such as "latest.snapshot".

I've included a unit test as well, although it is quite low-level and white box. But all tests continue to pass.

Let me know if this is ok, or if it needs more work.

thanks,
Carl


> LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses
> --------------------------------------------------------------------------
>
>                 Key: IVY-1170
>                 URL: https://issues.apache.org/jira/browse/IVY-1170
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.0
>            Reporter: Carl Quinn
>         Attachments: ivy-1170.patch
>
>
> While tracking down some unexpected behavior in our Ivy-based build system, I ran across what looks like a bug in LatestVersionMatcher.needModuleDescriptor(). In that method, it has a hard-coded check for "latest.integration" to determine when to not require a module descriptor and just grab the newest thing.
>     public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid) { 
>         return !"latest.integration".equals(askedMrid.getRevision()); 
>     } 
> In our case, we have redefined our status to be the maven-like names: 
>     <statuses default="snapshot"> 
>         <status name="release" integration="false"/> 
>         <status name="snapshot" integration="true"/> 
>     </statuses> 
> Where in our case "snapshot" replaces "integration". And this LatestVersionMatcher then fails to allow "latest.snapshot" to grab artifacts w/o module descriptors. (all those old jars that I haven't Ivy-fied yet :) 
> I will work on developing a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-1170) LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses

Posted by "Carl Quinn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873253#action_12873253 ] 

Carl Quinn commented on IVY-1170:
---------------------------------

Could someone take a look at this patch and apply it towards 2.2.0 RC? Or let me know if they see a problem with it?

We are currently running a locally built Ivy version, and I'd like to get this officialized if possible.

> LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses
> --------------------------------------------------------------------------
>
>                 Key: IVY-1170
>                 URL: https://issues.apache.org/jira/browse/IVY-1170
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.0
>            Reporter: Carl Quinn
>         Attachments: ivy-1170.patch
>
>
> While tracking down some unexpected behavior in our Ivy-based build system, I ran across what looks like a bug in LatestVersionMatcher.needModuleDescriptor(). In that method, it has a hard-coded check for "latest.integration" to determine when to not require a module descriptor and just grab the newest thing.
>     public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid) { 
>         return !"latest.integration".equals(askedMrid.getRevision()); 
>     } 
> In our case, we have redefined our status to be the maven-like names: 
>     <statuses default="snapshot"> 
>         <status name="release" integration="false"/> 
>         <status name="snapshot" integration="true"/> 
>     </statuses> 
> Where in our case "snapshot" replaces "integration". And this LatestVersionMatcher then fails to allow "latest.snapshot" to grab artifacts w/o module descriptors. (all those old jars that I haven't Ivy-fied yet :) 
> I will work on developing a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-1170) LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene updated IVY-1170:
-------------------------------

    Fix Version/s: 2.2.0-RC1

I'll try to take a look at it

> LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses
> --------------------------------------------------------------------------
>
>                 Key: IVY-1170
>                 URL: https://issues.apache.org/jira/browse/IVY-1170
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.0
>            Reporter: Carl Quinn
>             Fix For: 2.2.0-RC1
>
>         Attachments: ivy-1170.patch
>
>
> While tracking down some unexpected behavior in our Ivy-based build system, I ran across what looks like a bug in LatestVersionMatcher.needModuleDescriptor(). In that method, it has a hard-coded check for "latest.integration" to determine when to not require a module descriptor and just grab the newest thing.
>     public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid) { 
>         return !"latest.integration".equals(askedMrid.getRevision()); 
>     } 
> In our case, we have redefined our status to be the maven-like names: 
>     <statuses default="snapshot"> 
>         <status name="release" integration="false"/> 
>         <status name="snapshot" integration="true"/> 
>     </statuses> 
> Where in our case "snapshot" replaces "integration". And this LatestVersionMatcher then fails to allow "latest.snapshot" to grab artifacts w/o module descriptors. (all those old jars that I haven't Ivy-fied yet :) 
> I will work on developing a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (IVY-1170) LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene reassigned IVY-1170:
----------------------------------

    Assignee: Maarten Coene

> LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses
> --------------------------------------------------------------------------
>
>                 Key: IVY-1170
>                 URL: https://issues.apache.org/jira/browse/IVY-1170
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.0
>            Reporter: Carl Quinn
>            Assignee: Maarten Coene
>             Fix For: 2.2.0-RC1
>
>         Attachments: ivy-1170.patch
>
>
> While tracking down some unexpected behavior in our Ivy-based build system, I ran across what looks like a bug in LatestVersionMatcher.needModuleDescriptor(). In that method, it has a hard-coded check for "latest.integration" to determine when to not require a module descriptor and just grab the newest thing.
>     public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid) { 
>         return !"latest.integration".equals(askedMrid.getRevision()); 
>     } 
> In our case, we have redefined our status to be the maven-like names: 
>     <statuses default="snapshot"> 
>         <status name="release" integration="false"/> 
>         <status name="snapshot" integration="true"/> 
>     </statuses> 
> Where in our case "snapshot" replaces "integration". And this LatestVersionMatcher then fails to allow "latest.snapshot" to grab artifacts w/o module descriptors. (all those old jars that I haven't Ivy-fied yet :) 
> I will work on developing a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IVY-1170) LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene resolved IVY-1170.
--------------------------------

    Resolution: Fixed

I've applied your patch to SVN trunk with one small modification: I removed the check for status.isIntegration() to see if the moduledescriptor is needed.

Thanks for the contribution!
Maarten

> LatestVersionMatcher.needModuleDescriptor() does not honor custom statuses
> --------------------------------------------------------------------------
>
>                 Key: IVY-1170
>                 URL: https://issues.apache.org/jira/browse/IVY-1170
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.0
>            Reporter: Carl Quinn
>            Assignee: Maarten Coene
>             Fix For: 2.2.0-RC1
>
>         Attachments: ivy-1170.patch
>
>
> While tracking down some unexpected behavior in our Ivy-based build system, I ran across what looks like a bug in LatestVersionMatcher.needModuleDescriptor(). In that method, it has a hard-coded check for "latest.integration" to determine when to not require a module descriptor and just grab the newest thing.
>     public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid) { 
>         return !"latest.integration".equals(askedMrid.getRevision()); 
>     } 
> In our case, we have redefined our status to be the maven-like names: 
>     <statuses default="snapshot"> 
>         <status name="release" integration="false"/> 
>         <status name="snapshot" integration="true"/> 
>     </statuses> 
> Where in our case "snapshot" replaces "integration". And this LatestVersionMatcher then fails to allow "latest.snapshot" to grab artifacts w/o module descriptors. (all those old jars that I haven't Ivy-fied yet :) 
> I will work on developing a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.