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

Please add Automatic-Module-Name manifest entries #89

Closed
io7m opened this Issue Dec 8, 2017 · 16 comments

Comments

Projects
None yet
3 participants
@io7m

io7m commented Dec 8, 2017

Hello!

It'd be great if fastutil published Automatic-Module-Name entries in the jar manifest for each module. This would assign the modules stable names to be used in (modular) Java 9 projects.

Of course, full modularization would be better, but that'd involve generating a rather enormous module-info.java file to export all of the hundreds of packages.

@io7m io7m referenced this issue Dec 8, 2017

Closed

Finish modularization #8

@vigna

This comment has been minimized.

Owner

vigna commented Jan 29, 2018

Is that compatible with Java 8? Sorry but I'm entirely unfamiliar with the modularization feature.

@io7m

This comment has been minimized.

io7m commented Jan 29, 2018

Hi.

Yes, it's completely ignored on JDKs prior to 9. Essentially, it's a way of saying "This is the module name that I'll be using in the future if I ever modularize the code". It allows people to specify stable dependencies on your code from Java 9 projects without you actually having to publish full modules.

@kashike

This comment has been minimized.

Contributor

kashike commented Apr 26, 2018

#95

@io7m

This comment has been minimized.

io7m commented May 19, 2018

Thanks for merging that in.

Any chance you could push a new release?

io7m added a commit to io7m/jptbox that referenced this issue May 19, 2018

Initial modularization
This uses a filename-based automodule because there has not yet been
a release of the fastutil package that has a real module name.

See vigna/fastutil#89
@vigna

This comment has been minimized.

Owner

vigna commented May 28, 2018

Released with 8.2.0.

@vigna vigna closed this May 28, 2018

@io7m

This comment has been minimized.

io7m commented May 28, 2018

Thanks!

@io7m

This comment has been minimized.

io7m commented May 28, 2018

Hm, checking today, something seems to have gone wrong somewhere. The 8.2.0 jars don't seem to have the manifest header:

$ wget -O fastutil-8.2.0.jar http://search.maven.org/remotecontent?filepath=it/unimi/dsi/fastutil/8.2.0/fastutil-8.2.0.jar
--2018-05-28 21:53:52--  http://search.maven.org/remotecontent?filepath=it/unimi/dsi/fastutil/8.2.0/fastutil-8.2.0.jar
Proxy request sent, awaiting response... 200 OK
Length: 18800399 (18M) [application/java-archive]
Saving to: ‘fastutil-8.2.0.jar’

fastutil-8.2.0.jar                100%[============================================================>]  17.93M  1018KB/s    in 25s     

2018-05-28 21:54:17 (734 KB/s) - ‘fastutil-8.2.0.jar’ saved [18800399/18800399]

$ unzip -p fastutil-8.2.0.jar META-INF/MANIFEST.MF
Manifest-Version: 1.0
Bnd-LastModified: 1527515258573
Bundle-ManifestVersion: 2
Bundle-Name: it.unimi.dsi.fastutil
Bundle-SymbolicName: it.unimi.dsi.fastutil
Bundle-Version: 8.2.0
Created-By: 10.0.1 (Oracle Corporation)
Export-Package: it.unimi.dsi.fastutil;uses:="it.unimi.dsi.fastutil.ints,
 it.unimi.dsi.fastutil.longs";version="8.2.0",it.unimi.dsi.fastutil.bool
 eans;uses:="it.unimi.dsi.fastutil,it.unimi.dsi.fastutil.objects";versio
 n="8.2.0",it.unimi.dsi.fastutil.bytes;uses:="it.unimi.dsi.fastutil,it.u
 nimi.dsi.fastutil.booleans,it.unimi.dsi.fastutil.chars,it.unimi.dsi.fas
 tutil.doubles,it.unimi.dsi.fastutil.floats,it.unimi.dsi.fastutil.ints,i
 t.unimi.dsi.fastutil.longs,it.unimi.dsi.fastutil.objects,it.unimi.dsi.f
 astutil.shorts";version="8.2.0",it.unimi.dsi.fastutil.chars;uses:="it.u
 nimi.dsi.fastutil,it.unimi.dsi.fastutil.booleans,it.unimi.dsi.fastutil.
 bytes,it.unimi.dsi.fastutil.doubles,it.unimi.dsi.fastutil.floats,it.uni
 mi.dsi.fastutil.ints,it.unimi.dsi.fastutil.longs,it.unimi.dsi.fastutil.
 objects,it.unimi.dsi.fastutil.shorts";version="8.2.0",it.unimi.dsi.fast
 util.doubles;uses:="it.unimi.dsi.fastutil,it.unimi.dsi.fastutil.boolean
 s,it.unimi.dsi.fastutil.bytes,it.unimi.dsi.fastutil.chars,it.unimi.dsi.
 fastutil.floats,it.unimi.dsi.fastutil.ints,it.unimi.dsi.fastutil.longs,
 it.unimi.dsi.fastutil.objects,it.unimi.dsi.fastutil.shorts";version="8.
 2.0",it.unimi.dsi.fastutil.floats;uses:="it.unimi.dsi.fastutil,it.unimi
 .dsi.fastutil.booleans,it.unimi.dsi.fastutil.bytes,it.unimi.dsi.fastuti
 l.chars,it.unimi.dsi.fastutil.doubles,it.unimi.dsi.fastutil.ints,it.uni
 mi.dsi.fastutil.longs,it.unimi.dsi.fastutil.objects,it.unimi.dsi.fastut
 il.shorts";version="8.2.0",it.unimi.dsi.fastutil.ints;uses:="it.unimi.d
 si.fastutil,it.unimi.dsi.fastutil.booleans,it.unimi.dsi.fastutil.bytes,
 it.unimi.dsi.fastutil.chars,it.unimi.dsi.fastutil.doubles,it.unimi.dsi.
 fastutil.floats,it.unimi.dsi.fastutil.longs,it.unimi.dsi.fastutil.objec
 ts,it.unimi.dsi.fastutil.shorts";version="8.2.0",it.unimi.dsi.fastutil.
 io;uses:="it.unimi.dsi.fastutil.booleans,it.unimi.dsi.fastutil.bytes,it
 .unimi.dsi.fastutil.chars,it.unimi.dsi.fastutil.doubles,it.unimi.dsi.fa
 stutil.floats,it.unimi.dsi.fastutil.ints,it.unimi.dsi.fastutil.longs,it
 .unimi.dsi.fastutil.shorts";version="8.2.0",it.unimi.dsi.fastutil.longs
 ;uses:="it.unimi.dsi.fastutil,it.unimi.dsi.fastutil.booleans,it.unimi.d
 si.fastutil.bytes,it.unimi.dsi.fastutil.chars,it.unimi.dsi.fastutil.dou
 bles,it.unimi.dsi.fastutil.floats,it.unimi.dsi.fastutil.ints,it.unimi.d
 si.fastutil.objects,it.unimi.dsi.fastutil.shorts";version="8.2.0",it.un
 imi.dsi.fastutil.objects;uses:="it.unimi.dsi.fastutil,it.unimi.dsi.fast
 util.booleans,it.unimi.dsi.fastutil.bytes,it.unimi.dsi.fastutil.chars,i
 t.unimi.dsi.fastutil.doubles,it.unimi.dsi.fastutil.floats,it.unimi.dsi.
 fastutil.ints,it.unimi.dsi.fastutil.longs,it.unimi.dsi.fastutil.shorts"
 ;version="8.2.0",it.unimi.dsi.fastutil.shorts;uses:="it.unimi.dsi.fastu
 til,it.unimi.dsi.fastutil.booleans,it.unimi.dsi.fastutil.bytes,it.unimi
 .dsi.fastutil.chars,it.unimi.dsi.fastutil.doubles,it.unimi.dsi.fastutil
 .floats,it.unimi.dsi.fastutil.ints,it.unimi.dsi.fastutil.longs,it.unimi
 .dsi.fastutil.objects";version="8.2.0"
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Tool: Bnd-2.4.0.201411031536
@vigna

This comment has been minimized.

Owner

vigna commented May 28, 2018

@io7m

This comment has been minimized.

io7m commented May 28, 2018

It actually wasn't my PR, but I'll take a look now.

@vigna

This comment has been minimized.

Owner

vigna commented May 28, 2018

@io7m

This comment has been minimized.

io7m commented May 28, 2018

It's no trouble, I have an interest in making sure this works. It would have been my PR if @kashike hadn't beat me to it!

@io7m

This comment has been minimized.

io7m commented May 28, 2018

OK, I've verified that if I do make sources && ant jar, that results in a jar file that looks like this:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.7
Created-By: 10.0.1+10 (Oracle Corporation)
Automatic-Module-Name: it.unimi.dsi.fastutil

But I notice a distinct lack of OSGi metadata in there... Is there some other step you normally run when you make a release? I'm guessing whatever other steps you take have the effect of overwriting the manifest.

@vigna

This comment has been minimized.

Owner

vigna commented May 28, 2018

@vigna

This comment has been minimized.

Owner

vigna commented May 28, 2018

So, it seems like fastutil.bnd should include the automatic module thing. Let me try to temporarily stage a new jar and see whether the module stuff gets in.

@vigna

This comment has been minimized.

Owner

vigna commented May 28, 2018

It seems like it's in. Please wait a couple of hours and try 8.2.1 on Central.

@io7m

This comment has been minimized.

io7m commented May 29, 2018

Yep, can confirm, 8.2.1 has the Automatic-Module-Name header. Thanks very much!

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