Repository navigation
Conversation
`cargo install gwm-cli` without `--locked` ignores the committed lockfile and resolved unicode-width 0.2.3 next to ratatui-core 0.1.2, the pair that counts each halfwidth sound mark twice (#721). Cargo skips dev-dependencies when it resolves an install (`set_require_optional_deps(false)`), so the existing dev-dependency held nothing there: the cap sits in [dependencies], unused by src/. Measured on a lockless `cargo install --path` of the packaged crate: unicode-width 0.2.3 without the cap, 0.2.3 with the cap on the dev-dependency only, 0.2.2 with the cap in [dependencies]. The test evaluates the requirement with `semver` and turns red once the locked ratatui-core moves past 0.1.2, so the hold cannot outlive the upstream fix. Refs #721
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
…re (#725) `cargo package` rewrites `unicode-width = "req"` as a `[dependencies.unicode-width]` table, so the guard panicked on a valid cap when the suite runs from the downloaded crate. It now reads the `version` key of a table too. The ratatui-core tripwire could never fire: the fix is ratatui/ratatui#2892, not #2887 (tests only), and it makes ratatui-core require `unicode-width >=0.2.3`. Under the cap cargo stays on ratatui-core 0.1.2, so the locked version never moves. Removed, and the comments say plainly that #721 is what lifts the hold. Refs #721
|
Closing unmerged. The cap works (measured below), but it stopped being a clean guard during review:
A narrow and shrinking protection, paid for by suppressing the only signal that the hold can be lifted. Details and measurements are on #721. The branch stays for reference; CI was green on f0956f6 and 9db1219. |
Description
Caps
unicode-widthbelow 0.2.3 in[dependencies]so thatcargo install gwm-cliwithout--lockedstops resolving the pair that double-counts halfwidth sound marks, untilratatui-corereleases ratatui/ratatui#2892 (#721).Closes #725
Refs #721 (stays open: it takes both crates together and deletes this hold)
Type of change
Changes
Cargo.toml:unicode-width = ">=0.2.0, <0.2.3"under[dependencies], unused bysrc/, with the removal condition in its comment. The dev-dependency entry is untouched, so lifting the hold is one entry and one test.tests/tui_ui_helpers_tests.rs:unicode_width_is_held_below_0_2_3_until_ratatui_core_ships_the_fix, next toUNDERCOUNTED. It reads the requirement from[dependencies], in the source form or the[dependencies.unicode-width]tablecargo packagewrites (the suite also runs from the downloaded crate), and evaluates it withsemver, the crate cargo matches with.semver = "1"dev-dependency. It is already in the graph (1.0.28);Cargo.lockgains one line in gwm-cli's dependency list and no package.Why
[dependencies]and not the existing dev-dependencycargo installresolves without dev-dependencies:make_ws_rustc_targetin cargo'ssrc/ops/cargo_install.rscallsws.set_require_optional_deps(false), and cargo'sinstall::dev_dependencies_no_checktest installs a package whose dev-dependency does not exist. Measured on a locklesscargo install --pathof thecargo packageoutput, withCARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=allowto match a registry install:unicode-widthcompiledorigin/devas is[dependencies])Adding unicode-width v0.2.2 (available: v0.2.3))ratatui-core0.1.2 requiresunicode-width >=0.2.0, so it shares the 0.2 slot and follows the cap.Tests
cargo testpasses locally (3590 passed, 0 failed)cargo fmt --checkpassescargo clippy -- -D warningspasses (--all-targets)tests/(TDD: a PR adding behaviour without tests is sent back)Proof of red, one assertion at a time, reading which one panicked:
[dependencies]entry (dev-dependency only):[dependencies] must cap unicode-width below 0.2.3 for cargo install (a dev-dependency is not resolved there), found None[dependencies] unicode-width = "0.2":... admits 0.2.3, which ratatui-core 0.1.2 double-countsunicode-width = { version = "0.2" }(table form):... admits 0.2.3, ...; the capped table form passes.cargo audit --deny warningsis clean on the branch lockfile.Screenshots / TUI captures
None: no rendering change.
Checklist
<type>/#<issue>-<description>## [Unreleased]examples/gwm.toml.exampleupdated if config schema changed (n/a)unwrap()on user-facing paths (returnGwmErrorinstead)println!in TUI render code (status bar only)Linked issues / docs
゙and゚take two cells with unicode-width 0.2.3 ratatui/ratatui#2886, fix(core): avoid double-counting halfwidth sound marks ratatui/ratatui#2887Notes for reviewers
ratatui-core0.1.2 (2026-06-19) is still the latest release. The fix is build(deps): bump unicode-width from 0.2.2 to 0.2.3 ratatui/ratatui#2892 (merged onmain2026-11-02): it drops the compensation and raisesratatui-core's requirement tounicode-width >=0.2.3. fix(core): avoid double-counting halfwidth sound marks ratatui/ratatui#2887 only adds tests. The only open release-plz PR (chore: release ratatui/ratatui#2609) is the June one that predates both.ratatui-core0.1.2 even once the fixed release exists (it needs>=0.2.3), so nothing in the repo goes red when it ships. A first version tested the lockedratatui-coreversion; review showed it could never fire, and it was removed. [Task]: take unicode-width 0.2.3 together with the ratatui-core release that stops double-counting sound marks #721 stays open as the trigger to lift the hold.ratatui-coreis published, uncapped releases heal by themselves (ratatui0.30.2 asks forratatui-core ^0.1.2, so a lockless install picks the fixed core withunicode-width0.2.3), while a capped release stays on 0.1.2 + 0.2.2: correct rendering, older core. So the hold should be lifted promptly.unicode-width0.3 would reachratatui-core(>=0.2.0) in a slot of its own, and nothing in this manifest can stop that.cargo updateno longer pulls 0.2.3 into the lockfile either.