Balzanka / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Split the Guava jar into atomic Maven packages #1329

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello everyone.

I apologize in advance if this has been previously mentioned.

My suggestion is simple. 

In the spirit of code minimalism, split guava-XX.X.X.jar into atomic jars, at 
least when publishing to Maven central.

Most probably almost everyone uses Guava's base classes; but others may not use 
the math classes, or the event bus, or the I/O classes. I can see a clear 
advantage in not having to bundle unused classes inside a completed application.

One could use Pro guard or other tools to 'trim' the final jars; but why do 
this in every project if it could be done inside Guava itself?

I can see an advantage in having a lower application size for example, with 
mobile applications.

However, I do not have solid facts to back up my suggestion. Therefore it 
remains only as such. But hopefully I got my point across.

Thank you for your time and help.

Original issue reported on code.google.com by jjzaz...@gmail.com on 11 Mar 2013 at 3:24

GoogleCodeExporter commented 9 years ago
We're kind of stuck the way we are: If we were to split the package at this 
point, Maven wouldn't recognize that guava-14.0 and guava-base-15.0 contain the 
same classes, so it would be more likely that people would end up with 
conflicting versions in their classpaths.

That said, we feel reasonably good about the choice we made. You mention some 
packages that are more rarely used -- math, eventbus, io. Users might benefit 
from excluding these, but there's likely to be even more value in stripping out 
whichever half of common.collect your particular application doesn't need, 
since common.collect is just so big. There's more discussion on issue 605.

Original comment by cpov...@google.com on 11 Mar 2013 at 3:34

GoogleCodeExporter commented 9 years ago
Issue 1471 has been merged into this issue.

Original comment by kak@google.com on 9 Jul 2013 at 8:17

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08