Compile the Linux shell, and keep compiling it - #551
Merged
Conversation
cargo check has been failing on Linux on main. download_linux_ffmpeg verifies its download against a pinned SHA256, which is the whole point of #518, and the function it calls was gated #[cfg(target_os = "macos")]. On Linux the call referred to something that did not exist, so the Linux release build would have failed after the tag existed and after the other two platforms had begun uploading assets. The gate belongs on unix. Both callers are Unix; Windows takes a different path, and widening further would only add a dead-code warning there. The three verify_pinned_sha256 tests were macOS-gated as well, so Linux was depending on a function it had never once tested. They move with it: the Linux suite goes from 57 to 63. Fixing the gate alone leaves the hole open, so this adds linux-check.yml. ci.yml runs on every PR and is entirely ubuntu-latest, which is exactly what made Linux look covered: it never invokes cargo. macos-check.yml and windows-check.yml are manual because they occupy the self-hosted machine that builds releases. This one is GitHub-hosted and disposable, so there is no cost argument for making it manual, and no reason for the fork guard the other two carry. Verified on Ubuntu 24.04: cargo fmt clean, cargo clippy --all-targets -D warnings clean, cargo test 63 passed. Windows unchanged at 57 passed, clippy clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #550
Closes #531
cargo checkhas been failing on Linux onmain. Found by building the shell in WSL against the real cfg gates.The break
download_linux_ffmpegverifies its download against a pinned SHA256, which is the whole point of #518. The function it calls was macOS-gated, so on Linux the call referred to something that did not exist.The Linux release build would have failed after the tag existed, and after the macOS and Windows jobs may already have uploaded their assets, because
linux-release.ymlis the only thing that compiles this code.The gate belongs on
unix. Both callers are Unix, Windows takes a different path, and widening further would only add a dead-code warning there.The tests were dark too
The three
verify_pinned_sha256tests were#[cfg(target_os = "macos")]as well, so Linux depended on a function it had never once tested. They move with it.The Linux suite goes from 57 to 63. Three of those six are these.
Keeping it compiled
Fixing the gate alone leaves the hole open, which is #531. Whatever lands next inside a Linux cfg block has the same nothing waiting to catch it.
linux-check.ymlmirrors the other two check workflows with one deliberate difference: it runs on every PR that touchesdesktop/src-tauri, not on manual dispatch.macos-check.ymlandwindows-check.ymlare manual because they occupy the self-hosted machine that builds releases. This one is GitHub-hosted and disposable, so there is no cost argument, and no reason for the fork guard the other two carry either.It installs the same GTK and WebKit packages
scripts/linux/make-portable.shneeds, then runscargo fmt --check,cargo build --tests,cargo clippy --tests -- -D warningsandcargo test.ci.ymlrunning entirely onubuntu-latestis what made Linux look covered. It never invokes cargo.Verification
Ubuntu 24.04, WSL:
Windows, unchanged by the gate move:
No clippy allowances were needed on Linux. Unlike the Windows check's first run, this target came up clean.
Note on 0.16.1
This is not in the 0.16.1 merge that just landed on
main. Tagging before this lands means the Linux release build fails.