CodeBaseX / jarjar

Automatically exported from code.google.com/p/jarjar
0 stars 0 forks source link

Make jarjar'd classes unimportable #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In Guice we love jarjar. We transform com.google.common.collect.ImmutableMap to 
com.google.inject.internal.collect. ImmutableMap. But unfortunately, IDE users 
often import the 
wrong one. And then we change Guice, and bad things happen.

Could jarjar prefix the transformed classes with a dollarsign, to make then 
unimportable? If the FQN 
was com.google.inject.internal.collect.$ImmutableMap, then good times? This 
would also prevent 
the IDE from suggesting this class name for import.

Original issue reported on code.google.com by limpbizkit on 31 Dec 2008 at 7:10

GoogleCodeExporter commented 9 years ago
Agreed.

Original comment by chris.no...@gmail.com on 11 Jan 2009 at 4:33

GoogleCodeExporter commented 9 years ago
Should this not be a selectable option though, rather than a forced change?  It 
seems like if we are using jarjar to 
create, for example, two different versions of a java library to be used as lib 
jars in one single project, then we 
may actually WANT to be able to import some classes in a IDE.  Can't see any 
drawback to having an 
"unimportable=true" attribute somewhere in the build.xml file.
Just a suggestion,
Keep up the good work!

Original comment by jpsw...@gmail.com on 20 Oct 2009 at 4:41

GoogleCodeExporter commented 9 years ago
Assigning to me for implementation.

Original comment by dtnort...@gmail.com on 25 Apr 2013 at 9:44