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

Support Gradle build cache when using absolute path references #13671

Merged
merged 7 commits into from
Oct 17, 2022

Conversation

erichaagdev
Copy link
Contributor

@erichaagdev erichaagdev commented Oct 11, 2022

This PR marks several file/directory task input properties of the GenerateTask as either @InputFile or @InputDirectory and @PathSensitive(PathSensitivity.RELATIVE).

This enables the following:

  • GenerateTask will not be considered UP-TO-DATE when the contents of one of these files or directories changes
  • GenerateTask will reuse outputs from the build cache when using absolute file path property values and when running from a different directory

fixes #10214
fixes #11808
fixes #13663

Gradle Build Scan: https://scans.gradle.com/s/dp2plkit3wcxo

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (6.1.0) (minor release - breaking changes with fallbacks), 7.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

(cherry picked from commit 46c96daf3b020ab02e13113166046d2383c04990)
(cherry picked from commit 5d09d914ba7224b82dd7a3bd20beaf2b6fd3eb94)
(cherry picked from commit 8d9e0dbb9d865ad3e61b60692b3ef6ca85b70b75)
(cherry picked from commit ba1d554c375068974d1799d6be6731ca1d59a783)
(cherry picked from commit 18da6161ba2b406876c516a3059850d9a0bc9ca0)
(cherry picked from commit 4670db92686c02d5dd2b69976488c33defd3a464)
(cherry picked from commit 9150b4a5596b229a4404a92cfedbb795c6bb5b0d)
@erichaagdev
Copy link
Contributor Author

I'm not sure why CI failed, but it seems unrelated to my changes.

@erichaagdev
Copy link
Contributor Author

@wing328 would you be able to look at this? Thank you!

@wing328
Copy link
Member

wing328 commented Oct 17, 2022

Restarted the job and all tests passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants