-
Notifications
You must be signed in to change notification settings - Fork 49
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
Setup java cache #300
Setup java cache #300
Conversation
Hi, thanks for the PR! This is very exciting, it looks like support for sbt was added recently :) Have you been using this feature in your projects? I ask because it seems there is still some WIP fixes for sbt so I am not sure how stable it is yet. Although, I think our custom cache step currently has the same bug 😅
Truthfully this project is shamefully lacking in tests. See #26. Because the plugin is self-hosting I try to dog-food as much as possible and I think that is sufficient in this case. |
One shortcoming of this change is that caching would no longer be supported for anyone who uses a specific GraalVM version, since that doesn't use the setup-java action. sbt-typelevel/github-actions/src/main/scala/org/typelevel/sbt/gha/WorkflowStep.scala Lines 39 to 45 in b496145
|
Sorry, one more question about this: is there any way to customize the cache key? This has been on the todo because we've been having problems with reliability of caching. See: |
@armanbilge Good point about the caching when graalvm is used. The action documentation for setup-graalvm does not mention support for a cache param. So, this PR will need to be changed to re-enable the cache action when only graalvm is used in the build. I use the setup-java caching in some of my projects but not for sbt since I use this sbt plugin. I'll have a closer look at the setup-java implementation to see if there are more issues. Customising the cache key may be an enhancement that could be added to setup-java. I might raise an issue in that project. |
Awesome. Thanks for your attention to detail, much appreciated! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for this! After doing some research I feel confident with this change.
I will fix caching for GraalVM in follow-up for #301.
Relates to sbt/sbt-github-actions#104
Sbt plugins are not my area of expertise. If someone could give me some pointers on how to add test coverage that would be great. https://github.com/pjfanning/sbt-typelevel/tree/setup-java-cache/github-actions currently has no src/test directory.