Repository navigation
Conversation
The macOS runners have 3 cores and 7 GB of memory, and cargo test compiled codeg_lib twice at once: the rlib the bins and integration tests link, and the lib's own unit-test build, each several GB on its own. The desktop and server cells spent most of their time in swap, compiling for about 47 and 25 minutes against 8 and 4 on Linux. On macOS those two cells now build the unit tests first with cargo test --no-run, so the cargo test that follows finds them fresh and compiles the rlib alone. What gets tested is unchanged.
In this PR's first run the macOS server job took 15.6 minutes instead of 30, but the desktop job got slower, 62 minutes instead of 59: its cargo test built the unit tests again. Tauri's generate_context! writes its embedded assets into the build script's out dir during the crate's first compile, after that compile started, so the next cargo run takes them for changes, and a CI job always starts without them. Alone, the desktop unit-test build still took 18 minutes, so that cell is back to how it was.
ensure_sidecar_placeholder watched each sidecar path and wrote the 0-byte placeholder again on every run. Cargo counts a watched file as changed when it is newer than the start of the build script's last run, so wherever the sidecars were placeholders (CI, a fresh clone, a worktree that runs cargo directly), every cargo invocation reran the script and rebuilt every target of the crate, with nothing changed. An existing placeholder is now left alone, and a new one is dated back to 1970. The warning still shows on every build: cargo replays it when the script does not rerun.
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.
Why
The macOS cells are the slowest in the matrix, and nearly all of their time goes to compiling codeg's own crates. The public-repo
macos-latestrunner has 3 cores and 7 GB of memory, where Linux and Windows have 4 cores and 16 GB.cargo testcompiles codeg_lib twice at the same time: the rlib that the bins and integration tests link, and the lib's own unit-test build. Measured locally with CI's settings (line-tables-only,-j3), both were past 6 GB of physical footprint two and a half minutes in, and still growing. Side by side they do not fit, and the runner swaps.What
macOS server cell: the lib's unit tests are built on their own first, with
cargo test --no-default-features --features server-bin --lib --no-run. Thecargo teststep that follows finds them fresh and compiles the rlib alone.The first run of this PR did the same in the desktop cell, which got slower:
The desktop cell's
cargo testbuilt the unit tests again. One reason is the build.rs loop fixed below. The other stays: Tauri'sgenerate_context!writes its embedded assets into the build script's out dir during the crate's first compile, after that compile started, so the next cargo run takes them for changes, and a CI job always starts without them. Even reused, the desktop unit-test build alone took 18 minutes, so the desktop cell is back to how it was.build.rs: sidecar placeholders are no longer rewritten on every build.
ensure_sidecar_placeholderwatches each sidecar path and wrote the 0-byte placeholder again on every run. Cargo counts a watched file as changed when it is newer than the start of the build script's last run, so wherever the sidecars are placeholders (CI, a fresh clone, a worktree that runs cargo directly), every cargo invocation reran the script and rebuilt every target of the crate. Threecargo check -vin a row without sidecars saidDirty codeg: the file `binaries/codeg-mcp-aarch64-apple-darwin` has changedeach time. With the fix, the run after the first isFresh. An existing placeholder is now left alone and a new one is dated back to 1970. The warning still shows on every build, since cargo replays it when the script does not rerun.What to look for
The macOS server job near 15 minutes again, and the other jobs at main's times.
🤖 Generated with Claude Code