build: add --cfg tokio_unstable to cargo rustflags (fixes GUI crash at startup) - #362
build: add --cfg tokio_unstable to cargo rustflags (fixes GUI crash at startup)#362rafa57600 wants to merge 1 commit into
Conversation
console-subscriber::init() (called unconditionally in rog-control-center/src/main.rs) panics at startup when Tokio is not compiled with --cfg tokio_unstable: task tracing requires Tokio to be built with RUSTFLAGS="--cfg tokio_unstable"! The flag is not committed anywhere in the repo (.cargo/config.toml, Makefile, distro-packaging/PKGBUILD and the workflows all omit it), so every build of the release tarball without a special RUSTFLAGS env produces a GUI that aborts immediately on launch (SIGABRT). Reproduced with the official Arch Linux package and the project's own release.yml build path. Committing the flag in .cargo/config.toml makes every Cargo build (including distro builds from the source tarball) compile with it by default. Co-authored-by: AnthraCode <288609694+anthracode@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📜 Recent review details🔇 Additional comments (1)
📝 SummarySummary by CodeRabbit
WalkthroughThe Cargo configuration now applies ChangesTokio build configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This enables the Tokio configuration required by console-subscriber, preventing the control center from aborting during startup. No merge-blocking risk is established. Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This is an AI hallucination and violates our contributing guidelines. This will be closed as slop. |
What
Add
rustflags = ["--cfg", "tokio_unstable"]to.cargo/config.tomlso every Cargo build gets the cfg flag the code already requires.Why
console-subscriber ^0.5.0is an unconditional dependency, androg-control-center/src/main.rscallsconsole_subscriber::init()unconditionally. When Tokio was not compiled with--cfg tokio_unstable, that call panics at startup androg-control-centeraborts immediately (SIGABRT → core dump):The flag is not committed anywhere in the repo: not in
.cargo/config.toml, not in the Makefile, not indistro-packaging/PKGBUILD, not in the CI workflows. So any build of the release tarball without a specially-setRUSTFLAGSenv produces a GUI that cannot start.Impact
extrapackage (rog-control-center 6.4.0-2, built from this tarball): GUI crashes on every launch.release.ymlbuild path (distro-packaging/PKGBUILD→make build→ plaincargo build) is affected the same way.Test
Verified locally against
6.4.0(the Arch PKGBUILD with this flag builds and runs correctly; without it, crashes).🤖 Generated with AnthraCode (https://anthracode.com)
Closes #363