Skip to content

build: update patching rules for mockito#128

Merged
jjohannes merged 3 commits intomainfrom
modify-mockito-module-patching-to-be-compatible-with-new-version
Mar 5, 2025
Merged

build: update patching rules for mockito#128
jjohannes merged 3 commits intomainfrom
modify-mockito-module-patching-to-be-compatible-with-new-version

Conversation

@PavelSBorisov
Copy link
Copy Markdown
Member

Description:

Mockito 5.16.0 adds support for java module info and PRs
for the version update are failing tests so I am opening this PR to add preserveExisting() (opted for this approach in order to allow backwards compatibility since I am not a 100% sure that all repos that use mockito are updated to the new version)
Related issue(s):

Fixes #

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: PavelSBorisov <pavel.s.borisov@gmail.com>
@PavelSBorisov PavelSBorisov requested a review from jjohannes March 5, 2025 14:05
@PavelSBorisov PavelSBorisov self-assigned this Mar 5, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 5, 2025

JUnit Test Report

69 tests  ±0   69 ✅ ±0   7m 20s ⏱️ - 9m 25s
14 suites ±0    0 💤 ±0 
14 files   ±0    0 ❌ ±0 

Results for commit cc1c259. ± Comparison against base commit 4f6bc48.

♻️ This comment has been updated with latest results.

@jjohannes
Copy link
Copy Markdown
Contributor

@PavelSBorisov my take on this is to remove the rule. We have done this similarly for other cases in the past. Reasoning:

  • we want to get the patch list smaller asap
  • all projects using this list are on recent versions of all libraries now
  • Mockito is "only" a testing dependency. Updating it should not be critical
  • In any case, a change is never rolled out automatically. Projects explicitly need to update the plugins. They can update the plugin and Mockito version together.

Signed-off-by: PavelSBorisov <pavel.s.borisov@gmail.com>
@PavelSBorisov
Copy link
Copy Markdown
Member Author

@PavelSBorisov my take on this is to remove the rule. We have done this similarly for other cases in the past. Reasoning:

  • we want to get the patch list smaller asap
  • all projects using this list are on recent versions of all libraries now
  • Mockito is "only" a testing dependency. Updating it should not be critical
  • In any case, a change is never rolled out automatically. Projects explicitly need to update the plugins. They can update the plugin and Mockito version together.

@jjohannes alright then, I've removed the rules altogether.

@PavelSBorisov PavelSBorisov changed the title build: add preserveExisting() to mockito JPMS patching build: update patching rules for mockito Mar 5, 2025
@jjohannes
Copy link
Copy Markdown
Contributor

The "still a bit shaky" test for the JPMS rules is now failing. But that's a problem in the test setup. I will have a look at that.

This is require, as older versions are pulled in transitively by
'io.github.json-snapshot:json-snapshot' for which we still have a rule.

Signed-off-by: Jendrik Johannes <jendrik.johannes@gmail.com>
@jjohannes jjohannes merged commit f215127 into main Mar 5, 2025
6 checks passed
@jjohannes jjohannes deleted the modify-mockito-module-patching-to-be-compatible-with-new-version branch March 5, 2025 16:54
@jjohannes jjohannes added this to the v0.3.6 milestone Mar 5, 2025
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.

2 participants