Skip to content

Make Java compatibility tests not depend on java-tck JAR#7489

Merged
greg-at-moderne merged 1 commit intomainfrom
greg-gradle-scan-check
Apr 28, 2026
Merged

Make Java compatibility tests not depend on java-tck JAR#7489
greg-at-moderne merged 1 commit intomainfrom
greg-gradle-scan-check

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

@greg-at-moderne greg-at-moderne commented Apr 28, 2026

What's changed?

Changing the internal Gradle configuration of Java compatibility tests.
Namely, the various Java version tests (8, 11, 17, 21, 25) when depending on java-tck, now they depend on the class files of that module, not a jar. JAR is not deterministic and prevents Gradle caching (unless some tricks are applied there).

What's your motivation?

Speed up CI in this project. These Java compatibility tests have no need to run in every single PR. They are bound to give the same output if nothing changed in the chain.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Apr 28, 2026
@greg-at-moderne greg-at-moderne changed the title Don't depend on java-tck JAR Make Java compatibility tests not depend on java-tck JAR Apr 28, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review April 28, 2026 10:45
Copy link
Copy Markdown
Member

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@greg-at-moderne greg-at-moderne merged commit 4361ba6 into main Apr 28, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-gradle-scan-check branch April 28, 2026 10:56
@timtebeek
Copy link
Copy Markdown
Member

Similarly I see this PR still triggered these two tasks; was that expected & necessary?

> Task :rewrite-python:pythonUpgradePip
Custom actions are attached to task ':rewrite-python:pythonUpgradePip'.
Caching disabled for task ':rewrite-python:pythonUpgradePip' because:
  Gradle would require more information to cache this task
Task ':rewrite-python:pythonUpgradePip' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Upgrading pip in virtual environment
Starting process 'command '/home/runner/work/rewrite/rewrite/rewrite-python/rewrite/.venv/bin/python''. Working directory: /home/runner/work/rewrite/rewrite/rewrite-python/rewrite Command: /home/runner/work/rewrite/rewrite/rewrite-python/rewrite/.venv/bin/python -m pip install --upgrade pip
Successfully started process 'command '/home/runner/work/rewrite/rewrite/rewrite-python/rewrite/.venv/bin/python''
Requirement already satisfied: pip in ./.venv/lib/python3.12/site-packages (24.0)
Collecting pip
  Downloading pip-26.1-py3-none-any.whl.metadata (4.6 kB)
Downloading pip-26.1-py3-none-any.whl (1.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 37.1 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed pip-26.1
Resolve mutations for :rewrite-python:pythonInstall (Thread[#160,Execution worker,5,main]) started.
:rewrite-python:pythonInstall (Thread[#160,Execution worker,5,main]) started.

> Task :rewrite-python:pythonInstall
Custom actions are attached to task ':rewrite-python:pythonInstall'.
Caching disabled for task ':rewrite-python:pythonInstall' because:
  Gradle would require more information to cache this task
Task ':rewrite-python:pythonInstall' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Installing Python package with pip
Starting process 'command '/home/runner/work/rewrite/rewrite/rewrite-python/rewrite/.venv/bin/pip''. Working directory: /home/runner/work/rewrite/rewrite/rewrite-python/rewrite Command: /home/runner/work/rewrite/rewrite/rewrite-python/rewrite/.venv/bin/pip install -e .[dev]
Successfully started process 'command '/home/runner/work/rewrite/rewrite/rewrite-python/rewrite/.venv/bin/pip''
Obtaining file:///home/runner/work/rewrite/rewrite/rewrite-python/rewrite

@greg-at-moderne
Copy link
Copy Markdown
Contributor Author

No it wasn't. That's another problem of the same kind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants