[PR #7109] [CLOSED] Port map: the SNBT key escaping row names quote_and_escape #7349

Closed
opened 2026-11-03 06:38:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7109
Author: @MSedgeMC
Created: 11/2/2026
Status: ❌ Closed

Base: main ← Head: chore/port-map-rest-010-nbt


📝 Commits (1)

  • 36c4a78 Port map: the SNBT key escaping row names quote_and_escape

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tools/port_map/rest-010.tsv (+1 -1)

📄 Description

StringTagVisitor.handleKeyEscape was pointed at crates/horizon-client-core/src/snbt.rs::unquoted_key, which does not exist in the tree, so map-check rejected the row. The decision - a compound key stays bare unless it needs quoting, and one that does is escaped - is crates/horizon-world/src/snbt_text.rs::quote_and_escape, which the pretty printer in horizon-client-core/src/snbt.rs calls for every key it writes (self.quoted(&key, ...) in compound), the same function the string values go through.

The row is now inline and names that function.

Proven: python3 tools/port_ledger.py map-check tools/port_map/rest-010.tsv -> 150 rows, no problems. (before this change the same command reported rest-010.tsv:22 ... no fn crates/horizon-client-core/src/snbt.rs::unquoted_key).
Not proven: no fresh ledger rebuild, and no behaviour changed so nothing was run in the game.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7109 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `chore/port-map-rest-010-nbt` --- ### 📝 Commits (1) - [`36c4a78`](https://github.com/horizon-rust/horizon/commit/36c4a78ab4107b817546c6153f1424ea7f652cc4) Port map: the SNBT key escaping row names quote_and_escape ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-010.tsv` (+1 -1) </details> ### 📄 Description `StringTagVisitor.handleKeyEscape` was pointed at `crates/horizon-client-core/src/snbt.rs::unquoted_key`, which does not exist in the tree, so `map-check` rejected the row. The decision - a compound key stays bare unless it needs quoting, and one that does is escaped - is `crates/horizon-world/src/snbt_text.rs::quote_and_escape`, which the pretty printer in `horizon-client-core/src/snbt.rs` calls for every key it writes (`self.quoted(&key, ...)` in `compound`), the same function the string values go through. The row is now `inline` and names that function. **Proven:** `python3 tools/port_ledger.py map-check tools/port_map/rest-010.tsv` -> `150 rows, no problems.` (before this change the same command reported `rest-010.tsv:22 ... no fn crates/horizon-client-core/src/snbt.rs::unquoted_key`). **Not proven:** no fresh ledger rebuild, and no behaviour changed so nothing was run in the game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:38:07 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7349
No description provided.