Skip to content
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

Migrate to JaCoCo 0.8.11 #3147

Merged
merged 1 commit into from Oct 18, 2023
Merged

Conversation

valfirst
Copy link
Contributor

@valfirst valfirst commented Oct 16, 2023

Bump JaCoCo to fix compatibility with the latest Java versions: https://github.com/jacoco/jacoco/releases

Checklist

  • Read the contributing guide
  • PR should be motivated, i.e. what does it fix, why, and if relevant how
  • If possible / relevant include an example in the description, that could help all readers
    including project members to get a better picture of the change
  • Avoid other runtime dependencies
  • Meaningful commit history ; intention is important please rebase your commit history so that each
    commit is meaningful and help the people that will explore a change in 2 years
  • The pull request follows coding style
  • Mention Fixes #<issue number> in the description if relevant
  • At least one commit should mention Fixes #<issue number> if relevant

@valfirst valfirst mentioned this pull request Oct 16, 2023
8 tasks
@TimvdLippe
Copy link
Contributor

Not sure why a bump of Jacoco would start failing these tests. It might be that they have always been flaky and that they rely on ordering. Do you mind debugging locally what is going on here and if you can reproduce the same issues with the same Jacoco version, but with different ordering?

@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (fd62884) 85.52% compared to head (d74808b) 85.50%.

❗ Current head d74808b differs from pull request most recent head 56b47c0. Consider uploading reports for the commit 56b47c0 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3147      +/-   ##
============================================
- Coverage     85.52%   85.50%   -0.02%     
  Complexity     2912     2912              
============================================
  Files           333      333              
  Lines          8856     8858       +2     
  Branches       1095     1096       +1     
============================================
  Hits           7574     7574              
- Misses          994      995       +1     
- Partials        288      289       +1     
Files Coverage Δ
...kito/internal/util/reflection/LenientCopyTool.java 90.47% <60.00%> (-9.53%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@valfirst valfirst force-pushed the bump-jacoco-0-8-11 branch 2 times, most recently from 56b47c0 to d74808b Compare October 17, 2023 12:19
@valfirst
Copy link
Contributor Author

@TimvdLippe the root cause of failures is this change in JaCoCo: jacoco/jacoco@b865890. org.mockito.internal.util.reflection.ReflectionMemberAccessor#silentSetAccessible doesn't work without JVM flags opening packages (on Java 17).

So my question is: what should strategy be around this problem? is it ok to add flags for unit tests or is there any other global solution required?

@TimvdLippe
Copy link
Contributor

@raphw I think adding these flags for our tests is okay, but what do you think?

@raphw
Copy link
Member

raphw commented Oct 17, 2023

I think so, yes. I'd go for it.

@valfirst valfirst changed the title Bump JaCoCo from 0.8.8 to 0.8.11 Migrate to JaCoCo 0.8.11 Oct 17, 2023
@valfirst
Copy link
Contributor Author

CI is green, one job fails at Codecov upload:

Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

@valfirst valfirst mentioned this pull request Oct 17, 2023
8 tasks
@TimvdLippe TimvdLippe merged commit c574cea into mockito:main Oct 18, 2023
12 of 13 checks passed
@valfirst valfirst deleted the bump-jacoco-0-8-11 branch October 18, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants