PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User dev plugin fails on prepareKotlinBuildScriptModel

yannicklamprecht opened this issue · comments

Currently the userdev plugin fails because the diff option --color=never is not recognized by the present diff cli tool.
In every patch in the directory .gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/ the following is printed.

diff: unrecognized option --color=never' diff: Try diff --help' for more information.

I probably can fix that myself by installing a diff tool the support this color parameter but it could be a big issue for others.
Additionally it tries to apply package-info patches which aren't present here.

Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false apply /Users/myUser/gitWorldBorderAPI/.gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/net/minecraft/package-info.java.patch Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false apply /Users/myUser/git/WorldBorderAPI/.gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/net/minecraft/package-info.java.patch

https://ss64.com/osx/diff.html

macOS does not have --color in its diff command. Would be too sensible 😉.
As a workaround, install GNU/diff.

Currently the userdev plugin fails because the diff option --color=never is not recognized by the present diff cli tool.
In every patch in the directory .gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/ the following is printed.

No, the userdev plugin does not use diff. This is core/patcher generating the dev bundle. Dev bundle generation is a much lower priority for working on every platform than the rest of paperweight as the bundle is meant to be generated by CI and published to a maven repo, not built locally.

As proxi said, generating the dev bundle requires GNU diff, so this is not a bug but a feature request to rework patch generation to not use GNU diff. I've opened a separate issue for that: #65

The package-info issue is a separate thing and does sound like a bug, however the dev bundle on the Paper repo (and ones I generate locally) do not have package-info patches, so it seems more like you have an invalid dev bundle? What dev bundle were you using to get this error?

Seems like I missinterpreted your example projects workflow. That was present 16+ hours ago.

I'll nuke the user dev bundle in my local maven repository and report back.

I should stop using bleeding edge projects.

Yeah works after nuking the part and cleaning the setup. https://github.com/yannicklamprecht/WorldBorderAPI