Closed kennymacleod closed 6 years ago
Hello!
Thanks for the PR. However, I'm not entirely sure if this is the way to go. The problem: The classpath inhibition really is needed on JDK 9 in a modular context because the @Generated
annotation no longer exists. I'm wondering if the right way to go might be to instead put the inhibition inside a META-INF/versions/9/
section in the jar so that pre-JDK9 consumers don't get the inhibition. I don't actually know if that will work or not...
I don't disagree with that, but I don't think that immutables-vavr is where that problem should be solved. The classpath inhibition has nothing to do with the integration between vavr and immutables. If Java9+ users need the inhibition, then the immutables documentation describes how to add one in the consuming project.
Obviously, that's up to you, I'm happy as long as the inhibition gets removed for Java8.
I think you're right. I think this problem needs to be solved more generally in immutables
itself.
@elucash ^^ :smile:
@io7m sorry for delay, getting back to business, so basically 2.6.x address most of the issues if something is not working well, we'll fix it on Immutables side
Issue #21 describes a problem with the inhibit-classpath file that's bundled as part of
vavr-encodings.jar
, which results in Immutables suppressing the usage of any classes injavax.annotations
when generating code.This suppression is only really required when using Java9+ (which the project maven build requires), so I've moved the
inhibit-classpath
file fromvavr-encodings
tovavr-examples
. This allows the tests to pass under Java9, without forcing all consumers ofvavr-encodings.jar
to use the suppression.