fix(tauri): rename misleading ci feature and fail loudly without it…#1354
fix(tauri): rename misleading ci feature and fail loudly without it…#1354VanshajPoonia wants to merge 2 commits into
ci feature and fail loudly without it…#1354Conversation
…AOSSIE-Org#1347) The `prod()` function that spawns the bundled backend/sync sidecars was gated behind a feature named `ci`, which reads as "only needed for continuous integration." In reality it's required for every working release build (pr-check-build.yml and build-and-release.yml already pass --features ci to all of them). A release build without that flag compiled fine and launched normally, but silently never started its backend. - Rename the feature to `bundled-sidecars` everywhere it's referenced (Cargo.toml, main.rs cfg attributes, both workflow files) so its purpose is clear from the name. - Make the no-feature `prod()` variant fail loudly (return an Err that aborts startup) when built in release mode, while still no-op'ing in debug builds so `cargo tauri dev` is unaffected.
|
Warning Review limit reached
Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughRenames the Tauri Cargo feature Changesbundled-sidecars feature rename and error guard
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Extract the no-op/fail-loudly decision into prod_without_bundled_sidecars() so it's testable without mocking tauri::AppHandle (the no-feature prod() variant never touches its app/resource_path args). Add a test asserting it no-ops under debug_assertions and errors otherwise, verified to pass under both `cargo test` and `cargo test --release`.
Fixes #1347
Screenshots/Recordings:
N/A — this is a backend/build-config fix (Rust feature flag rename + CI workflow args), no UI changes.
Additional Notes:
The
prod()function that spawns the bundled backend/sync sidecars was gated behind a Cargo feature namedci, which reads as "only needed for continuous integration." In reality it's required for every working release build — bothpr-check-build.ymlandbuild-and-release.ymlalready pass--features cito all of them. A release build compiled without that flag still launched normally, but silently never started its backend, with no error.Changes:
citobundled-sidecarseverywhere it's referenced (Cargo.toml,main.rscfg attributes, both workflow files) so its purpose is clear from the name.prod()variant fail loudly (return anErrthat aborts startup) when built in release mode, while still no-op'ing in debug builds socargo tauri devis unaffected.cargo checkagainst both feature combinations (with/withoutbundled-sidecars, debug and release) andcargo fmt --check— all clean.AI Usage Disclosure:
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.
Check one of the checkboxes below:
I have used the following AI models and tools: Codex
Checklist
Summary by CodeRabbit
New Features
Bug Fixes