You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Robey Pointer <ro...@gmail.com> on 2009/01/02 05:56:07 UTC

patch (ivy): log conflict results at verbose

When ivy is in log="download-only" mode, it will still log potentially  
dozens of lines (in a large project) of "conflicts". They aren't  
actually conflicts, just instances of multiple versions of a package  
in the cache, so besides being noisy, the messages are also a source  
of confusion/worry.

This patch fixes the log level of these messages so that "conflict"  
messages aren't displayed in quiet mode.

Thanks!
robey


Index: src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
===================================================================
--- src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java	 
(revision 730653)
+++ src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java	(working  
copy)
@@ -339,7 +339,7 @@
                  // which consider as greater a winning artifact
                  Collections.sort(artifactsList,  
getConflictResolvingPolicy());
                  // after the sort, the winning artifact is the  
greatest one, i.e. the last one
-                Message.info("\tconflict on "
+                Message.verbose("\tconflict on "
                          + copyDest
                          + " in "
                          + conflictsConfs


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: patch (ivy): log conflict results at verbose

Posted by Robey Pointer <ro...@gmail.com>.
On 8 Jan 2009, at 08:12, Xavier Hanin wrote:

> These log messages are confusing, beacause they are not resolve time
> conflicts, but retrieve time conflicts: when Ivy retrieves a set of
> artifact, if it has to retrieve two artifacts to the same location, it
> complains about a conflict. For instance if you have a dependency on
> acme#foo;1.0 in conf A and acme#foo;2.0 in conf B, then retrieve  
> both confs
> together with a pattern in which you do not put neither the conf nor  
> the
> revision, Ivy will inform about these "conflicts", and select the  
> latest
> version (this behaviour is not currently pluggable nor configurable).
>
> IMO adding an option to put these messages at verbose level would be  
> nice,
> what could be even better is to make the behaviour pluggable/ 
> configurable,
> and make the message explicit to tell that this is a retrieve  
> conflict, not
> a resolve conflict.

Is it possible that it's getting confused because the same packages  
are part of two different configs?

     <dependency org="org.scala-lang" name="scala-compiler"  
rev="2.7.2" conf="bootstrap->*; test->*" />
     <dependency org="org.scala-lang" name="scala-library"  
rev="2.7.2" />

You can see it happen immediately on my "smile" project, with a clean  
ivy cache. Smile is on github here:

     http://github.com/robey/smile/tree/master

(Build by just typing "ant". Nothing more than java 5 is required.)

I don't take exception to any aspect of these messages except (1)  
since they are not actually conflicts, (2) I want to be able to  
silence the messages during a build. Dropping them to verbose (as I  
did in my patch) is sufficient.

robey


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: patch (ivy): log conflict results at verbose

Posted by Xavier Hanin <xa...@gmail.com>.
These log messages are confusing, beacause they are not resolve time
conflicts, but retrieve time conflicts: when Ivy retrieves a set of
artifact, if it has to retrieve two artifacts to the same location, it
complains about a conflict. For instance if you have a dependency on
acme#foo;1.0 in conf A and acme#foo;2.0 in conf B, then retrieve both confs
together with a pattern in which you do not put neither the conf nor the
revision, Ivy will inform about these "conflicts", and select the latest
version (this behaviour is not currently pluggable nor configurable).

IMO adding an option to put these messages at verbose level would be nice,
what could be even better is to make the behaviour pluggable/configurable,
and make the message explicit to tell that this is a retrieve conflict, not
a resolve conflict.

Xavier

On Thu, Jan 8, 2009 at 12:30 AM, Maarten Coene <ma...@yahoo.com>wrote:

> I never saw this message before.
> Could you create a JIRA issue and attach the relevant log when running ant
> in verbose mode? That should also tell us which are the conflicting
> artifacts.
>
> Maarten
>
>
>
>
> ----- Original Message ----
> From: Robey Pointer <ro...@gmail.com>
> To: Ant Developers List <de...@ant.apache.org>
> Sent: Wednesday, January 7, 2009 5:29:01 AM
> Subject: Re: patch (ivy): log conflict results at verbose
>
> On 6 Jan 2009, at 12:14, Maarten Coene wrote:
>
> > I'm not convinced that this is the proper way to solve your problem.
> > If they are not conflicts, they shouldn't get logged as conflict. Could
> you give us more info and an example of your log?
>
> I agree, since they aren't conflicts, even the word "conflict" in the
> message is misleading. I just didn't want to change too much -- the real
> problem is that it's logged at info level and can't be quieted. Feel free to
> change the text.
>
> The messages are things like this:
>
> [ivy:retrieve]     conflict on
> /Users/robey/code/scala/configgy/target/libs/default/scala-library-2.7.2.jar
> in [default]: 2.7.2 won
> [ivy:retrieve]     conflict on
> /Users/robey/code/scala/configgy/target/libs/test/scala-compiler-2.7.2.jar
> in [test]: 2.7.2 won
> [ivy:retrieve]     conflict on
> /Users/robey/code/scala/configgy/target/libs/test/scala-library-2.7.2.jar in
> [test]: 2.7.2 won
>
> I see them in every project I build, at home or at work. Just build a few
> different projects and you will see them. I gather that the real message
> should be something along the lines of "I found jars in your cache and
> picked the one you asked for".
>
> robey
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Xavier Hanin - 4SH France
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/

Re: patch (ivy): log conflict results at verbose

Posted by Maarten Coene <ma...@yahoo.com>.
I never saw this message before.
Could you create a JIRA issue and attach the relevant log when running ant in verbose mode? That should also tell us which are the conflicting artifacts.

Maarten




----- Original Message ----
From: Robey Pointer <ro...@gmail.com>
To: Ant Developers List <de...@ant.apache.org>
Sent: Wednesday, January 7, 2009 5:29:01 AM
Subject: Re: patch (ivy): log conflict results at verbose

On 6 Jan 2009, at 12:14, Maarten Coene wrote:

> I'm not convinced that this is the proper way to solve your problem.
> If they are not conflicts, they shouldn't get logged as conflict. Could you give us more info and an example of your log?

I agree, since they aren't conflicts, even the word "conflict" in the message is misleading. I just didn't want to change too much -- the real problem is that it's logged at info level and can't be quieted. Feel free to change the text.

The messages are things like this:

[ivy:retrieve]     conflict on /Users/robey/code/scala/configgy/target/libs/default/scala-library-2.7.2.jar in [default]: 2.7.2 won
[ivy:retrieve]     conflict on /Users/robey/code/scala/configgy/target/libs/test/scala-compiler-2.7.2.jar in [test]: 2.7.2 won
[ivy:retrieve]     conflict on /Users/robey/code/scala/configgy/target/libs/test/scala-library-2.7.2.jar in [test]: 2.7.2 won

I see them in every project I build, at home or at work. Just build a few different projects and you will see them. I gather that the real message should be something along the lines of "I found jars in your cache and picked the one you asked for".

robey


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: patch (ivy): log conflict results at verbose

Posted by Robey Pointer <ro...@gmail.com>.
On 6 Jan 2009, at 12:14, Maarten Coene wrote:

> I'm not convinced that this is the proper way to solve your problem.
> If they are not conflicts, they shouldn't get logged as conflict.  
> Could you give us more info and an example of your log?

I agree, since they aren't conflicts, even the word "conflict" in the  
message is misleading. I just didn't want to change too much -- the  
real problem is that it's logged at info level and can't be quieted.  
Feel free to change the text.

The messages are things like this:

[ivy:retrieve] 	conflict on /Users/robey/code/scala/configgy/target/ 
libs/default/scala-library-2.7.2.jar in [default]: 2.7.2 won
[ivy:retrieve] 	conflict on /Users/robey/code/scala/configgy/target/ 
libs/test/scala-compiler-2.7.2.jar in [test]: 2.7.2 won
[ivy:retrieve] 	conflict on /Users/robey/code/scala/configgy/target/ 
libs/test/scala-library-2.7.2.jar in [test]: 2.7.2 won

I see them in every project I build, at home or at work. Just build a  
few different projects and you will see them. I gather that the real  
message should be something along the lines of "I found jars in your  
cache and picked the one you asked for".

robey


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: patch (ivy): log conflict results at verbose

Posted by Maarten Coene <ma...@yahoo.com>.
I'm not convinced that this is the proper way to solve your problem.
If they are not conflicts, they shouldn't get logged as conflict. Could you give us more info and an example of your log?

Maarten



----- Original Message ----
From: Robey Pointer <ro...@gmail.com>
To: dev@ant.apache.org
Sent: Friday, January 2, 2009 5:56:07 AM
Subject: patch (ivy): log conflict results at verbose

When ivy is in log="download-only" mode, it will still log potentially dozens of lines (in a large project) of "conflicts". They aren't actually conflicts, just instances of multiple versions of a package in the cache, so besides being noisy, the messages are also a source of confusion/worry.

This patch fixes the log level of these messages so that "conflict" messages aren't displayed in quiet mode.

Thanks!
robey


Index: src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
===================================================================
--- src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java    (revision 730653)
+++ src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java    (working copy)
@@ -339,7 +339,7 @@
                 // which consider as greater a winning artifact
                 Collections.sort(artifactsList, getConflictResolvingPolicy());
                 // after the sort, the winning artifact is the greatest one, i.e. the last one
-                Message.info("\tconflict on "
+                Message.verbose("\tconflict on "
                         + copyDest
                         + " in "
                         + conflictsConfs


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org