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

Add persistent cache for toolchain auto-detection mechanism #46

Closed

Conversation

vmadalin
Copy link
Owner

@vmadalin vmadalin commented Feb 12, 2024

Context

The Daemon toolchain auto-detection mechanism is part of Phase 1 of toolchain support for Gradle Daemon, where the motivation behind it and other technical details can be found on the public spec document. This PR implements the persistent cache for the toolchain auto-detection mechanism by adding indexed cache on CachingJvmMetadataDetector storing the JvmInstallationMetadata resolved object based on toolchain installation path. This cache is a VersionStrategy.CachePerVersion allowing to have a separate cache instance for each Gradle version that are stored under Gradle User Home directory.

Testing

Unit tests:

Integration tests

Demo

Simple demo exposing how persistent cache for toolchain auto-detection mechanism works:

persistent.cache.toolchain.auto-detection.mov

Contributor Checklist

  • Review Contribution Guidelines
  • Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
  • Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
  • Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
  • Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective
  • Provide unit tests (under <subproject>/src/test) to verify logic
  • Update User Guide, DSL Reference, and Javadoc for public-facing changes
  • Ensure that tests pass sanity check: ./gradlew sanityCheck
  • Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest

@vmadalin vmadalin changed the title Add persistent cache toolchain auto-detection mechanism Add persistent cache for toolchain auto-detection mechanism Feb 12, 2024
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cache branch from f42d46e to a858020 Compare February 12, 2024 15:01
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cli branch 2 times, most recently from af91d0f to f0edcae Compare February 12, 2024 15:42
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cache branch 5 times, most recently from 62ae7dc to 9efdb91 Compare February 13, 2024 13:53
@vmadalin vmadalin marked this pull request as ready for review February 13, 2024 15:02
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cache branch 2 times, most recently from 28b4319 to 0ec24d9 Compare February 20, 2024 16:19
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cache branch 5 times, most recently from cafc99a to 3f389e8 Compare February 26, 2024 14:11
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cli branch from d43dc17 to 9468067 Compare February 26, 2024 14:32
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cache branch 2 times, most recently from 7a50a52 to fdc598e Compare February 26, 2024 15:57
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cli branch from 8e35f44 to 08a0932 Compare February 28, 2024 18:40
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If you don't want the stale bot to close it, then set a milestone for it.

@github-actions github-actions bot added the stale label Mar 29, 2024
@vmadalin vmadalin removed the stale label Apr 1, 2024
@vmadalin vmadalin changed the base branch from feature/daemon-toolchain-auto-detection-cli to release April 16, 2024 11:54
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cache branch 4 times, most recently from 1fb0d6d to 7671ab2 Compare April 28, 2024 18:49
…ector

Signed-off-by: Madalin Valceleanu <vmadalin@google.com>
@vmadalin vmadalin force-pushed the feature/daemon-toolchain-auto-detection-cache branch from 7671ab2 to 8777b5f Compare April 28, 2024 21:00
@vmadalin
Copy link
Owner Author

vmadalin commented May 1, 2024

Closing PR since this was created directly on Gradle gradle#28966 after addressing merge conflicts with partially merged Daemon toolchain implementation in 8.8

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

1 participant