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

Switch from in- to excludes for resource inclusion #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lynxplay
Copy link
Contributor

@lynxplay lynxplay commented Mar 9, 2022

As nearly all resources found in the vanilla jar are desired to be
included in paper, an include list is not ideal. Instead, this commit
changes the copy resource tasks to an exclude-based filter.

@lynxplay lynxplay force-pushed the enhancement/switch-resources-to-excludes branch from 09fe510 to e20e0ad Compare March 9, 2022 20:27
@lynxplay
Copy link
Contributor Author

lynxplay commented Mar 9, 2022

Removed the extension as per jmp's suggestions. Consumers of paperweight hence may only edit this by directly editing the task.
I hope the map call is fine, as we don't need a flatMap to depend on anything.

@lynxplay lynxplay force-pushed the enhancement/switch-resources-to-excludes branch 2 times, most recently from 6907cc6 to c397481 Compare March 9, 2022 23:48
@lynxplay lynxplay marked this pull request as ready for review March 9, 2022 23:49
As nearly all resources found in the vanilla jar are desired to be
included in paper, an include list is not ideal. Instead, this commit
changes the copy resource tasks to an exclude-based filter.
@lynxplay lynxplay force-pushed the enhancement/switch-resources-to-excludes branch from c397481 to 9cc1c49 Compare March 9, 2022 23:50
@MiniDigger
Copy link
Member

as a sanity check, can you try to generate a before and after list of files that we include?

@lynxplay
Copy link
Contributor Author

I'll generate a diff 👍

@lynxplay
Copy link
Contributor Author

After building the re-obfuscated server using reobfJar for both paperweight 1.3.5 and this specific paperweight snapshot, extracting the output jar into old and new and running diff -r old/ new/ this is the output:

Only in new: flightrecorder-config.jfc
diff --color -r old/META-INF/MANIFEST.MF new/META-INF/MANIFEST.MF
4,5c4,5
< Implementation-Version: git-Paper-"e0b3f3f"
< Implementation-Vendor: 2022-03-07 14:39:52 -0800
---
> Implementation-Version: git-Paper-"952a43c"
> Implementation-Vendor: 2022-03-10 15:25:31 +0100
9,10c9,10
< Git-Branch: master
< Git-Commit: e0b3f3f
---
> Git-Branch: tmp/paperweight
> Git-Commit: 952a43c

The manifest changed as I stored my changes to paper to use paperweight in its own branch 👍
As expected the flight recorder is included.

@MiniDigger
Copy link
Member

nice, so no other files, perfect

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 this pull request may close these issues.

None yet

3 participants