[PR #5986] [MERGED] Accept one trailing custom-expression terminator #6595

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5986
Author: @gigamans442
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/custom-uniform-terminator


📝 Commits (1)

  • 380c15e Accept one trailing custom-expression terminator

📊 Changes

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

View changed files

📝 crates/horizon-shaders/src/custom.rs (+27 -1)

📄 Description

🤖 Opened by gigamans442's AI agent (Codex, GPT-6), not by gigamans442 personally.

What and why

Fixes #5963.

Tolerate one optional trailing semicolon in a custom variable/uniform expression. Trim surrounding whitespace, remove at most one final terminator, and let the existing expression parser keep rejecting embedded statements, repeated terminators and empty expressions.

This is a narrow compatibility tolerance, not a claim that the format requires semicolons. The new value regression fails on the unmodified parser. All 95 shader unit tests pass with the fix, including exact variable-to-uniform evaluation with/without a terminator and rejection-boundary controls.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Not vanilla gameplay: the standard shader-pack custom-expression evaluator. The expectation is an explicitly scoped compatibility tolerance, exercised with original synthetic properties, not an assertion about GLSL expression grammar or full shader visual parity.

Other projects' code

None copied or adapted. The patch changes the existing Horizon MIT implementation and adds original synthetic tests. No Iris, OptiFine or Sodium implementation source was used for this fix.

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on homepc, against upstream/main at d02dd55ae, 1 min 28 s)

Check Result
Scope ✅ 1 files, +27 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 515 passed (35 s)
rustfmt ✅ (8 s)
clippy ✅ (30 s)
tests: horizon-shaders ✅ 95 passed (14 s)
doc tests ✅ 0 passed
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The public-tree history check also passes. The isolated checkout has no prepared vanilla data, so vanilla parity is explicitly left to the affected CI harness selection. No game was launched and no player instance/settings were changed. These are parser/metadata checks, not visual-parity or FPS results.

🤖 Generated with Codex


🔄 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/5986 **Author:** [@gigamans442](https://github.com/gigamans442) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/custom-uniform-terminator` --- ### 📝 Commits (1) - [`380c15e`](https://github.com/horizon-rust/horizon/commit/380c15e6d3f70aa35f4f2a681c6fccd7c1e876e3) Accept one trailing custom-expression terminator ### 📊 Changes **1 file changed** (+27 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-shaders/src/custom.rs` (+27 -1) </details> ### 📄 Description > 🤖 Opened by gigamans442's AI agent (Codex, GPT-6), not by gigamans442 personally. ## What and why Fixes #5963. Tolerate one optional trailing semicolon in a custom variable/uniform expression. Trim surrounding whitespace, remove at most one final terminator, and let the existing expression parser keep rejecting embedded statements, repeated terminators and empty expressions. This is a narrow compatibility tolerance, not a claim that the format requires semicolons. The new value regression fails on the unmodified parser. All 95 shader unit tests pass with the fix, including exact variable-to-uniform evaluation with/without a terminator and rejection-boundary controls. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [x] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Not vanilla gameplay: the standard shader-pack custom-expression evaluator. The expectation is an explicitly scoped compatibility tolerance, exercised with original synthetic properties, not an assertion about GLSL expression grammar or full shader visual parity. ## Other projects' code None copied or adapted. The patch changes the existing Horizon MIT implementation and adds original synthetic tests. No Iris, OptiFine or Sodium implementation source was used for this fix. ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on homepc, against upstream/main at d02dd55ae, 1 min 28 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +27 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 515 passed (35 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (30 s) | | tests: horizon-shaders | ✅ 95 passed (14 s) | | doc tests | ✅ 0 passed | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The public-tree history check also passes. The isolated checkout has no prepared vanilla data, so vanilla parity is explicitly left to the affected CI harness selection. No game was launched and no player instance/settings were changed. These are parser/metadata checks, not visual-parity or FPS results. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:23:34 +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#6595
No description provided.