fix(build): stub build.rs in dep-prime; group justfile recipes #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/dockerfile-stub-buildscript-and-just-groups"
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?
Summary
Two changes:
oci-build/Dockerfilebuild fix. The dependency-priming step wrote an emptybuild.rs, then rancargo build --releaseagainst aCargo.tomlthat declaresbuild = "build.rs". Cargo treated the empty file as a build script and failed withE0601: main function not found in crate build_script_build. Replaceecho "" > build.rswithecho "fn main() {}" > build.rsso the stub satisfies the build-script contract during the dep-only prebuild; the realbuild.rsis then copied in over the stub before the actual source build.justfilerecipe groups. Tag every recipe with a[group('...')]attribute (hooks,dev,run,checks,build,release) sojust --listrenders recipes in named sections instead of one flat list. No behavioral change. Requires just >= 1.27 (CI/dev image at 1.42.4).Test plan
just check-dockersucceeds locally: dep-prime stage compiles, then the real-source stage finishes (Compiling youtrack-cli v0.1.0 ... Finished release profile).just --listshows recipes grouped under[build],[checks],[dev],[hooks],[release],[run]..forgejo/workflows/build-oci-image.yml(push or tag) and confirm CI completes through bothcargo build --releaseinvocations.Two changes in one PR: oci-build/Dockerfile: the dependency-priming stub wrote an empty build.rs, then ran `cargo build --release` against a Cargo.toml that declares `build = "build.rs"`. Cargo treated the empty file as a build script and failed with E0601 (`main` function not found in crate `build_script_build`). Replace `echo "" > build.rs` with `echo "fn main() {}" > build.rs` so the stub satisfies the build-script contract during the dep-only prebuild; the real build.rs is then copied in over the stub. justfile: tag every recipe with a `[group('...')]` attribute (hooks, dev, run, checks, build, release) so `just --list` renders recipes in named sections instead of one flat list. No behavioral change. Requires just >= 1.27 (host has 1.42.4). Verified locally with `just check-docker`: dep-prime stage and real-source build both complete; image tagged youtrack-cli:check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>