You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/01/14 14:11:45 UTC

DO NOT REPLY [Bug 48541] New: JarJar task silently behaves in incorrect way

https://issues.apache.org/bugzilla/show_bug.cgi?id=48541

           Summary: JarJar task silently behaves in incorrect way
           Product: Ant
           Version: 1.8.0RC1
          Platform: PC
        OS/Version: Mac System 7
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: vsizikov@gmail.com


In JRuby build, we use JarJar to bundle multiple JARs into a single one, plus
tweak the package names. We have the following:

<rule pattern="org.objectweb.asm.**" result="jruby.objectweb.asm.@1"/>

to replace org.objectweb.asm package with jruby.objectweb.asm one.

And it works just fine with Ant 1.7.0 and 1.7.1. But with 1.8.0RC1 the things
are broken and jarjar just silently skips this step of renaming the package.

If you'd like a test for this, then from JRuby repository:

1. ant jar-complete
2. java -cp lib\jruby-complete.jar org.jruby.Main -v

leads to crash (due to missing classes).

I bisected Ant repo, and it seems that the commit that introduced this problem
is:
rev 794204:

Author: Stefan Bodewig <bo...@apache.org>
Date:   Wed Jul 15 09:01:48 2009 +0000

preserve ZIP extra fields

So, this is a regression that breaks important and popular JarJar task and
makes JRuby build completely broken.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48541] JarJar task silently behaves in incorrect way

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48541

Vladimir Sizikov <vs...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Mac System 7                |Windows Vista

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48541] JarJar task silently behaves in incorrect way

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48541

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |1.8.0

--- Comment #3 from Stefan Bodewig <bo...@apache.org> 2010-01-17 02:04:27 UTC ---
It turned out to be non-trivial (yes, jarjar overrides the method in question)
but I think svn revision 900082 should fix it.  It would be good if you could
give it a try.

I'll look into adding jarjar or even the jruby builds to Gump so we catch new
regressions here.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48541] JarJar task silently behaves in incorrect way

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48541

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Stefan Bodewig <bo...@apache.org> 2010-01-17 02:38:44 UTC ---
great news, thanks for checking.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48541] JarJar task silently behaves in incorrect way

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48541

--- Comment #4 from Vladimir Sizikov <vs...@gmail.com> 2010-01-17 02:29:44 UTC ---
Stefan, excellent news! I tested the latest version with JRuby, and the build
is exactly the same for both Ant 1.7.1 and 1.8-dev. Thanks for the fix, much
appreciated!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48541] JarJar task silently behaves in incorrect way

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48541

--- Comment #1 from Stefan Bodewig <bo...@apache.org> 2010-01-16 22:41:04 UTC ---
First of all thank you for checking the release candidate.

The commit in question does two things.  First it tries to preserve "ZIP extra
fields" when re-packaging an archive and second it introduces a different
signature for the protected zipFile method since the old one contained a
parameter that has never been used.

Do you have any further information on how jarjar works internally (if not I
can try to locate the sources and check myself).  I'd suspect it is the second
part of the change causing problems.  Likely jarjar overrides the no-longer
used old signature.

The way I've implemented the new signature is not backwards compatible in any
case, so I'm going to revert that bit.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48541] JarJar task silently behaves in incorrect way

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48541

--- Comment #2 from Vladimir Sizikov <vs...@gmail.com> 2010-01-17 00:44:30 UTC ---
Thanks for quick response, and big thanks for moving Ant forward!

Unfortunately, I don't really know the JarJar internals. All I know is that
their repo is:

http://code.google.com/p/jarjar/source/browse/#svn/trunk/jarjar/src/main/com/tonicsystems/jarjar

And I just realized that I haven't provided the JRuby repo location, in case it
is needed for quick verification that JarJar works after the fix:

http://github.com/jruby/jruby

I'll also make sure to check the fix myself, as soon as I see it.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.