toolchain #129
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/zim-studio!129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "toolchain"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR Review: Toolchain Modernization
Good overall direction — consolidating build logic into
justfileso CI and local dev use the same recipes is a solid pattern. The Rust idiom cleanup is also welcome. A few things worth addressing:Bug: Redundant assignments in
test_buffer_size_limit(src/player/telemetry.rs)The refactoring was only half-completed. The struct initializer now includes
buffer_sizeandcapture_interval_ms, but the old free-standing assignments were left in place:The redundant lines below the struct literal should be removed to match the pattern used consistently in the other two refactored tests.
CI: macOS only runs on
pushtomain, not on PRsci-linux.ymltriggers onpull_request(pre-merge), butci-macos.ymltriggers onpushtomain(post-merge). This means macOS-only failures won't be caught until after the code lands onmain.If the intent is to save macOS runner minutes on PRs, that's a reasonable trade-off — but it's worth making explicit in a comment. If it was unintentional, adding
pull_requestto the macOS trigger is the fix.Performance:
target/not cached, but CI runs a full release buildThe cargo cache covers
~/.cargo/registryand~/.cargo/git(the source registry), but not thetarget/directory. Sincejust ciincludescargo build --locked --release --all-features, every CI run will recompile the entire project from scratch. For a project with audio/UI dependencies this will be slow.Consider adding target-dir caching, or splitting the
cirecipe so that the release build step (which isn't strictly needed for correctness checks) is optional / separated from the PR gate.Minor:
rust-analyzerinrust-toolchain.tomlpulls into every toolchain installrust-analyzeris an IDE tool and isn't needed for CI or CLI builds. Whiledtolnay/rust-toolchainuses its owncomponents:input (notrust-toolchain.toml) so CI isn't directly affected, localrustupinstalls triggered byrust-toolchain.tomlwill pull the component unnecessarily on machines that don't use it. Consider removing it, or documenting that it's there for IDE users.Positives worth keeping
{error_msg}instead of"{}", error_msg) — correct Rust 2021 idiom, enforced by theclippy::uninlined-format-argslint already in the project.assert!(x)/assert!(!x)overassert_eq!(x, true/false)— proper idiomatic usage...Default::default()struct initialization pattern is cleaner.rust-toolchain.tomland mirroring the same version in CI workflows eliminates "works on my rustc" drift.justfilecomment block clearly explains the source-of-truth intent — helpful for new contributors.