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

ProcessResources stays UP-TO-DATE even though the files to process have changed #24698

Open
TWiStErRob opened this issue Apr 10, 2023 · 3 comments
Labels
a:bug has:reproducer Indicates the issue has a confirmed reproducer in:resource-handler resources files

Comments

@TWiStErRob
Copy link
Contributor

TWiStErRob commented Apr 10, 2023

Expected Behavior

After repro, tests fail because the content of the file changed due to it being processed now.

Current Behavior

After repro, test pass, same as in step 2, even though the contents of b.txt on the classpath should've changed, which means the expectation in the test is wrong and should fail.

gradlew cleanProcessResources test makes it fail correctly, but as we know "if you need to clean something, there's a bug in the build".

Context (optional)

Note: this looks eerily similar to #861, but it's a different issue, in this issue the files to process changes, not the contents of the properties.

Steps to Reproduce

  1. Clone https://github.com/TWiStErRob/repros/tree/main/gradle/processResources-filesMatching_up-to-date
  2. gradlew test - passes
  3. Change build.gradle.kts: uncomment the line "**/b.txt"
  4. gradlew test - observe pass/fail

Gradle version

6.5.1 (tried), 7.6.1 (tried), 8.0.2 (in repro)

Build scan URL (optional)

No response

Your Environment (optional)

No response

TWiStErRob added a commit to TWiStErRob/repros that referenced this issue Apr 10, 2023
@TWiStErRob TWiStErRob changed the title ProcessResources stays UP-TO-DATE even though the file to process have changed ProcessResources stays UP-TO-DATE even though the files to process have changed Apr 10, 2023
@ljacomet
Copy link
Member

Does it work with 7.6.1?

@TWiStErRob
Copy link
Contributor Author

TWiStErRob commented Apr 11, 2023

Yep reproes on 7.6.1 too, and reproes 6.5.1 too (needs some downgrades to DSL).

@ljacomet ljacomet added the in:resource-handler resources files label Apr 11, 2023
@jbartok jbartok added has:reproducer Indicates the issue has a confirmed reproducer and removed to-triage labels Apr 11, 2023
@jbartok jbartok removed their assignment Apr 11, 2023
@jbartok
Copy link
Member

jbartok commented Apr 11, 2023

Thank you for providing a valid reproducer.

The issue is in the backlog of the relevant team but this area of Gradle is currently not a focus one so it might take a while before a fix is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug has:reproducer Indicates the issue has a confirmed reproducer in:resource-handler resources files
Projects
None yet
Development

No branches or pull requests

3 participants