build(sdk): pin imogen-sdk as a git submodule (#7) - #8
Merged
Conversation
A `path` dependency pointing outside the repository carries no version and no revision, so nothing here recorded which SDK commit a given commit was built against. The submodule pointer does, and it is the same way imogen-ios and imogen-android already pin it. The committed lockfile had already drifted to imogen-sdk 0.1.0 while the SDK's main was 0.2.0 — precisely the silent divergence the pin exists to prevent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`actions/checkout` will not place a repository above the workspace root, so a sibling path dependency needed a second checkout and an `mv`. A submodule needs neither: `submodules: recursive` puts it where Cargo already looks, pinned to the commit under test. Releases no longer need `sdk_ref`. It defaulted to `main`, so a tag cut without setting it shipped against whatever main was that day and recorded nothing; the tag now names its own SDK commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pinning the SDK by submodule records which commit was built, but the lockfile is a second record of the same thing and CI regenerated it silently: a bump that forgot to commit Cargo.lock went green here and failed later at the release build, which was the only step passing --locked. By then the stale lockfile is already on main — which is how it drifted to imogen-sdk 0.1.0. CONTRIBUTING now also says the SDK is committed and merged there first. CI fetches the submodule by commit, so a pointer at an unpushed commit fails with `did not contain <sha>` however well it built locally. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Sep 7, 2026
Merged
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 freeto 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#7
Implements option 1 from the issue — the same way
imogen-iosandimogen-androidalreadypin the SDK. Options 2 and 3 were considered and set aside: nothing is published yet
(ergofobe/imogen-sdk#3 is open), and a pinned
revwould give up the edit-in-placeworkflow the path dependency exists to support.
Summary
imogen-sdkis vendored as a submodule atimogen-sdk/, so every commit here names theSDK commit it was built and tested against.
Cargo.tomlbecomespath = "imogen-sdk/rust"and the load-bearing sibling-directory layout goes away — a plain clone or a
git worktreenow resolves the dependency wherever it lives.
submodules: recursive, dropping the secondactions/checkoutand themv ... ../imogen-sdkthat only existed becauseactions/checkoutrefuses to write above the workspace root.release.yml'ssdk_refinput is gone: a tag now names its own SDK commit instead of defaulting to whatever
mainwas that day. Dispatching a release build against a different SDK is still possible — move
the pointer on a branch and dispatch; the
publishjob is tag-gated, so nothing ships.--locked. The lockfile is a second record of the same pin and CI used toregenerate it silently, so a bump that forgot to commit
Cargo.lockwent green and failedlater at the release build — the only step that passed
--locked. Main had already driftedthis way: its lockfile said
imogen-sdk 0.1.0against an SDK at0.2.0, so re-running thev0.2.0release today would have failed. Refreshed here.Test plan
cargo test --locked— 103 passed, 2 ignoredcargo fmt --check,cargo clippy --all-targets --locked -- -D warningscargo build --release --lockedcargo metadataresolvesimogen-sdktoimogen-cli/imogen-sdk/rust, not to anysibling checkout — confirmed with a sibling
imogen-sdkworktree present, so thesubmodule genuinely wins
9e6a17aisorigin/mainof imogen-sdk and itsv0.2.0tagubuntu-latestandmacos-latestNotes
cargo install --path .) still assumes you already have apopulated checkout; the Building section below it carries the
--recurse-submodulesinstruction. Left as-is rather than putting a clone command in the opening hook.
imogen-serverhas the same problem (SDK is resolved from an unpinned sibling checkout, so no commit records which SDK it was built against imogen-server#16) and is deliberately nottouched here — separate repo, separate PR — but it should land on this same answer.
imogen-cli(add a siblingimogen-sdkworktree)is superseded by
git submodule update --init --recursive; that file lives outside thisrepository.
🤖 Generated with Claude Code