fix(release): stop dist building the plugin during the standalone release build - #281
Merged
Conversation
cargo-dist builds the whole workspace, so the release build compiles rustortion-plugin, which pulls iced_baseview -> baseview -> the x11 crate. Its build script hard-requires x11-xcb via pkg-config, which was not in the dist apt list, so v0.3.0's build died on both Linux targets after the tag had been pushed. v0.2.0 predates the plugin crate (#224), so this list had never been insufficient before and nothing on the PR path covers it: ci.yaml installs the full X11 set and passes, while release.yml derives its packages from dist-workspace.toml and does not. Mirrors the apt list in ci.yaml. Both dist targets build natively (ubuntu-22.04 and ubuntu-22.04-arm), so native packages are correct. pr-run-mode is set to upload temporarily to prove this on the real runners; it is removed before merge.
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns cargo-dist’s release runner system dependencies with the workspace’s current build requirements (notably the plugin GUI’s X11/XCB headers) so tagged releases can build successfully on both Linux targets.
Changes:
- Expand
[dist.dependencies.apt]indist-workspace.tomlto include the X11/XCB development packages needed by the plugin dependency chain. - Add in-file documentation explaining why the dist apt list must be kept in sync with CI’s apt list.
- Temporarily set
pr-run-mode = "upload"to force PR execution of dist artifact builds (called out as temporary in-file).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+22
to
+24
| # TEMPORARY - remove before merge. Builds release artifacts on the PR so the | ||
| # apt fix below is proven on the real runners instead of at tag time. | ||
| pr-run-mode = "upload" |
… in docs Replaces the previous approach of installing the plugin's X11 build dependencies. dist was running `cargo build --workspace`, so every release build compiled rustortion-plugin — whose iced_baseview -> baseview dep needs x11-xcb headers — and then discarded the result. plugin-release.yml builds the real bundles on `release: published`. precise-builds = true limits the build to the packages that actually produce release artifacts, i.e. the `rustortion` bin. The standalone reaches X11 through x11-dl, which dlopens at runtime and needs nothing at build time, so the original four apt packages are correct and the X11 list is reverted. Verified with `dist plan`: same artifacts, apt list back to four packages. Separately, both READMEs still told users to download `rustortion-<target>.tar.xz`. dist names the archive after the package, which became rustortion-standalone, so v0.3.0 ships `rustortion-standalone-<target>.tar.xz`. Pre-dates this branch; the docs have been wrong since the crate was split.
Verified on both runners: dist now builds with --package=rustortion-standalone and never compiles the x11 crate. Reverting to the default PR mode so ordinary PRs do not build release artifacts.
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.
The
v0.3.0tag build failed on both Linux targets. No release was published —hostnever ran, so nothing shipped and 0.2.0 is still latest on the releases page.Root cause
dist logs its invocation as:
cargo build --workspacecompiles every workspace member, includingrustortion-plugin→iced_baseview→baseview→ thex11crate, whose build script hard-requiresx11-xcbheaders. That plugin build is pure waste in this job: its output is discarded, andplugin-release.ymlbuilds the real CLAP/VST3 bundles onrelease: published.Why it was never caught. v0.2.0 predates the plugin crate (#224), so v0.3.0 was the first tag with the plugin in the workspace. Nothing on the PR path exercises the dist build —
ci.yamlinstalls a full X11 set and goes green, whilerelease.ymlderives its packages fromdist-workspace.toml. The two diverged silently, and the difference only surfaces after a tag is pushed.Fix
precise-builds = truenarrows the build to the packages that actually produce release artifacts.dist already knew what to ship —
rustortion-standaloneis the only package with a[[bin]],xtaskisdist = false, and core/ui/plugin are libraries. The bug was only in what it compiled to get there.The standalone reaches X11 through
x11-dl, whichdlopens at runtime and needs nothing at build time, so the original four apt packages were correct all along. An earlier revision of this PR added the plugin's ~20 X11 dev packages to the dist apt list; that treated the symptom and is reverted.Verified with
dist plan(local dist is 0.30.2, same as CI): identical artifacts, apt list back to four packages. Norelease.ymlregeneration needed — it reads the matrix from theplanjob at runtime.Also here
Both READMEs told users to download
rustortion-<target>.tar.xz. dist names the archive after the package, which becamerustortion-standalone, so v0.3.0 shipsrustortion-standalone-<target>.tar.xz. The binary inside is stillrustortion. This has been wrong since the crate split — it predates this branch and is unrelated to the build failure.Verification
pr-run-mode = "upload"is set temporarily so this PR runsbuild-local-artifactson the real runners instead of skipping it. Once both targets are green I'll drop that line and merge, so the thing that failed at tag time is proven before the tag moves.Then: delete and re-tag
v0.3.0on the fixed commit, regenerating the changelog after the tag is removed so this fix lands in the 0.3.0 section rather than leaking into 0.4.0's.