PaperMC / PaperMC/Paper

Hard fork process

Open
#11,735 7 comments 69 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

We have to:

  • Apply all per-file patches (about 800)
  • Apply all feature-based patches (about 30, but REALLY large ones)
  • Publish an initial test build outside the API to fix less obvious issues
  • After fixing issues, push to main and publish initial builds
  • Push paperweight-patcher - see here for exampless
  • Provide a script and info to contributors on how to update their pull requests
  • Do more fixing before exiting experimental builds
  • Non-beta paperweight release

Applying all patches will likely take a few weeks. Make sure to join our Discord for discussion and more fine-grained updates!

See our forum post for more information: https://forums.papermc.io/threads/the-future-of-paper-hard-fork.1451/.
You can also see our previous prep work on here: https://github.com/orgs/PaperMC/projects/6/views/1
Aaand you can see the current update branch here: https://github.com/PaperMC/Paper/tree/dev/hard-fork

For our dev team:

  • clone into dev/hard-fork, set cleanPaperRepo in ~/.gradle/gradle.properties to a pre hard fork 1.21.4 Paper project sources root (Paper-Server/src/main/java)
  • gradlew applyPatches
  • Repeat:
    • gradlew gibWork
    • Tick the entry in the per-file patches issue immediately
    • if it applied correctly, continue, else look at the rejects file and apply the missing hunks
    • open the patched files and see if they compile, if they don't gradlew checkWork to move the file to the old repo; fix up compile issues; press enter (which will copy the files back)
    • git commit --amend in the paper-server/src/vanilla/java dir
  • gradlew rebuildPatches

make sure IJ detected the new git repos:
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the dev/hard-fork branch and the linked paperweight-examples branches, then read the remaining checklist item for a non-beta paperweight release. The documented workflow uses gradlew applyPatches, gibWork, checkWork, and rebuildPatches with cleanPaperRepo configured; completion is a non-beta release after the listed patch and build work.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, release
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.