-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(gradle): change run and bootRun to cacheable false #31287
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
View your CI Pipeline Execution ↗ for commit cb8f791.
☁️ Nx Cloud last updated this comment at |
bc657f0
to
fe0d975
Compare
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.
Pull Request Overview
This PR makes the Gradle run
and bootRun
tasks non-cacheable by replacing the hardcoded true
cache flag with a conditional check.
- Changed
target["cache"]
to useisCacheable(task)
instead of alwaystrue
- Added
isCacheable
helper to excluderun
andbootRun
tasks from caching
Comments suppressed due to low confidence (1)
packages/gradle/project-graph/src/main/kotlin/dev/nx/gradle/utils/TaskUtils.kt:314
- [nitpick] Consider adding unit tests for isCacheable to verify it returns false for 'run' and 'bootRun' tasks and true for other task names.
fun isCacheable(task: Task): Boolean {
packages/gradle/project-graph/src/main/kotlin/dev/nx/gradle/utils/TaskUtils.kt
Outdated
Show resolved
Hide resolved
packages/gradle/project-graph/src/main/kotlin/dev/nx/gradle/utils/TaskUtils.kt
Outdated
Show resolved
Hide resolved
fe0d975
to
cb8f791
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
currently, all tasks are cacheable
Expected Behavior
run and bootRun should not be cacheable
Related Issue(s)
Fixes #