-
-
Notifications
You must be signed in to change notification settings - Fork 83
woodstox-core
6.3/6.4 javac warning due to unexpected new dependency on aQute.bnd.annotation.Resolution
#163
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
Comments
That's odd, dependency is
which I thought would prevent this? |
That would only work for classes that are rarely used / not a core part of the API (and even then is a bit dodgy / needs very careful testing and doc of which packages/classes need aQute as a result). But while configuration such as optional dependencies will allow you to get it building, the bottom line is that if you have a class that depends on aQute then it will have a reference to aQute in the compiled .class files so will get compiler warnings (or errors) when people try to use it. There's no way round that - it'd be a major breaking change for woodstox to start referencing aQute like this. |
@ben-spiller Is this due to referencing value other than Annotation types? Handling of missing annotation types is special and should be safe. But I fear we have the same issue here as with jackson-core: and if so, yes, I suppose we better revert this addition here as well. Thank you for bringing this to my attention. I wish I had realized unfortunate side effects: the intent is definitely to keep Woodstox as close to zero-dependency as possible (beyond Stax API, optional MSV for validation). My thinking was that OSGi annotations would be that way too, but alas not. |
Correct, see my example above - merely referring to WstxInputFactory itself introduces the warning.
|
woodstox-core
6.3/6.4 javac warning due to unexpected new dependency on aQute.bnd.annotation.Resolution
Fixed via #164, will be in 6.5.0 release. |
6.5.0 released on January 14, 2023. |
Co-authored-by: Noble Paul <[email protected]>
The GH-155 fix released in v6.3.1 introduces a major regression in woodstox-core since any build with javac warnings-as-errors enabled (as per best practice) will now fail (unless the aQute library is on classpath, which it usually isn't).
Example (using Java 11):
... where WoodstoxBug.java can be any code that refers to any of the main woodstox classes e.g.
Requiring everyone to either disable warning checks or add an extra dependency on aQute would be a major compatibility break. The woodstox documentation states there is no mandatory dependency other than stax2, so could we get a fix that restores this?
The text was updated successfully, but these errors were encountered: