Make jdk.jfr import optional in OSGi manifest#5092
Make jdk.jfr import optional in OSGi manifest#5092marcphilipp merged 6 commits intojunit-team:mainfrom
Conversation
Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>
marcphilipp
left a comment
There was a problem hiding this comment.
In general, I think it's good to make this consistent with the module descriptor. Please note that we might make it mandatory in the future at which point the JDK used needs to include the jdk.jfr module or add jfr-polyfill to their classpath.
| Import-Package: \ | ||
| ${importAPIGuardian},\ | ||
| ${importJSpecify},\ | ||
| ${importJdkJfr},\ |
There was a problem hiding this comment.
Please move these changes to the build script of junit-platform-launcher as they're specific to that module/bundle (see junit-platform-commons for an example).
There was a problem hiding this comment.
@marcphilipp I'm sadly not very familiar with gradle build scripts and looking at that build-script I'm not completely sure how to archive this, as that one adds an additional header and here we want to modify an existing definition. I could repeat the definition there but it seems a bit odd to maintain then.
Any suggestion?
There was a problem hiding this comment.
No worries! I pushed a few commits. I agree that modifying an existing definition is not as DRY as one would wish.
For consistency with its module descriptor. --------- Co-authored-by: Marc Philipp <mail@marcphilipp.de> (cherry picked from commit 729fc28)
|
Cherry-picked to |
For consistency with its module descriptor. --------- Co-authored-by: Marc Philipp <mail@marcphilipp.de> Signed-off-by: Ogu1208 <kdasunb6@gmail.com>
With the recent adoption of JUnit 6 we noticed that JUnit no longer can run on stripped down JVMs that are missing the flight recorder module because it has a mandatory import in the OSGi manifest.
As the flightrecorder integration seems optional, one might want to make the import of the package optional as well
I hereby agree to the terms of the JUnit Contributor License Agreement.
The content was generated by copilote here I squashed the commits, reviewed the result and found it being sane compared to how it was done for other optional imports. Please let me know if any adjustments are necessary as I'm not familiar with gradle.
Definition of Done
@APIannotations