guava icon indicating copy to clipboard operation
guava copied to clipboard

Jar manifest missing Implementation-Version

Open hakanai opened this issue 8 years ago • 4 comments

Libraries like log4j2 use Implementation-Version to determine which version of a library is use when logging stack traces.

The manifest inside guava's jar is currently lacking this property.

hakanai avatar Jul 06 '17 00:07 hakanai

Hopefully Ron is more familiar with this. I did find https://stackoverflow.com/a/27824549/28465 in some quick searching, plus the docs: https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html

cpovirk avatar Jul 06 '17 15:07 cpovirk

What's the difference between Specification-Version and Implementation-Version?

What's the expected value for Implementation-Version for log4j2 and what does it need it for with-respect-to Guava (how would that change what is logged)?

ronshapiro avatar Jul 06 '17 15:07 ronshapiro

I found https://github.com/apache/logging-log4j2/blob/7fdca4ff159a4923949b45c33fd4601926be5ffc/src/site/xdoc/manual/layouts.xml.vm#L1617. It sounds like this would just include the Guava version in the stack trace?

ronshapiro avatar Jul 06 '17 15:07 ronshapiro

Yep, that's exactly what it's about. It would log [guava.jar:21.0.0] instead of [guava.jar:?], so it somewhat improves diagnostics.

Specification-Version and Implementation-Version are going to be the same here, I assume, although I think that over here, we chop the last number off the version number for the Specification-Version to indicate compatibility semantics.

hakanai avatar Jul 07 '17 04:07 hakanai