-
Notifications
You must be signed in to change notification settings - Fork 642
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
fix #920 OSGI: explicit SymbolicName and fix imports-exports #921
Conversation
- the `Import-Package` clause was missing an entry `io.netty.util.internal;version="[ 4.1,5)"` - the `Bundle-SymbolicName` clause was changed to project name instead of a more fully qualified name
cc @swimmesberger @simondaudin this one is a split off #915 that focuses on OSGI metadata content regressions due to switching to |
(copied from #915 discussion, let's continue discussion on the bnd configuration itself here @swimmesberger) |
@swimmesberger AFAIK we use |
I would say, that excluding |
@simonbasle thats because bnd respects everything on the classpath but if you would change the wildcard export "*" to simply: "reactor.netty.*" it would only consider packages starting with "reactor.netty". (except the internal one as we blacklisted that) Therefore with the suggestion applied it would be:
Bnd way of thinking is being as explicit as possible therefore broad wildcards are generally discouraged (except for imports as bnd is good in analyzing imports). Edit: I kind of wonder why we need to blacklist the "reactor.netty.internal" for imports anyway because "reactor.netty.internal" should be on the classpath when bnd calculates the imports therefore it should not consider it for imports? 🤔 |
ok it seems to do the trick for using
Right, so we don't want to expose that to the outside world, but since it is internal bnd shouldn't consider it in |
also remove reactor.netty.internal from Import-Package clause
Removing the exclude from |
Export-Package lists the packages you want to expose to the outer world and |
Codecov Report
@@ Coverage Diff @@
## 0.8.x #921 +/- ##
============================================
+ Coverage 66.54% 66.67% +0.12%
Complexity 1405 1405
============================================
Files 133 133
Lines 6523 6523
Branches 860 860
============================================
+ Hits 4341 4349 +8
+ Misses 1724 1718 -6
+ Partials 458 456 -2
Continue to review full report at Codecov.
|
ok @swimmesberger thanks for the help. I've updated the latest changes and here is what is generated for 0.8: Details
|
@swimmesberger @simondaudin barring more feedback from you I'll merge this in a couple hours, worst case scenario we can reopen a follow-up PR. thanks for your help 👍 |
@simonbasle the 0.8 manifest looks OK. If you provide a 0.9 manifest too I will take a quick final look over it 👍 |
@swimmesberger sure Shadow Jar MANIFEST
and here is the one of the original jar in 0.9: Original Jar MANIFEST
|
The shadowJar manifest looks good! For the original jar Manifest where the Thats probably a issue because for the original jar somehow the import In my opinion this blacklist is not needed because when bnd acts upon the shadowed jar class files there should be no Therefore removing the |
Indeed @swimmesberger, I tried that and the original has the import while the shaded correctly doesn't 👍 |
@simonbasle nice! Then we should be good to go 👍 |
@simonbasle Thank you for your work, it seems all good. |
Import-Package
clause was missing an entryio.netty.util.internal;version="[ 4.1,5)"
Bundle-SymbolicName
clause was changed to project name insteadof a more fully qualified name