2cdc18a initial windows support, use start-patches endp... - MiniDigger
#paperweight
1 messages · Page 2 of 1
7a126d6 Rename props and fix file separators properly - jpenilla
63b028a move PatchSelectionStrategy factory method - jpenilla
98a37bd Only revert rejected patch if target file exists - lynxplay
b5b6db7 Some logging and todo changes - lynxplay
0f4e30a Do not write diff patch rejects during update - lynxplay
ae93a00 Configurable patch selection size - lynxplay
0603233 Option to reapply patches incase of fail - Owen1212055
04f42b9 Apply each roulette patch individually - lynxplay
[1df84e6](https://github.com/PaperMC/paperweight/commit/1df84e6e2b4328c268868d7c35b4f60...
c05653f Implement Patch Roulette and Git history recons... - jpenilla
[PaperMC/paperweight] branch deleted: updating-history
[PaperMC/paperweight] branch deleted: update-productive
[PaperMC/paperweight] New tag created: v2.0.0-beta.15
:broom: Chores
- back to 2.0.0-SNAPSHOT - 8252aca
Commits
- cb38bbc: Add info log for each userdev setup work node's input hash (Jason Penilla)
- 44ab556: Add Gradle property to configure default min fuzz for fuzzy DiffPatch apply (Jason Penilla)
- c8cac5e: Skip copying in already-existing library imports for forks (Jason Penilla)
- c05653f: Implement Patch Roulette and Git history reconstruction for Minecraft updates (Jason Penilla) (#284)
- Version 2.0.0-beta.15 - cd05187
[PaperMC/paperweight] New branch created: bugfix/allow-fetching-sha1-from-paper-upstream
75e5007 Allow oldPaper fetching from reachable sha1 - lynxplay
Git servers by default do not offer the capability to reach available
sha1 hashes during a fetch request. Setting up the old paper repository
hence only worked if the requested sha1 is the HEAD of a locally fetched
branch.
The commit temporarily enables the allowreachablesha1inwant git option
for the local paper repository, enabling the single depth fetch of any
reachable sha1 for the oldPaper git repo.
confirmed working on windows
58a11b3 Allow oldPaper fetching from reachable sha1 (#287) - lynxplay
[PaperMC/paperweight] branch deleted: bugfix/allow-fetching-sha1-from-paper-upstream
[PaperMC/paperweight] New tag created: v2.0.0-beta.16
:broom: Chores
- back to 2.0.0-SNAPSHOT - 77eaa19
Commits
- 58a11b3: Allow oldPaper fetching from reachable sha1 (Bjarne Koll) (#287)
- Version 2.0.0-beta.16 - 842716a
When applying userdev to a project with a dependencyResolutionManagement { repositories { ... } } block, these will be discarded and only maven central and the paper repo will be added. MRE: https://github.com/radstevee/paperweight-mre
pw-mre:main: Could not find net.radstevee.packed:packed-core:1.0.3.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/net/radstevee/packed/packed-core/1.0.3/packed-core-1.0.3.pom
- https://repo.papermc.io/repository/maven-public/net/radstevee/packed/packed-core/1.0.3/packed-core-1.0.3.pom
Required by:
root project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
userdev adds repos to Projects to implement it's functionality. So this is expected behavior with the default repositories mode and central declaration: https://docs.gradle.org/current/userguide/centralizing_repositories.html#sec:repositories-mode.
In the future I'd like to implement a settings plugin that can add the repos centrally for compatibility with PREFER_SETTINGS and FAIL_ON_PROJECT_REPOS, and better flexibility with PREFER_PROJECT. But this would require a non-trivial rework.
The current technique to work with PREFER_PROJECT would be creating a custom plugin (with an included build or buildSrc) that adds your repos and is applicable to Settings or Project instances. Then you would apply the plugin in settings and your userdev projects. You would probably also want to disable injecting the Paper repo on the paperweight extension if you declare Paper in your central repo list.
This way projects without repos defined will use the settings repos, and userdev project...
Incubating APIs are subject to change in any version, without backwards compatibility. Given that Paperweight can co-exist with other MC plugins, I would appreciate it if it wasn't tied to the exact version it was built on. Other MC plugins frequently require the most recent version of Gradle, and being unable to upgrade Paperweight could lock us out of being able to update at all.
In particular, PaperweightUserdev.kt uses an incubating API that changed in 8.13, to continue using it with that version, Paperweight's baseline Gradle version must also be set to 8.13. This can work, but it's a lot more effort to keep updating it when it's an API that's being iterated on by Gradle currently. It would be better to not use this until it's stable.
I would accept using incubating APIs if everything worked on the...
[PaperMC/paperweight] New branch created: optional-reobf
Comment out the build data ref and or the pkg ver in the spigot extension to disable (or manually set the enabled prop)
22a3f86 Improve userdev error when attempting to reobf ... - jpenilla
63fd939 feat(core/userdev): Make reobf optional (#290) - jpenilla
[PaperMC/paperweight] branch deleted: optional-reobf
[PaperMC/paperweight] branch deleted: renovate/configure
[PaperMC/paperweight] branch deleted: renovate/jst
832e9eb fix(deps): update dependency com.gradleup.shado... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-8.x
[PaperMC/paperweight] branch deleted: renovate/asm
8fb37c9 fix(deps): update dependency net.fabricmc:tiny-... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/tinyremapper
cb07326 fix(deps): update dependency com.google.code.gs... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.google.code.gson-gson-2.x
1a04379 fix(deps): update dependency com.diffplug.spotl... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.diffplug.spotless-spotless-plugin-gradle-6.x
Hello, im currently running Gradle 8.13 with io.papermc.paperweight.userdev 2.0.0-beta.16.
Some time ago, and now again I ran into a specific issue during building a plugin, while the :reobfJar task runs:
<details>
<summary>io.papermc.paperweight.PaperweightException: Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1.</summary>
Execution failed for task ':reobfJar'.
> io.papermc.paperweight.PaperweightException: Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: G:\dev\Cubix\.gradle\caches\paperweight\taskCache\reobfJar.log Classpath: C:\Users\fruxz\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.10.4\d78e8e115ba5ac99421ce2d5e84e88b91a5f08b7\tiny-remapper-0.10.4-fat.jar
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for t...
You would need to look at the log file
I just looked at the reobfJar.log (wanted to do that first, but forgot :/) and it logged:
<details>
<summary>reobfJar.log</summary>
Command: C:\Program Files\Eclipse Adoptium\jdk-21.0.5.11-hotspot\bin\java.exe -Xmx1G -classpath C:\Users\fruxz\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.10.4\d78e8e115ba5ac99421ce2d5e84e88b91a5f08b7\tiny-remapper-0.10.4-fat.jar net.fabricmc.tinyremapper.Main G:\dev\Cubix\build\libs\Cubix-0.6-all.jar G:\dev\Cubix\build\libs\Cubix-0.6-reobf.jar G:\dev\Cubix\.gradle\caches\paperweight\taskCache\reobfMappings.tiny mojang spigot G:\dev\Cubix\.gradle\caches\paperweight\taskCache\mappedServerJar.jar --threads=1
Exception in thread "main" java.util.concurrent.CompletionException: java.lang.RuntimeException: error analyzing /META-INF/versions/23/module-info.class from G:\dev\Cubix\build\libs\Cubix-0.6-all.jar
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.co...
Something is providing a java 23 class, the version of tinyremapper in use doesn't support that, I think you might be able to specify a newer version of tinyremapper if one exists
Using 2.0.0-beta.16, I am not able to get the reobfArtifactConfiguration configuration working in the Groovy syntax:
I tried:
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.Companion.REOBF_PRODUCTION
import io.papermc.paperweight.userdev.ReobfArtifactConfiguration / import io.papermc.paperweight.userdev.ReobfArtifactConfiguration.Companion
Error: > Could not get unknown property 'io'
I found this other similar issue https://github.com/PaperMC/paperweight/issues/243 but neither the workaround nor the newer version do not seem to work for me. Any idea?
Cannot reproduce.
plugins {
id('java')
id('io.papermc.paperweight.userdev') version '2.0.0-beta.16'
}
dependencies {
paperweight.paperDevBundle("1.21.5-R0.1-SNAPSHOT")
}
paperweight {
reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.Companion.REOBF_PRODUCTION
}
I'm not totally against adding even more code to improve the Groovy UX, but it should be noted that Kotlin has been the default Gradle build script language for some time now, so it's advisable to get familiar with it even if you plan to keep using Groovy scripts.
paperweight {
reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.Companion.REOBF_PRODUCTION
}
Okay, odd: Seems like I only run into this issue when this code is placed in a shared gradle script that is then applied in the project's actual build script via apply from: rootProject.file('modules/shared/nmsModulePaper.gradle')
The plan is to reuse the common logic of the script across various projects where the only difference is the paper version.
Could not get unknown property 'io' for extension 'paperweight' of type io.papermc.paperweight.userdev.PaperweightUserExtension.
If I copy the code from the shared script exactly as it is there into the project's gradle file directly, it starts working. Using Gradle wrapper 8.13.
I'm not totally against adding even more code to improve the Groovy UX, but it should be noted that Kotlin has been the default Gradle build script language for some time now, so it's advisable to get familiar w...
[PaperMC/paperweight] New branch created: feature/force-select-patches
ebbd69b Allow selecting exactly n patches during roulette - lynxplay
The package local implementation of the selection strategy works well
for large updates as single packages offer a great "unit" of patches to
work on.
When updating paper to specific snapshots on a weekly basis, generally
the amount of non-applicable patches is a lot lower. Being restricted to
a package in this case is bad dx, as most time is spent selecting more
patches and finishing them, when 10 patches would be a much better
"unit" of patches than a package with a single failed patch.
Hello.Task :jetpacks:paperweightUserdevSetup FAILEDFAILURE: Build failed with an exception. Same error
I’m encountering this error while compiling an addon for a plugin. No one has been able to resolve the issue, and we don’t know the cause. Please help with this matter. I will provide you with the necessary files.
Looks like you’re either running an old java version or the broken build of 21. Update java and tey again
Prefer to use the Discord for troubleshooting and questions, we use the issue tracker to manage actual issue reports and feature requests.
Some comments outlining the format for selectors would be good
Is there any progress on this? I've been looking forward to it!
4a0fa47 Allow selecting exactly n patches during roulet... - lynxplay
[PaperMC/paperweight] branch deleted: feature/force-select-patches
ebfb470 fix(deps): update dependency io.mockk:mockk to ... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/io.mockk-mockk-1.x
31d34ef fix(deps): update dependency org.eclipse.jgit:o... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/org.eclipse.jgit-org.eclipse.jgit-7.x
8137e9d fix(deps): update serialize to v1.8.1 - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/serialize
a521662 chore(deps): update plugin org.gradle.toolchain... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/org.gradle.toolchains.foojay-resolver-convention-1.x
4c9710a fix(deps): update dependency org.jetbrains.kotl... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/kotlinx-coroutines-monorepo
0ba8610 chore(deps): update actions/checkout action to v4 - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/actions-checkout-4.x
98091a7 fix(deps): update dependency com.google.code.gs... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.google.code.gson-gson-2.x
4b75c23 chore(deps): update mikepenz/action-junit-repor... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/mikepenz-action-junit-report-5.x
[PaperMC/paperweight] branch deleted: renovate/junit5-monorepo
393ea5b chore(deps): update actions/setup-java action t... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/actions-setup-java-4.x
[PaperMC/paperweight] branch deleted: renovate/com.gradle.publish-plugin-publish-plugin-1.x
[PaperMC/paperweight] branch deleted: renovate/gradle-8.x
[PaperMC/paperweight] branch deleted: renovate/org.gradle.kotlin.kotlin-dsl-org.gradle.kotlin.kotlin-dsl.gradle.plugin-5.x
1c7e1a9 fix(deps): update dependency com.diffplug.spotl... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.diffplug.spotless-spotless-plugin-gradle-7.x
[PaperMC/paperweight] New tag created: v2.0.0-beta.17
:rocket: Features
- core/userdev: Make reobf optional (#290) - 63fd939
:wrench: Bug Fixes
- SetupMinecraftSources on windows for good - 10a5e3d
- Remove usage of incubating Problems API - 904334f, closes #289
- deps: update dependency com.gradleup.shadow:com.gradleup.shadow.gradle.plugin to v8.3.6 (#291) - 832e9eb
- deps: update asm to v9.8 (#295) - 9c240b5
- deps: update dependency net.fabricmc:tiny-remapper to v0.11.1 (#299) - 8fb37c9
- deps: update dependency com.google.code.gson:gson to v2.12.1 (#297) - cb07326
- deps: update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.25.0 ([#296](https://github.com/PaperMC/paperweig...
if I recall correctly this breaks reobf mappings
I discovered this bug when playing around with file/git patch conversion
Turns out that when you try to rebuild patches after changing the gitFilePatches to true property in the fork-server/build.gradle.kts when you try rebuilding to convert your patches it fails on the apply* tasks
Example output of the error:
I assume this is a bug since when using -x pufferfish:server:applyMinecraft(type patch)Patches it rebuilds and converts them to regular git patches properly, however it doesn't occur when going from git patches -> file patches in my testing
this was first brought up in the #build-tooling-help channel on the paper discord
Also it seems to fail to apply server file patches properly afterwards when turned to git
#note - the corrupt patch at line 3 also occurs when rebuilding without that excluding
[PaperMC/paperweight] New branch created: caching-improvements
0448dc3 Make SetupMinecraftSources cacheable - jpenilla
To preserve the Git repo integrity we must zip the outputs ourselves
5e28021 Make SetupMinecraftSources cacheable (#329) - jpenilla
[PaperMC/paperweight] branch deleted: caching-improvements
[PaperMC/paperweight] New tag created: v2.0.0-beta.18
Commits
- 53e9459: Back to 2.0.0-SNAPSHOT (Jason Penilla)
- 5d1d3f2: Update dev bundle revision comments (Jason Penilla)
- a181c63: Update dev bundle revision comments (again) (Jason Penilla)
- 5e28021: Make SetupMinecraftSources cacheable (Jason Penilla) (#329)
- Version 2.0.0-beta.18 - add7fad
c093234 fix(deps): update dependency com.gradleup.shadow:c... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-8.x
43a0896 fix(deps): update dependency org.eclipse.jgit:org.... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/org.eclipse.jgit-org.eclipse.jgit-7.x
[PaperMC/paperweight] Pull request opened: #332 Add a convention to emit rejects for feature patches
This pull request adds an opt-in convention that allows paper and its forks to emit .rej files for feature patches.
The change is justifiable by the sheer fact that conflicts on feature patches can be a real burden sometimes and the behavior on stopping on the first failed hunk doesn't help that at all, which is why i believe this to be the superior way as it applies all hunks while ignoring the failed ones which then are outputted to the sources directory next to the .java file they were touching. This allows for easier and faster conflict handling for large feature patches.
By default i've also implemented a filter that aims to keep the output the same as default and not spam the console but added a log file to which the full logs are written, an example of such log file is this -> https://pastes.dev/xTJen99sf7
I'm also open to making this behavior the default one if you guys are open to that
Currently this task is used only for forks and the EXACT mode used right now causes a lot of maintenance burden and issues on every tiny change to the build files by paper. This brings its behavior to match source patches
More information here on discord: #build-tooling-help message
before:
<img width="613" height="248" alt="image777" src="https://github.com/user-attachments/assets/caa48c68-cc1a-43bd-947e-0d0c8099ae8f" />
after: (no issues, clean apply)
This fixes an issue where the patches didn't get applied on top of the source in the test full vanilla project test due to a custom patches directory name, defeating its purpose
e7ce795 fix(deps): update dependency com.diffplug.spotless... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.diffplug.spotless-spotless-plugin-gradle-7.x
a1aa202 fix(deps): update dependency net.fabricmc:tiny-rem... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/tinyremapper
f365008 fix(deps): update dependency net.kyori:indra-licen... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/net.kyori-indra-licenser-spotless-3.x
Expected configuration ':simple-paper-plugin:paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
That happens when i reload with the following gradle example:
plugins {
id 'io.papermc.paperweight.userdev' version '1.5.0'
}
dependencies {
// Paper development bundle for NMS access
paperweight.paperDevBundle("1.21.8-R0.1-SNAPSHOT")
}
You need to use a more recent version of paperweight and gradle
Where can i find the latest version? On the repository mentioned on here: https://docs.papermc.io/paper/dev/userdev/ the latest version is 1.5.0
<img width="1055" height="243" alt="Image" src="https://github.com/user-attachments/assets/89dcb5c3-be44-4472-828a-410b58e4327d" />
Something is wrong with your browser
i tried that version but in the repository given there, this version wasn't there for me :O
paperweight is deployed to the gradle plugin repo, no longer our own repo
ah thats it, got it now thx for the help :)
This pull request updates diffpatch to the currently latest version and migrates previous inputs and outputs to use the Multi/Single Input/Output interfaces
Everything was tested locally and using a dev bundle and no regressions nor changes in patch output have been noticed.
The reasoning for this update is to keep up-to-date with the latest improvements in the library (such as fixing ghost patches)
I am experiencing the same issue when trying to build Paper.
Here's the output of gradlew rebuildPatches --stacktrace: https://pastebin.com/BUCPE3HH
I have already provided more information here: https://github.com/PaperMC/Paper/issues/13024
Any solution?
Run gradlew -Dpaperweight.debug=true rebuildPatches and share the output.
Thank you @lynxplay for debugging this with me. The issue was "fetch.pruneTags" in my git config - it must not be set to true.
[PaperMC/paperweight] New branch created: bugfix/prune-tag-in-rebuild
9e62edb Do not prune tags when rebuilding patches - lynxplay
A semi-common git config to set globally is fetch.pruneTags which allows
developers to prune tags no longer present on the remote.
This config however breaks patch rebuilding as the file and base tags
are pruned during the pruning fetch of paperweight prior to the
format-patch command.
To prevent this, this commit now explicitly disables patch pruning while
preparing the rebuild.
https://github.com/PaperMC/paperweight/pull/341 exists, tho I do not know if this is a fix for this issue as the screenshots did not include the paperweight.debug output.
For reproduction of my issue you can just clone the v2-fork-of-fork branch and possibly the normal v2 fork too and change gitFilePatches to true in the server build file after which you run ./gradlew rebuildAllServerPatches. I think this issue is happening because the fork-server build file also applies to upstream when you change it and as such the changes propagate further up, so when you enable git file patches, paperweight thinks that upstream should also apply its file patches as such, except upstream has normal file patches and not git ones so the apply fails as it tries to apply them the git way and not the file way. As for rebuild it also fails since rebuilding causes re-apply of upstream (even if the changes are not copied to the source dirs in your fork) which fails for the aforementioned reason.
Here are logs ran with --stacktrace and -Dpaperweight.debug=true when rebuilding right after the change
https://pastes.dev/nyxRPr55Mz
And apply logs right after the change:
https:/...
For the record i don't have prune tags enabled in my git config
2db9d04 Do not prune tags when rebuilding patches (#341) - lynxplay
[PaperMC/paperweight] branch deleted: bugfix/prune-tag-in-rebuild
`A problem occurred configuring root project 'pvp-practice-paper'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.18.
Required by:
project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.18
No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.18 was found. The consumer was configured to find a library for use during runtime, compatible with Java 21, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.8' but:
- Variant 'javadocElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about it`...
i already did
<img width="757" height="207" alt="Image" src="https://github.com/user-attachments/assets/5363b4d8-9e97-45da-b006-eee5f651fcc2" />
wait i meant gradle… sorry for my mistake i have no idea how i came to type jdk xD also ask in discord for support the next time
While that Gradle error is really verbose, it does say what is wrong:
Incompatible because this component declares a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.14' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.8'
If you have further issues please join the #build-tooling channel on our discord.
- make reobf depend on dev jar task (not doing this breaks
assemble.dependsOn(reobfJar)) - make assemble depend on reobf for REOBF_PRODUCTION (makes sense as default behavior - if you need reobf-ed production,
buildshould generate that jar)
not interested in breaking changes to defaults, people can attach it to lifecycle tasks if they want to.
the other changes imply a lack of understanding of Gradle APIs, I would suggest reading https://docs.gradle.org/current/userguide/lazy_configuration.html to start
Expose a configuration option in paperweight-core/patcher to fail if the application of access transformers via JST fails.
For this, --access-transformer-validation=error should be passed to JST for a representative exit code.
This should help during updates when a lot of AT targets become invalid as they were renamed/removed.
[PaperMC/paperweight] branch deleted: gradle-9
98d3cc9 fix(deps): update serialize to v1.9.0 - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/serialize
4a7f7d9 fix(deps): update dependency io.mockk:mockk to v1.... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/io.mockk-mockk-1.x
[PaperMC/paperweight] branch deleted: renovate/gradle-8.x
c023cba chore(deps): update actions/checkout action to v5 - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/actions-checkout-5.x
28527a7 fix(deps): update dependency com.google.code.gson:... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.google.code.gson-gson-2.x
a40816b fix(deps): update dependency com.gradleup.shadow:c... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-9.x
14c74aa fix(deps): update dependency com.gradle.publish:pl... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.gradle.publish-plugin-publish-plugin-2.x
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-8.x
50ef501 chore(deps): update actions/setup-java action to v... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/actions-setup-java-5.x
@jpenilla this commit causes errors when running generateMappings for some reason, i cherry picked each commit and this one was what caused them and after reverting the bump on the main branch, the issue disappeared.
I raised issues with generateMappings two times already on discord but didn't get a response in the #build-tooling-help channel with the latest paperweight snapshot.
Currently in Gradle 9.1.x when you builld any plugin using paperweight.paperDevBundle you can get a warning for Deprecation of multi-string dependency notation
a3f9f10 Update PaperweightUserDependenciesExtension for Gr... - jpenilla
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
Since this commit which bumped the shadow version from 8.3.8 to 9.1.0 the generateMappings task now fails with an error:
https://pastes.dev/MwcyngZaCt
The relevant error line is this:
Caused by: java.lang.NullPointerException: CSRG must not be null
at io.papermc.paperweight.util.MappingFormats.<clinit>(MappingFormats.kt:35)
which seems to point here
object MappingFormats {
val TINY = TinyMappingFormat.STANDARD
val CSRG: MappingFormat = Formats.CSRG // <- error here! - class from cadixdev lorenz
val PROGUARD: MappingFormat = Formats.byId("proguard")
}
This has been observed in a fork of a fork setup but should be reproducible on paper itself too with reobf enabled
(this can be bypassed by disabling the spigot extension which skips this task then)
9b3ae67 fix(deps): update dependency com.gradleup.shadow:c... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-9.x
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
I'd appreciate if you could take the time to report this to shadow - for now I will revert to 8.x
a0668eb fix(deps): update dependency net.fabricmc:tiny-rem... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/tinyremapper
e1b4a1b fix(deps): update junit-framework monorepo - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/junit-framework-monorepo
fb590aa chore(deps): update gradle to v9.1.0 - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/gradle-9.x
[PaperMC/paperweight] New tag created: v2.0.0-beta.19
:wrench: Bug Fixes
- deps: update dependency com.gradleup.shadow:com.gradleup.shadow.gradle.plugin to v8.3.8 (#328) - c093234
- deps: update dependency org.eclipse.jgit:org.eclipse.jgit to v7.3.0.202506031305-r (#327) - 43a0896
- deps: update dependency com.diffplug.spotless:spotless-plugin-gradle to v7.2.1 (#325) - e7ce795
- deps: update dependency net.fabricmc:tiny-remapper to v0.11.2 (#335) - a1aa202
- deps: update dependency net.kyori:indra-licenser-spotless to v3.2.0 (#336) - f365008
- deps: update serialize to v1.9.0 (#337) - 98d3cc9
- deps: update dependency io.mockk:mockk to v1.14.5 (#330) - 4a7f7d9
- deps: update dependency com.google.code.gson:gson to v2.13.2 (#345) - 28527a7
- deps: update dependency com.gradleup.shadow:com.gradleup.shadow.gradle.plugin to v9 (#350) - a40816b
- deps: update dependency com.gradle.publish:plugin-publish-plugin to v2 (#349) - 14c74aa
- deps: update dependency com.gradleup.shadow:com.gradleup.shadow.gradle.plugin to v9.2.2 (#352)...
fixes https://github.com/PaperMC/paperweight/issues/355
since shadow 9.x, the INCLUDE duplication strategy has to be specified in order to properly merge service files
from this shadow issue
duplicatesStrategy = DuplicatesStrategy.INCLUDE
must be set for
mergeServicesFiles()
to work properly. Once this is set, it worked properly.
This seems like an incorrect or at least an incomplete "fix"
I would assume it is correct since the shadow dev also said that duplicatesStrategy should be specified as it takes precedence over the mergeServiceFiles() now
https://github.com/GradleUp/shadow/issues/1348
but if it is indeed incomplete i can try to dig up a little more
Improve the error message for empty mainClassName. ([#1601](https://github.com/GradleUp/shadow/pull/1601))
Default duplicatesStrategy back to EXCLUDE. ([#1617](https://github.com/GradleUp/shadow/pull/1617))
This strategy is consistent with 8.x series behavior, which is more compatible for most users upgrading.
For most ResourceTransformer users, you need to override the strategy to INCLUDE to make them work.
Strongly suggest declaring the duplicatesStrategy explicitly in your ShadowJar configuration to avoid confusion.
See more details about the strategies at [Handling Duplicates Strategy](https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy).
shadow 9.0.1 changelog
duplicate non service files should be an error and fail the build. it doesn't seem like a very well thought out change if you can no longer have this behavior while enabling service file merging
filesNotMatching("META-INF/services/**") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE // Or FAIL.
}
there is a solution like this, should i update my pr with that?
it makes it so the merging works but other files fail when they are duplicate
filesMatching("META-INF/services/**") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
updated to make it only include the services
I still think this could cause problems if there's files the merger doesn't touch in that dir for whatever reason, but I guess it's probably good enough
f439166 fix(deps): adapt shadow configuration for shadow 9... - Toffikk
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-9.x
[PaperMC/paperweight] branch deleted: renovate/asm
79e8818 fix(deps): update dependency io.mockk:mockk to v1.... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/io.mockk-mockk-1.x
969031b fix(deps): update junit-framework monorepo - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/junit-framework-monorepo
d8820b7 fix(deps): update dependency org.eclipse.jgit:org.... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/org.eclipse.jgit-org.eclipse.jgit-7.x
02230df chore(deps): update gradle/actions action to v5 - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/gradle-actions-5.x
189c4ab fix(deps): update dependency com.diffplug.spotless... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.diffplug.spotless-spotless-plugin-gradle-8.x
5663183 chore(deps): update plugin net.kyori.blossom to v2... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/net.kyori.blossom-2.x
bf070c6 fix(deps): update junit-framework monorepo to v6 - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/major-junit-framework-monorepo
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
85966d2 fix(deps): update dependency net.kyori:indra-licen... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/net.kyori-indra-licenser-spotless-4.x
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
a85f03b Change default single file patch apply mode to OFF... - Toffikk
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
rebased and updated the library again!
note: the renovate pr should be superseded by this pr as the bump requires more involving changes, as otherwise it wont build
closing as the git log filtering seems like smth that shouldnt be there ideally, im open for part of this pr to be implemented by someone else if they deem it worth it
cc @MiniDigger as he wrote this test
#build-tooling-help message
why is this an extension function? probably better to have an @get:Nested SetProperty for this, and add @get:Input annotations to the data class components. then have all the configProperties manipulation at execution time. I assume the checkstyle task is not using Providers for everything yet.
2d0c49d create paper-checkstyle plugin (#281) - Machine-Maker
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
641c477 Use convention instead of set in PaperCheckstyle - jpenilla
The config merging should be it's own task for proper up to date checking.
I think we should keep these as SetProperty<String> and have the convention be read from file.
[PaperMC/paperweight] New branch created: feature/checkstyle
6f5d335 move setting of default values - Machine-Maker
5b82626 correct default values - Machine-Maker
move this into the plugin
c17bcd0 move setting of default values (#373) - Machine-Maker
[PaperMC/paperweight] branch deleted: feature/checkstyle
b4c4585 needs to be root project - Machine-Maker
[PaperMC/paperweight] New branch created: feature/checkstyle
[PaperMC/paperweight] branch deleted: feature/checkstyle
would it be feasible and/or better to configure the git local repo config during the repo fetch process to allow long paths so this isnt an issue? especially since you don’t need to enable long paths in the registry for them to work, you only need the git setting
[PaperMC/paperweight] New branch created: log-cache-miss
e8e3612 chore: log userdev cache misses with path for debu... - MiniDigger
lmk if this is something that perhaps should be attached to the updatingMinecraft extension or even directly linked to the oldPaperCommit property
I opened a pr that aims to do just this #376, please lmk if i should modify anything or if you're satisfied with it
This is guaranteed not to fail as this piece of code won't run if there is no at file specified and right now if the at file gets specified, this property also gets set.
The property was marked as optional due to the setupMacheResources task which uses the same task but doesn't specify ATs and i saw no point in wiring the validation property to it if no ats are gonna be applied anyway.
should this be made to always validate? the new AT lines should never be inapplicable but if such a situation were to happen it would be nice for it to blow up during saving them instead of failing during apply
maybe it'd be good for this to be on by default?
These changes provide fork developers with a way to specify an AT file (or have it detected automatically) for upstream sources, such as paper-server and paper-api for a fork of Paper. This allows fork developers to benefit from using ATs while modifying these sources without needing to clutter patches, with lots of manual access transforms, and as such this greatly improves the overall comfort of making more involving changes, in the sources. It also allows for fork devs to be able to organize ATs in one place which makes it easier to review later.
The implementation proposed in this commit works as follows:
- Derive the location of the build-data dir from the output dir specified in the PatchRepo/Directory's config.
- Search for an AT file, by the name of the patch repo/directory as specified.
- Apply them before applying source patches.
The locations in steps 1 and 2 can be overriden per patch repo/directory by just overriding the val.
In order to achieve this change,...
note: if #376 gets merged before this, this pr needs to be updated,
however if this gets merged first, then the other pr needs to be updated.
(i already have the proper changes on my local fork)
i am unsure about this part; ideally if we were in the api project's context when setting it up we could just remove this, but the api projects get set up from rootProject and idk how to work around this.
worked this around, only the server project has the core plugin applied so this should be fine now 🙌
no, mapNotNull is for accepting elements that aren’t null and skipping those that are.
This whole logic tbh is a bit not to my liking as i’m worried if this won’t cause issues further down the road with isolated projects in gradle, so a better solution has to be found; Unfortunately it would probably mean rewriting paperweight to treat the api projects the same way as server projects and not pin them under the root project which is an effort i didn’t want to undertake as i’m not sure if that’s something remotely desirable.
d4bdea6 fix(deps): update junit-framework monorepo to v6.0... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/junit-framework-monorepo
[PaperMC/paperweight] branch deleted: renovate/gradle-9.x
4c5bedb chore(deps): update mikepenz/action-junit-report a... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/mikepenz-action-junit-report-6.x
[PaperMC/paperweight] branch deleted: renovate/asm
[PaperMC/paperweight] New branch created: dev/26.1
c558bcd Start Paper 26.1 development groundwork - jpenilla
[PaperMC/paperweight] branch deleted: dev/26.1
6f8c7d3 fix(deps): update dependency com.gradleup.shadow:c... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-9.x
5bedc4e fix(deps): update dependency io.mockk:mockk to v1.... - renovate[bot]
[PaperMC/paperweight] branch deleted: renovate/io.mockk-mockk-1.x
This fix now causes the tests to fail on latest main due to patches being for 1.21.4 and not for 26.1. The only reason why main doesn't fail is that those patches in the tests are not even being applied as said in this PR
updated diffpatch to latest again. the new update allows us to output rejected hunks as patches
rebuildWithDiffPatch now returns Int? and uses summary(verbose.get()), but run() always logs Rebuilt $result patches. If summary(false) results in a null summary, this will log Rebuilt null patches (and the inferred type of result becomes nullable). Consider requesting summary(true) whenever you need changedFiles, or falling back to a non-null count (e.g., 0) and keeping the return type Int.
This code uses result.summary?.failedMatches / changedFiles for error reporting and logging, but the PatchOperation builder here doesn't explicitly enable summaries. If DiffPatch v2 only populates summary when summary(true) is set, these messages will degrade to null (and hide useful diagnostics). Consider adding .summary(true) when building the operation if you rely on summary fields.
Pull request overview
This PR updates the project’s DiffPatch dependency to 2.1.0.43 (and the new io.codechicken.* packages) and migrates patch/diff invocations to the new Multi/Single Input/Output APIs used by DiffPatch v2.
Changes:
- Bump DiffPatch from
1.5.0.30→2.1.0.43and update repository/shading config for the new group. - Migrate
DiffOperation/PatchOperationcall sites from*Path(...)APIs tobaseInput(...)/changedInput(...)/patchedOutput(...)/patchesOutput(...). - Adjust logging/summary access patterns for the new DiffPatch result model (notably nullable
summary).
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file:
||| File | Description |
| ---- | ----------- |
| paperweight-userdev/src/main/kotlin/io/papermc/paperweight/userdev/internal/setup/action/SetupMacheSourcesAction.kt | Switch PatchOperation to new DiffPatch v2 Input/Output APIs for archive patching. |
| paperweig...
applyWithDiffPatch() now returns Int? and uses summary(verbose.get()), but the caller always logs the returned count when !verbose. With summary(false), result.summary can be null, which will lead to logging Applied null patches (and the failure message below can become Failed to apply null/0 hunks). Consider always enabling summary(true) when you need counts, and keep this method/variable non-null (e.g., return 0 when a summary isn't produced).
summaries are enabled by default, im not even sure if you can disable them lol
Summary shouldn’t be null if the result is 0, and if the result is a different code, then we throw an exception
As the title says, java 25 is not supported because of tiny-remapper.
https://github.com/FabricMC/tiny-remapper/issues/162
remapping isn't a thing anymore, and paper generally expects that you run the chain with the same version of java as was used at the time, otherwise patching, etc, will generally fail anyways
It's generally expected that if you're targeting older versions, you're using the primary supported version of Java used at that time; otherwise, platform support is shaky.
I forgot that this would impact people running against a newer version of Java than the version officially supported. Given that obfuscation is no longer a thing, however, the tooling used specifically to deal with that is likely going to see less maintenance, given how nobody really supports legacy versions. Tools like tiny-remapper are no longer critical to the projects that maintain them.
Well, for myself, I'll just maintain them for my personal use. I know that obfuscation is no longer a thing, but for plugins that still adds support for older version and newer versions too, it will force them to choose to stay for longer on older versions or transition to the newer version immediately.
I even thought on how to have one obfuscated and one not obfuscated proxy that will make both 26.1+ and 1.21.11- work.
As of now, paper 26.1 is not out, but I'm already testing the support for 26.1 by upgrading to Java 25 which will be required (despite that the remap requires the same java for the targeted version).
Funny enough, as of now, the fabric loader still uses tiny remapper, and it got bumped to 0.13.0.
https://github.com/FabricMC/fabric-loader/commit/449eca7262a06b7b5d716c93cc0634037dd29b4e
Tools like tiny-remapper are no longer critical to the projects that maintain them.
Just to be clear Tiny remapper is still fully supported, we hope to contiune to support older versions for the foreseeable future. Loom still supports using mappings on 26.1+ for those that really want to use it (not that I would recomend it though). Please make sure to report any issues you have to us.
https://docs.papermc.io/paper/dev/userdev/#adding-the-dev-bundle-dependency does this not solve it for you?
You can configure paperweight to use a specific java launcher for its tooling on older versions.
Yea, I didn't realise that it was still being used as part of the mixin stuff on fabrics side
I'm not entirely sure what our plans are, I really doubt we'll be worried about our tooling supporting remapping against bytecode where versions of the software which rely on remapping, etc, are no longer supported and can't even run that bytecode
https://docs.papermc.io/paper/dev/userdev/#adding-the-dev-bundle-dependency does this not solve it for you? You can configure paperweight to use a specific java launcher for its tooling on older versions.
If I done this correctly, it should be something like this for Gradle 9, for all my sub-projects:
plugins {
id("io.papermc.paperweight.userdev")
}
group = "com.willfp"
version = rootProject.version
dependencies {
implementation(project(":eco-core:core-nms:common"))
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}
paperweight {
javaToolchains {
launcherFor {
languageVersion = JavaLanguageVersion.of(21)
}
}
}
tasks {
build {
dependsOn(reobfJar)
}
reobfJar {
mustRunAfter(shadowJar)
}
shadowJar {
relocate(
"com.willfp.eco.internal.spigot.proxy.common",
"com.willfp.eco.internal.spigot.proxy.v1_21_4.common"
)
}
}
which seems to throw the same error....
I really doubt we'll be worried about our tooling supporting remapping against bytecode where versions of the software which rely on remapping, etc, are no longer supported and can't even run that bytecode
Well, that should be something the devs relying on those should be worried about. Like paperweight does support Java 24 by default, because tiny-remapper does also support it, because ASM was updated to the version that supports it, but that's not paper devs should worry about. The problem, as I've mentioned about a couple of times is that devs will need time to adjust, while they slowly drop older versions.
There is no paperweight issue here. You are able to choose the tiny remapper version used for your plugin. And if something fails in the setup pipeline it's likely user error/a bad configuration that could be fixed by reading the docs.
[PaperMC/paperweight] New tag created: v2.0.0-beta.20
:wrench: Bug Fixes
- deps: adapt shadow configuration for shadow 9.x and update it to v9.2.2 (#360) - f439166, closes #355
- deps: update asm to v9.9 (#362) - 79637c5
- deps: update dependency io.mockk:mockk to v1.14.6 (#361) - 79e8818
- deps: update junit-framework monorepo (#358) - 969031b
- deps: update dependency org.eclipse.jgit:org.eclipse.jgit to v7.4.0.202509020913-r (#363) - d8820b7
- deps: update dependency com.diffplug.spotless:spotless-plugin-gradle to v8 (#353) - 189c4ab
- deps: update junit-framework monorepo to v6 (#359) - bf070c6
- deps: update dependency net.kyori:indra-licenser-spotless to v4 (#366) - 85966d2
- deps: update junit-framework monorepo to v6.0.3 (#368) - d4bdea6
- deps: update asm to v9.9.1 (#378) - 9ec5e8f
- deps: update dependency com.gradleup.shadow:com.gradleup.shadow.gradle.plugin to v9.3.2 (#381) - 6f8c7d3
- deps: update dependency io.mockk:mockk to v1.14.9 (#379) - 5bedc4e
:broom: Chores
- deps: update gradle/actions action to...
[PaperMC/paperweight] New tag created: v2.0.0-beta.21
Commits
- 2549cf1: 2.0.0-SNAPSHOT (Jason Penilla)
- 6b8c457: Add missing V7 check in SetupHandler.kt (Jason Penilla)
- Version 2.0.0-beta.21 - 55996d5
This has now been reworked to use a dedicated dependency bridge plugin to respect gradle boundaries
I believe this should be ready for review now as the main concern i had with this impl has been addressed. This PR will also require small changes to the fork examples which i'll also take care of if interest in merging this is expressed
This PR extends the updatingMinecraft {} extension by introducing a new oldForkCommit property. When configured, oldForkCommit behaves similarly to oldPaperCommit, but it targets the active fork defined in the build script rather than Paper.
The main motivation for this change is that the existing oldPaperCommit mechanism often doesn't bring in enough objects, particularly in nested fork chains (e.g., fork-of-a-fork scenarios), but sometimes in simple Paper forks too, which causes 3-way patch application to fail.
It also enables patch roulette for minecraft source patches for forks, so the ones that host their own instance of it can also have some fun with it and use it to ease their updates.
This PR will require Paper itself to also add the io.papermc.paperweight.dependency-bridge plugin to its API build file so that forks builds succeed, even tho it will not use it.
should this call get() here to get the actual fork name, or should we default to fork?
I assume this get() call is cheap enough for it to be okay
This will also auto-import the library files that have ATs defined for them and the logic has been tested in production in a fork-of-a-fork setup.
Wasn't sure how exactly to order this inside of SetupMinecraftSources.kt so some input would be useful.
Previously task dependencies weren't properly tracked in Gradle as "task outputs", a lot of them were depending on plain directories that just happened to be task outputs when running ./gradlew rebuildForkOfPaperPatches rebuildAllServerPatches:
Gradle log before the fix:
||```
20:23:37: Executing 'rebuildForkOfPaperPatches rebuildAllServerPatches'…
Starting Gradle Daemon...
Gradle Daemon started in 1 s 10 ms
Calculating task graph as no cached configuration is available for tasks: rebuildForkOfPaperPatches rebuildAllServerPatches
10 actionable tasks: 4 executed, 6 up-to-date
Configuration cache entry stored.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- What went wrong:
A problem was found with the configuration of task ':forkOfFork-server:collectForkOfPaperATsFromPatches' (type 'CollectATsFromPatches').
- Gradle detected a problem with the following location: '/mnt/data/git/ForkOfFork/.gradle/caches/paperweight/upstr```...
Hey so i have thought of a workaround, for the issues described above and pushed it.
I know it's not the best gradle practice but it works so 😛
The build fails with this stacktrace
The issue is caused by this change to NestedRootBuildRunner in Gradle 9.5.0, which is used by Paperweight here
This PR adds a fixup[source]FeaturePatches task that works very similarly to the per-file fixup task, with the exception of needing to specify the patch, into which the changes should be merged into.
<img width="757" height="755" alt="image" src="https://github.com/user-attachments/assets/58a457c6-f94a-4cdd-88a4-e40c905a9f6a" />
The patch number can also be provided through the CLI, by using the --patch-number arg