refactor(workspace): convert to Cargo workspace, move binary to crates/yt-cli (YT-16) #59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/cargo-workspace-yt-cli-YT-16"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Converts the repo to a Cargo workspace and relocates the binary crate to
crates/yt-cli, per YT-16. Pure structural change: no source logic moves, library crates land in later subtasks (YT-17 onward).Changes
Root
Cargo.tomlbecomes workspace-only (resolver = "2",members = ["crates/*"]) with the shared dependency versions/features hoisted to[workspace.dependencies]. The binary crate now lives atcrates/yt-cli(package nameyoutrack-cli,[[bin]] name = "yt") and references each shared dep viaworkspace = true.src/,build.rs, andtests/article_roundtrip.rsmove undercrates/yt-cli/.build.rsgit-dir rerun triggers repoint to../../.gitso theYOUTRACK_CLI_GIT_HASH/YOUTRACK_CLI_BUILD_DATEinjection still fires from the new location.oci-build/Dockerfileandoci-build/Dockerfile.windowscopy the workspace plus member manifests, prime dependencies againstcrates/yt-cli/, and copy source from there. The build output path (/build/target/release/yt[.exe]) is unchanged, so theexportandruntimestages keep working. Thebuild-linux.yml/build-windows.ymlpath filters now watchcrates/**. Thejustfilecreate-releaserecipe reads/writes the version incrates/yt-cli/Cargo.tomlnow that the root carries no[package]table.Verification
cargo build --releasefrom the repo root producestarget/release/yt;yt --versionshows the injected git hash and build date.cargo test --all-targets: 308 unit tests pass; the relocatedarticle_roundtripintegration test passes.cargo fmt --checkandcargo clippy --all-targets -- -D warningsboth clean.just check-docker(builder stage ofoci-build/Dockerfile) builds green; the dependency-priming cache layer still works (onlyyoutrack-clirecompiles in the final layer) and the binary lands at/build/target/release/yt.Note on the commit trailer
The commit references the issue with a bare
#YT-16(link only, noStatecommand). Per the repo workflow, the Forgejo VCS integration applies trailer commands at push time, not merge time, so aState Donetrailer would resolve the issue prematurely while this PR is still in review.State Doneis left as a post-merge action.#YT-16
🤖 Generated with Claude Code