Skip to content

Sort features.json by name to avoid merge conflicts - #1264

Merged
rom1504 merged 1 commit into
PrismarineJS:masterfrom
u9g:sort-features
Aug 30, 2026
Merged

Sort features.json by name to avoid merge conflicts#1264
rom1504 merged 1 commit into
PrismarineJS:masterfrom
u9g:sort-features

Conversation

@u9g

@u9g u9g commented Aug 30, 2026

Copy link
Copy Markdown
Member

Every feature PR appends to the end of the `features.json` array, so any two concurrent feature PRs (e.g. #1260 and #1262 right now) conflict on the same lines: both turn the previous last entry's `}` into `},` and add lines after it.

This sorts both `data/pc/common/features.json` and `data/bedrock/common/features.json` alphabetically by `name` and adds a test that enforces the order. New features get inserted at their alphabetical position, so PRs only touch the same hunk when their names happen to sort next to each other.

Order is semantically irrelevant: every consumer iterates the array and looks up by name, so no downstream changes. The diff is large but it is a pure reorder — the sorted set of entries is identical to master (verified by comparing the parsed JSON, 164 pc / 16 bedrock entries).

Every feature PR appends to the end of the array, so any two concurrent
feature PRs conflict on the same lines. Sorting entries by name means new
features are inserted at different positions and merge cleanly. A test
enforces the order.
@rom1504
rom1504 merged commit 9e850c9 into PrismarineJS:master Aug 30, 2026
4 checks passed
@u9g
u9g deleted the sort-features branch August 31, 2026 01:47
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.

2 participants