Repository navigation
fix(build): a newer Cargo.lock is stale only when it changes libobs-rust's packages (Refs #5323) - #5383
Merged
Conversation
…not stale, RED (Refs #5323) A kept Tier 2 tree fails with 'newer input Cargo.lock' when a PR adds a crate that libobs-rust does not use (merge-group run 44754423221, #5362): Cargo correctly keeps the archive, and the lockfile is newer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…GREEN (Refs #5323) Cargo's depfile lists only path dependencies, so the archive's registry packages come from the lockfile: the closure of libobs-rust through the lock's dependency lists. When the archive is newer than Cargo.lock, the check saves that closure and the archive's mtime in liblibobs_rust.lock-closure. A newer Cargo.lock is fresh only when its closure equals the stamp for an unchanged archive. No stamp, a stamp for another archive build, or a lockfile that cannot be read stay stale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
vpacher
added a commit
that referenced
this pull request
Nov 21, 2026
…5230) hybrid_archive_reads_the_repository_lockfile (#5383) used obs-dock-layout as a package that the repository lockfile does not have. This PR adds that crate, so in the merge queue the dependency resolved and the archive was stale for "it changes the packages" instead of "cannot be read" (Fast Gate, macOS and Windows Rust Tests, run 44900012182). The fixtures now use obs-unrelated-fixture and unrelated-fixture-dep. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 21, 2026
amsterdamboomer
pushed a commit
to amsterdamboomer/obs-studio
that referenced
this pull request
Nov 21, 2026
…obs-rust#5362) * test: obs-dock-layout model, RED against stubs (Refs obs-rust#5230) Step 2 of the dock layout plan on obs-rust#5230: a new crate with the layout model of the main window, no Qt and no platform code, so its decisions run on every CI target (W1, W5). Not used by the frontend yet; the adapter and its header come in step 3. The model keeps the sizes the user wants: the depth of each dock area in pixels and the length of each dock in its row, applied as shares of the row (D1). Only a separator drag changes them (D3, R7); a window change only puts them back where they fit. The record is the additive BasicWindow/DockSizes value with the hash of the DockState blob (D6). Tier 1 tests in obs-tests-gpu (the frontend's Rust category): record format, window changes (E2, E3, D1, R9), drags (D3 in a clamped row, R7), placement (hide/show, P7, E14, tabs), the restores of a layout with no known sizes (obs-rust#3740, P2, P5, P6, E25), the C ABI, and one session under a floating and a tiling window manager that must save the same record (W2). Every test fails here: the model's methods and the record codec are todo!(). Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat: obs-dock-layout model, GREEN (Refs obs-rust#5230) The model behind the stubs: - A row is the shown, docked docks of one area that share the area's edge; an area whose docks share one depth has a depth. - Window changes learn sizes not known yet (rescaled to the row's known sizes, never from a clamped row) and return the resizeDocks calls that give each row its shares and each area its pixels, as far as the preview has room. 1 px differences are left alone. - A separator drag records the docks and areas it resized; a press and release that resized nothing is no change. In a clamped row the dragged docks share the row's wanted total in their new ratio, so the untouched docks keep their shares (D3). - A dock moved to another area or tab group loses its length; hiding, showing and floating keep it. - Every number from the caller is clamped to +-2^20 px (and a record size above that is no record), so no sum or product can overflow and nothing panics across the C ABI. - A layout restored with no known sizes is restored again at each window change until it shows unclamped or the user changes something (the decision of 2026-11-20 on obs-rust#5230); quit then saves that blob. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: obs-dock-layout learns a side column at its minimum when the preview has room, RED (Refs obs-rust#5230) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: obs-dock-layout learns a side column at its minimum when the preview has room, GREEN (Refs obs-rust#5230) A dock at its minimum across its area's depth is a window clamp only when the central widget is at its minimum too. Real Qt (test_dock_state_restart on the adapter) showed a column the user left at its minimum: its depth was never learned, so every start had no complete sizes and ignored the record. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: lockfile fixtures use a package name no crate has (Refs obs-rust#5323, obs-rust#5230) hybrid_archive_reads_the_repository_lockfile (obs-rust#5383) used obs-dock-layout as a package that the repository lockfile does not have. This PR adds that crate, so in the merge queue the dependency resolved and the archive was stale for "it changes the packages" instead of "cannot be read" (Fast Gate, macOS and Windows Rust Tests, run 44900012182). The fixtures now use obs-unrelated-fixture and unrelated-fixture-dep. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Refs #5323
Problem
The archive freshness check (#5341) compares
Cargo.lockby modification time alone. A PR that adds a crate libobs-rust does not use changes the lockfile. Cargo then correctly keeps the archive, the checkout makes the lockfile newer, and Tier 2 Linux on a kept Dell tree fails:This ejected #5362 from the queue (run 44754423221, job 136350628389 on
dell-fsx3mn2-5). Every PR that adds a crate, or changes a dependency outside libobs-rust, hits it.Change
Cargo's depfile lists only path dependencies (a release
liblibobs_rust.dhas 1174 paths, all underrust/or build-script output, none from crates.io). So the archive's registry packages come from the lockfile: the closure oflibobs-rust, every package reachable from it through the lock's dependency lists, with version, source, checksum and resolved dependencies.Cargo.lock, the check saves that closure and the archive's mtime inliblibobs_rust.lock-closurebeside the archive (best effort: a read-only external archive keeps the mtime rule).Cargo.lockis newer, the archive is fresh only if the closure equals the stamp for an unchanged archive mtime.rust/libobs-rust/Cargo.tomlthat cannot be read, a dependency the lockfile does not lock.New module
rust/obs-build/src/libobs/lockfile.rs;check_rust_archivecallscheck_lockfile.Tests
obs-tests-app(rust/obs-build/tests/native/archive_freshness.rs), 2 new cases:hybrid_archive_checks_only_its_own_packages_in_a_newer_lockfile: a touched lockfile, a new unrelated crate and its dependency, and a secondserdefor another crate (Cargo then writesserde 1.0.1in libobs-rust's entry) stay fresh. A bumped dependency, a new dependency of a local crate, an unreadable lockfile, another archive build and a missing stamp are stale.hybrid_archive_reads_the_repository_lockfile: the repository's realCargo.lock(CRLF-tolerant) parses, stays fresh with an unrelated crate appended, and is stale when libobs-rust's own entry gets a new dependency.RED
951116345: both fail (newer input Cargo.lockfor the touched lockfile). GREEN18a196f8d: 6/6 archive freshness cases pass,./lintpasses (build-rust, Linux x86_64).End to end on a kept tree (build-rust): real
soldr cargo build --locked --release -p libobs-rustarchive and depfile, thensoldr cargo build --locked -p obs-sys --features bundledwithOBS_BUILD_RUST_ARCHIVE, before and after cherry-picking #5362's commits (lockfile change only, Cargo keeps the archive):0419d4a26stale Rust archive ...: newer input Cargo.locknative dependency x11(no X11 dev packages on that box)A kept tree gets its first stamp at the first build that writes the archive again; until then it behaves as master.
Tier 2/3: not applicable (build tooling, no C original). Test cost: the 2 cases take 0.01 s, no own threads, temp dirs only. No features.md line: no user-visible change.
🤖 Generated with Claude Code