Add OSGi runtime metadata to error-prone's MANIFEST.MF files by HannesWell · Pull Request #3903 · google/error-prone (original) (raw)
This was referenced
May 10, 2023
Bot pushed a commit to google/guice that referenced this pull request
Annotations with retention policy are ignored if they cannot be loaded at runtime (at least according to Stack-Overvflow). Make the dependency optional to not enforce the presence of error_prone_annotations in a java runtime even if those annotations are not used at all.
This is especially useful for OSGi-runtimes where you cannot exclude error_prone_annotations because the corresponding package is specified as mandatory requirement in the MANIFEST.MF. Marking the Maven dependency as optional will also result in the error-prone package requirement being marked as optional.
At the moment error_prone_annotations does not come with a OSGi compliant Manifest, which makes it harder to include it in OSGi applications like Eclipse. I already created a PR at error-prone to include the required OSGi headers (see google/error-prone#3903), but not requiring the annotations at all would make it even simpler to use guice within OSGi.
Alternatively the dependency could be marked as optional in the OSGi metadata.
Fixes #1739
COPYBARA_INTEGRATE_REVIEW=#1739 from HannesWell:optionalErrorproneAnnotations 86f9de0 PiperOrigin-RevId: 531531783
copybara-service Bot pushed a commit that referenced this pull request
As suggested in #2967 (comment) this PR aims to add OSGi runtime metadata to the error-prone jars.
It achieves this by employing the bnd-maven-plugin:bnd-process goal to generate the OSGi metadata, like the values of the Manifest headers Bundle-SymbolicName, Import-Package and Export-Package.
The schema used for Bundle-SymbolicName headers is based on the schema used for the Automatic-Module-Name in the error-prone-annotations artifact.
With this change additionally all other error-prone artifacts get a Automatic-Module-Name too.
@cushon can you please review this PR? If you have any question, I would be happy to answer them.
Fixes #2967
Fixes #3903
FUTURE_COPYBARA_INTEGRATE_REVIEW=#3903 from HannesWell:osgiMetadata f1ee0a4 PiperOrigin-RevId: 531653111
copybara-service Bot pushed a commit that referenced this pull request
As suggested in #2967 (comment) this PR aims to add OSGi runtime metadata to the error-prone jars.
It achieves this by employing the bnd-maven-plugin:bnd-process goal to generate the OSGi metadata, like the values of the Manifest headers Bundle-SymbolicName, Import-Package and Export-Package.
The schema used for Bundle-SymbolicName headers is based on the schema used for the Automatic-Module-Name in the error-prone-annotations artifact.
With this change additionally all other error-prone artifacts get a Automatic-Module-Name too.
@cushon can you please review this PR? If you have any question, I would be happy to answer them.
Fixes #2967
Fixes #3903
FUTURE_COPYBARA_INTEGRATE_REVIEW=#3903 from HannesWell:osgiMetadata f1ee0a4 PiperOrigin-RevId: 531653111
benkard pushed a commit to benkard/jgvariant that referenced this pull request
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| com.google.errorprone:error_prone_core (source) | minor | 2.19.1 -> 2.20.0 |
|
| com.google.errorprone:error_prone_annotations (source) | compile | minor | 2.19.1 -> 2.20.0 |
Release Notes
google/error-prone
v2.20.0: Error Prone 2.20.0
Changes:
- This release is compatible with early-access builds of JDK 21.
New Checkers:
InlineTrivialConstantUnnecessaryStringBuilderBanClassLoaderDereferenceWithNullBranchDoNotUseRuleChainLockOnNonEnclosingClassLiteralMissingRefasterAnnotationNamedLikeContextualKeywordNonApiType
Fixes issues: #2232, #2243, #2997, #3301, #3843, #3903, #3918, #3923, #3931, #3945, #3946
Full Changelog: google/error-prone@v2.19.1...v2.20.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this MR and you won't be reminded about these updates again.
- If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})