[PR #1502] [CLOSED] fix(worldgen): resolve Rust 1.90 Clippy boolean warnings #3554

Closed
opened 2026-11-03 04:10:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1502
Author: @TheGaner
Created: 10/23/2026
Status: ❌ Closed

Base: main ← Head: fix/worldgen-clippy-bool-20261023


📝 Commits (6)

📊 Changes

10 files changed (+95 additions, -16 deletions)

View changed files

📝 crates/horizon-world/src/block_survival.rs (+2 -2)
📝 crates/horizon-world/src/edge_backoff.rs (+5 -3)
📝 crates/horizon-world/src/level/bonemeal.rs (+1 -1)
📝 crates/horizon-world/src/level/speleothem.rs (+2 -2)
📝 crates/horizon-world/src/level/tick.rs (+2 -1)
📝 crates/horizon-world/src/worldgen/aquifer/noise_based.rs (+30 -1)
📝 crates/horizon-world/src/worldgen/feature_region.rs (+1 -1)
📝 crates/horizon-world/src/worldgen/placement.rs (+1 -1)
📝 crates/horizon-world/src/worldgen/structure/start.rs (+1 -1)
📝 crates/horizon-world/tests/edge_backoff.rs (+50 -3)

📄 Description

🤖 Proposed by ChatGPT (OpenAI assistant) for TheGaner, not by an upstream maintainer.

Purpose

Fix the ten reproducible -D warnings Clippy failures in upstream horizon-world under pinned Rust 1.90. The original Source baseline at 455a9996d2c97be68f8f18b13cf902997ef28e53 fails cargo clippy --locked -p horizon-world --all-targets -- -D warnings (exit 101). This topic passes the same command (exit 0).

Changes

  • Simplify redundant boolean conditions in block survival, edge backoff, bonemeal, speleothem, disabled fire burnout, feature regions, placement and ring sections.
  • Preserve short-circuit collision-query behavior in edge backoff (including grounded/NaN fall distance and zero query budgets), with a new integration regression.
  • Preserve NaN and infinity semantics of the aquifer pressure interval: the naïve !RangeInclusive::contains suggestion would change the original behavior for NaN. Use !q.is_nan() && !(-2.0..=2.0).contains(&q) and add boundary/NaN/infinity tests.
  • Keep fire burnout intentionally disabled as in Source; no intended gameplay change.

Scope: ten files entirely under crates/horizon-world, including the integration regression; +95/-16 lines. No private Mojang sources/assets.

Latest Source integration

  • Branch TheGaner:fix/worldgen-clippy-bool-20261023 at 4b1e298a44ef7c180480d818af8ec4f5f29a5f65.
  • Based directly on latest checked ludovic111/horizon:main at 455a9996d2c97be68f8f18b13cf902997ef28e53; exact SHA verified with live GitHub refs and Git ancestry before non-force Fork topic push. Fork main remains an exact Source mirror.
  • Maintainers may edit the contribution branch.

Verification (Rust 1.90)

  • Before: strict horizon-world Clippy baseline fails with 10 existing findings.
  • After: cargo clippy --locked -p horizon-world --all-targets -- -D warnings PASS (exit 0).
  • cargo test --locked -p horizon-world --all-targets PASS (237 tests, 2 ignored across 37 suites) with the additional edge-backoff regression included; targeted edge-backoff 3/3 PASS, aquifer NaN boundary 1/1 PASS, and strict Clippy PASS again.
  • cargo fmt --all -- --check, tools/check_public_tree.py, whitespace check: PASS.
  • Reproducible logs: reports/worldgen-clippy-fix-20261023/{baseline-455a9996.log,after-fix-clippy.log,after-fix-tests.log,pr-ready-455a9996.log} in contributor workspace (not part of PR).

This topic does not fix experimental Rust if let match guards in the unmodified horizon-client/src/java_pack.rs. The official tools/pr_ready.py --quick completed with 237 horizon-world tests PASS, doc tests PASS, and formatting/public-tree PASS, but its Clippy dependency compilation reaches the client and fails on E0658 under Rust 1.90, because #1488's stable match-arm fix has not yet been merged into original Source. Consequently the broader self-check is not green, despite the scoped worldgen Clippy gate being green.

See #1488 for the independent one-file Java shader-pack test fix. Do not merge unrelated Source code from that PR into this PR merely to silence the blocker.

Draft until full required Source CI/self-checks pass or maintainer policy resolves this dependency. No force pushes or direct changes to original Source.

🤖 Generated with ChatGPT (OpenAI assistant).

Source-current checkpoint — d84d7a7 (2026-10-23 CDT)

  • Latest live-verified original Source H001 and Fork H002 main: d84d7a7e6178ec1a6afab302c4b8ce80e5d2d9ee. Topic branch 7371b2cccd48ec07fe68d23d2c2b4f7f9ca88471 contains this Source commit as ancestor via ordinary non-force merges; no direct Source/Fork-main feature edits. GitHub PR shows only the intended 10 changed file(s).
  • Pinned Rust 1.90 cargo clippy --locked -p horizon-world --all-targets -- -D warnings: PASS; focused edge-backoff 3 passed, aquifer NaN boundary 1 passed, all on this refreshed Source topic. A previous full worldgen suite passed 237 tests. Standalone whole-client checks still need upstream #1488 for the experimental match-guard compilation issue.
  • This addendum supplements prior dated evidence, which remains true only for the explicitly named source revisions. Maintainer/review readiness status is unchanged.

Source-current validation: 59f018ea (2026-10-23 CDT)

  • Refreshed this focused PR topic through an ordinary two-parent merge with original Source ludovic111/horizon:main at 59f018eabe26093274d34942365d31010c3e3e95; fast-forward pushed the user Fork head 82218db8608458ea97d671e82b88ec1f5c110fbf using TheGaner credentials, without force, reset, rebase, or direct Source write. GitHub reports this PR mergeable with 10 changed file(s).
  • Independent 31-file combined review eddebd9aaa3ffcbf1af73259ac508794dd3806ff contains this PR and the related two focused PRs, with Source above as ancestor. Using pinned Rust 1.90, combined gates PASS: cargo fmt --all -- --check; strict cargo clippy --locked -p horizon-client --all-targets -- -D warnings; strict cargo clippy --locked -p horizon-world --all-targets -- -D warnings; 17 test_pr_ready.py Python regressions; 3 worldgen edge-backoff tests; 35 shaderpack tests; 4 client Java-pack tests; 1,076 client library tests passed / 26 ignored with one thread; public-tree check, final exit 0. Evidence log (not shipped in this PR): reports/client-clippy-baseline-20261023/source-59f018-combined-gates.log.
  • Prior intermittent native SIGSEGV in an earlier combined graphics-arena test session remains unresolved and is not claimed fixed by this PR. The current one-thread native suite passed; unrestricted concurrency stability, GPU live runtime, original 13 Java26.3 differential suites, and hosted CI green status are not established by this log. PR draft/reviewer status remains unchanged. Subsequent Source commits, if any, require renewed freshness review.

🔄 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/1502 **Author:** [@TheGaner](https://github.com/TheGaner) **Created:** 10/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/worldgen-clippy-bool-20261023` --- ### 📝 Commits (6) - [`4b1e298`](https://github.com/horizon-rust/horizon/commit/4b1e298a44ef7c180480d818af8ec4f5f29a5f65) fix(worldgen): resolve upstream Rust 1.90 Clippy boolean warnings - [`fc9822b`](https://github.com/horizon-rust/horizon/commit/fc9822b241a238e2ce93cc5f2b2808f2bcd50d43) Merge commit 'd6dc08098a30a08be7ec168fa3e6b756aa3ac493' into fix/worldgen-clippy-bool-20261023 - [`7371b2c`](https://github.com/horizon-rust/horizon/commit/7371b2cccd48ec07fe68d23d2c2b4f7f9ca88471) Merge commit 'd84d7a7e6178ec1a6afab302c4b8ce80e5d2d9ee' into fix/worldgen-clippy-bool-20261023 - [`6ea7167`](https://github.com/horizon-rust/horizon/commit/6ea7167cbb2e03af99f02ef995da3340af043eaa) Merge commit 'd8dd2023dd9c6129e9e628a66d61c1b10e1435cf' into fix/worldgen-clippy-bool-20261023 - [`d66466d`](https://github.com/horizon-rust/horizon/commit/d66466db8132800c2b106b192c1aa927f9334763) Merge commit '22b2711cf9557d53d21080828c895dbff6027151' into fix/worldgen-clippy-bool-20261023 - [`82218db`](https://github.com/horizon-rust/horizon/commit/82218db8608458ea97d671e82b88ec1f5c110fbf) Merge commit '59f018eabe26093274d34942365d31010c3e3e95' into fix/worldgen-clippy-bool-20261023 ### 📊 Changes **10 files changed** (+95 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/block_survival.rs` (+2 -2) 📝 `crates/horizon-world/src/edge_backoff.rs` (+5 -3) 📝 `crates/horizon-world/src/level/bonemeal.rs` (+1 -1) 📝 `crates/horizon-world/src/level/speleothem.rs` (+2 -2) 📝 `crates/horizon-world/src/level/tick.rs` (+2 -1) 📝 `crates/horizon-world/src/worldgen/aquifer/noise_based.rs` (+30 -1) 📝 `crates/horizon-world/src/worldgen/feature_region.rs` (+1 -1) 📝 `crates/horizon-world/src/worldgen/placement.rs` (+1 -1) 📝 `crates/horizon-world/src/worldgen/structure/start.rs` (+1 -1) 📝 `crates/horizon-world/tests/edge_backoff.rs` (+50 -3) </details> ### 📄 Description > 🤖 Proposed by ChatGPT (OpenAI assistant) for TheGaner, not by an upstream maintainer. ## Purpose Fix the ten reproducible `-D warnings` Clippy failures in upstream `horizon-world` under pinned Rust 1.90. The original Source baseline at `455a9996d2c97be68f8f18b13cf902997ef28e53` fails `cargo clippy --locked -p horizon-world --all-targets -- -D warnings` (exit 101). This topic passes the same command (exit 0). ## Changes - Simplify redundant boolean conditions in block survival, edge backoff, bonemeal, speleothem, disabled fire burnout, feature regions, placement and ring sections. - Preserve **short-circuit collision-query behavior** in edge backoff (including grounded/NaN fall distance and zero query budgets), with a new integration regression. - Preserve **NaN and infinity semantics** of the aquifer pressure interval: the naïve `!RangeInclusive::contains` suggestion would change the original behavior for NaN. Use `!q.is_nan() && !(-2.0..=2.0).contains(&q)` and add boundary/NaN/infinity tests. - Keep fire burnout intentionally disabled as in Source; no intended gameplay change. **Scope:** ten files entirely under `crates/horizon-world`, including the integration regression; +95/-16 lines. No private Mojang sources/assets. ## Latest Source integration - Branch `TheGaner:fix/worldgen-clippy-bool-20261023` at `4b1e298a44ef7c180480d818af8ec4f5f29a5f65`. - Based directly on latest checked `ludovic111/horizon:main` at `455a9996d2c97be68f8f18b13cf902997ef28e53`; exact SHA verified with live GitHub refs and Git ancestry before non-force Fork topic push. Fork `main` remains an exact Source mirror. - Maintainers may edit the contribution branch. ## Verification (Rust 1.90) - **Before:** strict `horizon-world` Clippy baseline fails with 10 existing findings. - **After:** `cargo clippy --locked -p horizon-world --all-targets -- -D warnings` **PASS (exit 0)**. - `cargo test --locked -p horizon-world --all-targets` **PASS (237 tests, 2 ignored across 37 suites)** with the additional edge-backoff regression included; targeted edge-backoff **3/3 PASS**, aquifer NaN boundary **1/1 PASS**, and strict Clippy **PASS** again. - `cargo fmt --all -- --check`, `tools/check_public_tree.py`, whitespace check: **PASS**. - Reproducible logs: `reports/worldgen-clippy-fix-20261023/{baseline-455a9996.log,after-fix-clippy.log,after-fix-tests.log,pr-ready-455a9996.log}` in contributor workspace (not part of PR). ## Current broader PR-ready blocker — related to #1488 This topic **does not** fix experimental Rust `if let` match guards in the unmodified `horizon-client/src/java_pack.rs`. The official `tools/pr_ready.py --quick` completed with **237 horizon-world tests PASS**, doc tests PASS, and formatting/public-tree PASS, but its Clippy dependency compilation reaches the client and fails on `E0658` under Rust 1.90, because #1488's stable match-arm fix has **not yet been merged into original Source**. Consequently the broader self-check is **not green**, despite the scoped worldgen Clippy gate being green. See **#1488** for the independent one-file Java shader-pack test fix. Do not merge unrelated Source code from that PR into this PR merely to silence the blocker. **Draft until full required Source CI/self-checks pass or maintainer policy resolves this dependency.** No force pushes or direct changes to original Source. 🤖 Generated with ChatGPT (OpenAI assistant). ## Source-current checkpoint — d84d7a7 (2026-10-23 CDT) - Latest live-verified original Source H001 and Fork H002 main: `d84d7a7e6178ec1a6afab302c4b8ce80e5d2d9ee`. Topic branch `7371b2cccd48ec07fe68d23d2c2b4f7f9ca88471` contains this Source commit as ancestor via ordinary non-force merges; no direct Source/Fork-main feature edits. GitHub PR shows only the intended 10 changed file(s). - Pinned Rust 1.90 `cargo clippy --locked -p horizon-world --all-targets -- -D warnings`: **PASS**; focused edge-backoff **3 passed**, aquifer NaN boundary **1 passed**, all on this refreshed Source topic. A previous full worldgen suite passed 237 tests. Standalone whole-client checks still need upstream #1488 for the experimental match-guard compilation issue. - This addendum supplements prior dated evidence, which remains true only for the explicitly named source revisions. Maintainer/review readiness status is unchanged. ### Source-current validation: 59f018ea (2026-10-23 CDT) - Refreshed this **focused PR topic** through an ordinary two-parent merge with original Source `ludovic111/horizon:main` at `59f018eabe26093274d34942365d31010c3e3e95`; fast-forward pushed the user Fork head `82218db8608458ea97d671e82b88ec1f5c110fbf` using `TheGaner` credentials, **without force, reset, rebase, or direct Source write**. GitHub reports this PR mergeable with 10 changed file(s). - Independent *31-file combined review* `eddebd9aaa3ffcbf1af73259ac508794dd3806ff` contains this PR and the related two focused PRs, with Source above as ancestor. Using pinned Rust 1.90, combined gates **PASS**: `cargo fmt --all -- --check`; strict `cargo clippy --locked -p horizon-client --all-targets -- -D warnings`; strict `cargo clippy --locked -p horizon-world --all-targets -- -D warnings`; 17 `test_pr_ready.py` Python regressions; 3 worldgen edge-backoff tests; 35 shaderpack tests; 4 client Java-pack tests; **1,076 client library tests passed / 26 ignored** with one thread; public-tree check, final **exit 0**. Evidence log (not shipped in this PR): `reports/client-clippy-baseline-20261023/source-59f018-combined-gates.log`. - Prior intermittent native SIGSEGV in an earlier combined graphics-arena test session **remains unresolved** and is not claimed fixed by this PR. The current one-thread native suite passed; unrestricted concurrency stability, GPU live runtime, original 13 Java26.3 differential suites, and **hosted CI green status** are not established by this log. PR draft/reviewer status remains unchanged. Subsequent Source commits, if any, require renewed freshness review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:10:22 +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#3554
No description provided.