#paperweight

1 messages · Page 2 of 1

hollow mistBOT
hollow mistBOT
#

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...

#
[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
hollow mistBOT
#
[PaperMC/paperweight] New branch created: bugfix/allow-fetching-sha1-from-paper-upstream
#

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.

hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: bugfix/allow-fetching-sha1-from-paper-upstream
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.16
hollow mistBOT
#

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
hollow mistBOT
hollow mistBOT
#

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...

hollow mistBOT
#

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...

hollow mistBOT
#
[PaperMC/paperweight] New branch created: optional-reobf
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: optional-reobf
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/configure
#
[PaperMC/paperweight] branch deleted: renovate/jst
#
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-8.x
#
[PaperMC/paperweight] branch deleted: renovate/asm
#
[PaperMC/paperweight] branch deleted: renovate/tinyremapper
#
[PaperMC/paperweight] branch deleted: renovate/com.google.code.gson-gson-2.x
#
[PaperMC/paperweight] branch deleted: renovate/com.diffplug.spotless-spotless-plugin-gradle-6.x
hollow mistBOT
#

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...
#

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...
hollow mistBOT
#

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?

hollow mistBOT
#

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...

hollow mistBOT
#
[PaperMC/paperweight] New branch created: feature/force-select-patches
#

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.

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: feature/force-select-patches
#
[PaperMC/paperweight] branch deleted: renovate/io.mockk-mockk-1.x
#
[PaperMC/paperweight] branch deleted: renovate/org.eclipse.jgit-org.eclipse.jgit-7.x
#
[PaperMC/paperweight] branch deleted: renovate/serialize
#
[PaperMC/paperweight] branch deleted: renovate/org.gradle.toolchains.foojay-resolver-convention-1.x
#
[PaperMC/paperweight] branch deleted: renovate/kotlinx-coroutines-monorepo
#
[PaperMC/paperweight] branch deleted: renovate/actions-checkout-4.x
#
[PaperMC/paperweight] branch deleted: renovate/com.google.code.gson-gson-2.x
#
[PaperMC/paperweight] branch deleted: renovate/mikepenz-action-junit-report-5.x
#
[PaperMC/paperweight] branch deleted: renovate/junit5-monorepo
#
[PaperMC/paperweight] branch deleted: renovate/actions-setup-java-4.x
hollow mistBOT
#
[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
#
[PaperMC/paperweight] branch deleted: renovate/com.diffplug.spotless-spotless-plugin-gradle-7.x
hollow mistBOT
#
[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...
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

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:

Image

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

hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/junit5-monorepo
hollow mistBOT
#
[PaperMC/paperweight] New branch created: caching-improvements
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: caching-improvements
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.18
#
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-8.x
#
[PaperMC/paperweight] branch deleted: renovate/org.eclipse.jgit-org.eclipse.jgit-7.x
hollow mistBOT
#

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

hollow mistBOT
#

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)

hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/com.diffplug.spotless-spotless-plugin-gradle-7.x
#
[PaperMC/paperweight] branch deleted: renovate/tinyremapper
#
[PaperMC/paperweight] branch deleted: renovate/net.kyori-indra-licenser-spotless-3.x
hollow mistBOT
hollow mistBOT
#

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")
}
hollow mistBOT
#

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)

hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: bugfix/prune-tag-in-rebuild
hollow mistBOT
#

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:/...

hollow mistBOT
#
[PaperMC/paperweight] branch deleted: bugfix/prune-tag-in-rebuild
hollow mistBOT
#

`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`...

#

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.

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: gradle-9
#
[PaperMC/paperweight] branch deleted: renovate/serialize
#
[PaperMC/paperweight] branch deleted: renovate/io.mockk-mockk-1.x
#
[PaperMC/paperweight] branch deleted: renovate/gradle-8.x
#
[PaperMC/paperweight] branch deleted: renovate/actions-checkout-5.x
#
[PaperMC/paperweight] branch deleted: renovate/com.google.code.gson-gson-2.x
#
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-9.x
#
[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
#
[PaperMC/paperweight] branch deleted: renovate/actions-setup-java-5.x
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
hollow mistBOT
#

@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.

hollow mistBOT
hollow mistBOT
#

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)

hollow mistBOT
#
[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
#
[PaperMC/paperweight] branch deleted: renovate/tinyremapper
#
[PaperMC/paperweight] branch deleted: renovate/junit-framework-monorepo
#
[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)...
hollow mistBOT
hollow mistBOT
#
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

hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/asm
#
[PaperMC/paperweight] branch deleted: renovate/io.mockk-mockk-1.x
#
[PaperMC/paperweight] branch deleted: renovate/junit-framework-monorepo
#
[PaperMC/paperweight] branch deleted: renovate/org.eclipse.jgit-org.eclipse.jgit-7.x
#
[PaperMC/paperweight] branch deleted: renovate/gradle-actions-5.x
#
[PaperMC/paperweight] branch deleted: renovate/com.diffplug.spotless-spotless-plugin-gradle-8.x
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/net.kyori.blossom-2.x
#
[PaperMC/paperweight] branch deleted: renovate/major-junit-framework-monorepo
#
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/org.cadixdev-at-0.x
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: feature/checkstyle
#
[PaperMC/paperweight] branch deleted: feature/checkstyle
#
[PaperMC/paperweight] New branch created: feature/checkstyle
#
[PaperMC/paperweight] branch deleted: feature/checkstyle
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: log-cache-miss
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

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.

hollow mistBOT
#

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:

  1. Derive the location of the build-data dir from the output dir specified in the PatchRepo/Directory's config.
  2. Search for an AT file, by the name of the patch repo/directory as specified.
  3. 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,...

hollow mistBOT
hollow mistBOT
hollow mistBOT
#

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.

hollow mistBOT
#
[PaperMC/paperweight] branch deleted: renovate/junit-framework-monorepo
#
[PaperMC/paperweight] branch deleted: renovate/gradle-9.x
#
[PaperMC/paperweight] branch deleted: renovate/mikepenz-action-junit-report-6.x
#
[PaperMC/paperweight] branch deleted: renovate/asm
hollow mistBOT
#
[PaperMC/paperweight] New branch created: dev/26.1
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: dev/26.1
#
[PaperMC/paperweight] branch deleted: renovate/com.gradleup.shadow-com.gradleup.shadow.gradle.plugin-9.x
#
[PaperMC/paperweight] branch deleted: renovate/io.mockk-mockk-1.x
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

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.

#

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.302.1.0.43 and update repository/shading config for the new group.
  • Migrate DiffOperation/PatchOperation call sites from *Path(...) APIs to baseInput(...) / 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).

hollow mistBOT
hollow mistBOT
hollow mistBOT
#

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.

hollow mistBOT
#

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).

hollow mistBOT
#

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.

hollow mistBOT
#

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.

hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[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
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

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.

hollow mistBOT
hollow mistBOT
hollow mistBOT
#

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```...
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

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