[
https://issues.apache.org/jira/browse/GROOVY-12392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18113525#comment-18113525
]
ASF GitHub Bot commented on GROOVY-12392:
-----------------------------------------
codecov-commenter commented on PR #2915:
URL: https://github.com/apache/groovy/pull/2915#issuecomment-5608088451
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2915?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 71.1841%. Comparing base
([`9d91f7b`](https://app.codecov.io/gh/apache/groovy/commit/9d91f7b5533061f455123dad86af14eda01cdff8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`0d98cc2`](https://app.codecov.io/gh/apache/groovy/commit/0d98cc21687891d6896ebf4e370635e1215774f5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/groovy/pull/2915?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2915 +/- ##
==================================================
- Coverage 71.1893% 71.1841% -0.0052%
+ Complexity 37630 37626 -4
==================================================
Files 1581 1581
Lines 136255 136258 +3
Branches 25311 25311
==================================================
- Hits 96999 96994 -5
- Misses 30518 30520 +2
- Partials 8738 8744 +6
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2915?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...aus/groovy/tools/NativeImageMetadataGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/2915?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftools%2FNativeImageMetadataGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3Rvb2xzL05hdGl2ZUltYWdlTWV0YWRhdGFHZW5lcmF0b3IuamF2YQ==)
| `90.6542% <100.0000%> (+0.1329%)` | :arrow_up: |
|
[...in/java/org/codehaus/groovy/vmplugin/v9/Java9.java](https://app.codecov.io/gh/apache/groovy/pull/2915?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv9%2FJava9.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y5L0phdmE5LmphdmE=)
| `62.6016% <100.0000%> (+0.8130%)` | :arrow_up: |
... and [8 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2915/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests,
report on failures, and find test suite problems.
- :package: [JS Bundle
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save
yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
> NativeImageMetadataGenerator references deprecated-for-removal Java9
> --------------------------------------------------------------------
>
> Key: GROOVY-12392
> URL: https://issues.apache.org/jira/browse/GROOVY-12392
> Project: Groovy
> Issue Type: Bug
> Reporter: Daniel Sun
> Priority: Major
>
> h3. Context
> GROOVY-11906 deprecated {{org.codehaus.groovy.vmplugin.v9.Java9}} with
> {{forRemoval = true}} and made {{Java17}} the only {{VMPluginFactory}} entry
> point. GROOVY-12365 later added {{NativeImageMetadataGenerator}}, which still
> called {{Java9.class.getName()}} to register default-import class lookups
> ({{groovy.lang.GroovySystem}} and {{groovy.beans.ListenerList}}).
> Those names are loaded through {{GroovyClassLoader.loadClass}}, so they are
> not constant {{Class.forName}} arguments GraalVM can fold. The generator must
> emit {{typeReached}} metadata for them.
> h3. Problem
> {{compileJava}} with {{-Xlint:deprecation}} reports two {{removal}} warnings,
> which GitHub Actions surfaces as annotations:
> {noformat}
> NativeImageMetadataGenerator.java: warning: [removal] Java9 in
> org.codehaus.groovy.vmplugin.v9 has been deprecated and marked for removal
> addName(Java9.class.getName(), GroovySystem.class.getName(), NONE);
> NativeImageMetadataGenerator.java: warning: [removal] Java9 in
> org.codehaus.groovy.vmplugin.v9 has been deprecated and marked for removal
> addName(Java9.class.getName(), "groovy.beans.ListenerList", NONE);
> {noformat}
> Separately, {{Java9.checkAccessible}} looks up JDK 8 packages that are now
> concealed or exported-but-not-open with
> {{ConcurrentHashMap.computeIfAbsent}}. Callers only test {{contains()}}, so a
> miss inserts an empty mutable {{HashSet}} into a map that is otherwise filled
> once at class init.
> h3. Expected
> * Building groovy-core does not emit {{removal}} warnings for {{Java9}}.
> * Default-import reachability metadata is conditional on {{Java17}}, the
> plugin Groovy 6 actually constructs, and is generated as its own family
> rather than as a rider on invokedynamic metadata.
> * Unknown module names are not inserted into the package-list maps.
> h3. Proposed change
> * Register the two lookups under {{Java17.class.getName()}} in a dedicated
> {{defaultImportClassLookups()}} step of {{generate()}}.
> * Replace the two {{computeIfAbsent}} helpers with
> {{getOrDefault(module.getName(), Set.of())}}.
> h3. Related
> GROOVY-11906, GROOVY-12365
--
This message was sent by Atlassian Jira
(v8.20.10#820010)