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

RemapJarTask leaves deleted files in the jar #1270

Closed
Juuxel opened this issue Mar 4, 2025 · 0 comments · Fixed by #1271
Closed

RemapJarTask leaves deleted files in the jar #1270

Juuxel opened this issue Mar 4, 2025 · 0 comments · Fixed by #1271

Comments

@Juuxel
Copy link
Member

Juuxel commented Mar 4, 2025

To reproduce from a template:

  1. Create src/main/resources/test.txt
  2. Run gradlew assemble (or build or remapJar)
  3. Delete src/main/resources/test.txt
  4. Run the same Gradle command again
  5. The deleted file is still in the jar!

This bug is caused by this change in e387514, which disabled the default Jar task behaviour for RemapJarTask due to changed task action ordering.

Unfortunately, the copy method is also responsible for deleting the old jar, which means that now TR just adds new and changed files into the jar but leaves all deleted files intact.

Juuxel added a commit to Juuxel/fabric-loom that referenced this issue Mar 4, 2025
Fixes FabricMC#1270. This changed isn't necessary for RemapSourcesJarTask
as SourceRemapperService already deletes the output.
Juuxel added a commit to architectury/architectury-loom that referenced this issue Mar 4, 2025
Fixes FabricMC#1270. This changed isn't necessary for
RemapSourcesJarTask as SourceRemapperService already deletes
the output.
Juuxel added a commit to Juuxel/fabric-loom that referenced this issue Mar 4, 2025
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 a pull request may close this issue.

1 participant