Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch: use jarjar in multibindings build.xml #254

Closed
gissuebot opened this issue Jul 7, 2014 · 8 comments
Closed

Patch: use jarjar in multibindings build.xml #254

gissuebot opened this issue Jul 7, 2014 · 8 comments

Comments

@gissuebot
Copy link

From mark.renouf on October 01, 2008 16:06:35

Attached is a patch to extensions/multibindings/build.xml which adds jarjar
to the build process so google-collect-snapshot-20080530.jar is not a
runtime dependency of guice-multibindings.

Since google-collections is already pulled into guice.jar, right now this
results in only one duplicated class, "com.google.common.base.Preconditions".

I suspect this is only temporary until google-collections hits 1.0.

Attachment: gist
   guice2-multibindings-use-jarjar.diff

Original issue: http://code.google.com/p/google-guice/issues/detail?id=254

@gissuebot
Copy link
Author

From limpbizkit on November 02, 2008 01:44:16

(No comment was entered for this change.)

Labels: -Priority-Medium Priority-High Milestone-Release2.0

@gissuebot
Copy link
Author

From limpbizkit on November 29, 2008 12:47:13

Fixed with r706 . I didn't use Mark's patch 'cause that would require multiple extra copies of collect.

Status: Fixed

@gissuebot
Copy link
Author

From gili.tzabari on December 01, 2008 23:46:14

Jesse, I don't think this is fixed. I just checked out r716 , did a full clean build
and the code still throws the following exception:

java.lang.NoClassDefFoundError: com/google/inject/internal/collect/ImmutableMultimap
        at
com.google.inject.assistedinject.Factories$RealInvocationHandler.<init>(Factories.java:220)
[snip]

I have trunk/dist/guice-assistedinject-snapshot.jar and trunk/dist/guice-snapshot.jar
in my classpath. I assume these are correct?

@gissuebot
Copy link
Author

From sberlin on December 02, 2008 06:14:27

I suspect there might need more involved -- if I remember Jesse's approach
correctly, he used JarJar on guice, and then JarJar on each extension, and then
erased the jarjar creations from each extension.  That'll only work if extensions
only use the same parts of JarJar'd code that Guice uses.  If an extension uses
something new, it won't see it in Guice's JarJar'd code.

@gissuebot
Copy link
Author

From limpbizkit on December 02, 2008 09:09:35

Yup, sberlin is right. This means my clever solution isn't going to work as neatly I'd originally hoped. I made a
quick fix in r717 , if anyone has ideas for something more reliable, I'm interested.

@gissuebot
Copy link
Author

From sberlin on December 02, 2008 09:31:09

If there's a way to move all jarjar'd extension code into Guice's jarjar'd code that
should resolve it.  I can't imagine any of this is going to play nice with attempts
to remove unused static dependencies though.

@gissuebot
Copy link
Author

From gili.tzabari on December 02, 2008 09:33:28

For one, this issue should be reopened :)

Secondly, how about taking this opportunity to provide a build of Guice that doesn't
use JarJar (i.e. depends on external jar files)? I'd rather use this in the long run
anyway (and use Proguard myself if I need to) but it would also come in useful in the
short run until you figure this out.

@gissuebot
Copy link
Author

From gili.tzabari on December 06, 2008 13:31:11

I posted a patch for building Guice without dependencies here: http://bbs.darktech.org/guice254.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant