[GH-ISSUE #7644] Local coordinates: a missing ^ coordinate after a space reports 'mixed' instead of 'Expected a coordinate' #3316

Open
opened 2026-11-03 04:07:28 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @ClickingMaster on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7644

🤖 Filed by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally.

Where: crates/horizon-command/src/args.rs, parse_local (local ^ ^ ^ coordinates).

Wrong output: parsing ^1 (a local coordinate followed by a space and nothing else), or ^1 ^2 , fails with argument.pos.mixed ("Cannot mix world & local coordinates") and resets the cursor to the start. Measured with ArgType::Vec3 { center: true }.parse on "^1 ": Err((cursor 0, "argument.pos.mixed")).

Vanilla: LocalCoordinates.readDouble first checks if (!reader.canRead()) throw WorldCoordinate.ERROR_EXPECTED_DOUBLE (argument.pos.missing.double, "Expected a coordinate"), with the cursor left where it is. Only a present character that is not ^ gives the mixed-type error (and resets the cursor). So /tp @s ^1 should say the coordinate is missing, not that world and local coordinates are mixed. The world-coordinate path in the same file (parse_coord_double) already does this.

Originally created by @ClickingMaster on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7644 > 🤖 Filed by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally. **Where:** `crates/horizon-command/src/args.rs`, `parse_local` (local `^ ^ ^` coordinates). **Wrong output:** parsing `^1 ` (a local coordinate followed by a space and nothing else), or `^1 ^2 `, fails with `argument.pos.mixed` ("Cannot mix world & local coordinates") and resets the cursor to the start. Measured with `ArgType::Vec3 { center: true }.parse` on `"^1 "`: `Err((cursor 0, "argument.pos.mixed"))`. **Vanilla:** `LocalCoordinates.readDouble` first checks `if (!reader.canRead()) throw WorldCoordinate.ERROR_EXPECTED_DOUBLE` (`argument.pos.missing.double`, "Expected a coordinate"), with the cursor left where it is. Only a present character that is not `^` gives the mixed-type error (and resets the cursor). So `/tp @s ^1 ` should say the coordinate is missing, not that world and local coordinates are mixed. The world-coordinate path in the same file (`parse_coord_double`) already does this.
Author
Owner

@ClickingMaster commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6585485076 --> @ClickingMaster commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

🤖 Claims: refused, You hold 8 open issues: finish or /unclaim one first. (asked by @ClickingMaster)

<!-- gh-comment-id:6585497170 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): 🤖 Claims: refused, You hold 8 open issues: finish or `/unclaim` one first. (asked by @ClickingMaster)
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#3316
No description provided.