chore(just): adopt the psa-systems/common shared task runner #58
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/FJCLI-44-adopt-common"
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?
Adopts the
psa-systems/commonshared task runner, vendored as thecommongit submodule and imported fromjustfile. Tracks FJCLI-44; depends on the no-compose CLI support added to common in GOV-39 (merged, PR psa-systems/common#8).What changed
commongit submodule (.gitmodules), pinned to commonmain(d424d6a, includes GOV-39).justfilewithimport 'common/common.just'plus config variables and only the two genuinely forgejo-cli-specific recipes (watch,build-windows). Net -205/+70 lines. NOset allow-duplicate-recipesshadows: shared recipes are the single source of truth and forgejo-cli adapts them by setting variables, per the common blast-radius rule.app = "forgejo-cli",binary_name = "fj",pre_commit_mode = "docker"+dev_image(rust-builder-glibc),test_args = ""(full suite),release_layout = "workspace",release_manifest = "crates/fj/Cargo.toml"(release_cratedefaults toapp).CLAUDE.mddocuments the submodule (git submodule update --initafter clone) and the variable contract.Behavior notes
pre-commitruns indockermode (nocompose.dev.yml): the four checks execute in the glibc builder image viadocker runwith per-user cargo cache volumes.test_args = ""runs lib + integration + doctests;--binsalone would skipfj-client's lib tests and thelibgit2_featuresintegration test.crates/fj/Cargo.toml(common'screate-release-workspace), dropping the cosmetic FJ-20/FJ-21 all-crate lockstep. Behavior-safe: the sibling deps are versionless path deps, and the engine still syncsCargo.lockfor the bumped crate, so--lockedbuilds are unaffected (this was the Path 1 decision)..forgejo/workflows/check.ymlis intentionally left standalone (keeps its--lockedbuild/test guarantee, which the reusable common workflow does not provide).Validation
just --list/just --evaluateresolve (shared recipes + localwatch/build-windows, variable overrides win).just pre-commitran green end-to-end in docker mode:cargo fmt --check, clippy--deny warnings,build --all-targets, and the full test suite all passed, including thelibgit2_featuresintegration test (libgit2_supports_https/libgit2_supports_ssh) and thefj_client/fj_coredoctests.Replace the standalone justfile with `import 'common/common.just'` from the new `common` git submodule, keeping only config variables and the two genuinely forgejo-cli-specific recipes (watch, build-windows). No `set allow-duplicate-recipes` shadows: the shared hooks/checks/build/release recipes are the single source of truth, and forgejo-cli adapts them purely by setting variables, per the common blast-radius rule. The justfile drops from 224 to ~78 lines. Because forgejo-cli has no compose.dev.yml (pure CLI), it sets pre_commit_mode = "docker" + dev_image so `just pre-commit` runs the checks in the rust-builder-glibc image via `docker run` (GOV-39 added this no-compose mode to common). test_args = "" runs the full suite (lib + integration + doctests) that `--bins` would skip; the libgit2_features integration test and fj-client lib doctests were verified running in a docker-mode pre-commit. release_layout = "workspace" + release_manifest point common's create-release engine at crates/fj/Cargo.toml; release_crate defaults to app ("forgejo-cli"), the binary crate's package.name. binary_name = "fj" makes build-docker-export report dist/fj. The .forgejo/workflows/check.yml is intentionally left standalone (keeps its --locked build/test guarantee). CLAUDE.md documents the submodule (git submodule update --init after clone) and the variable contract. #FJCLI-44 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: David Randall <David@NiceGuyIT.biz>