Skip to content

chore(build): fix clean/clean-all inconsistency and remove redundant build step#275

Merged
dbrattli merged 2 commits into
mainfrom
repo-assist/eng-justfile-clean-fix-2026-04-25-9172c248d7bb2637
Apr 26, 2026
Merged

chore(build): fix clean/clean-all inconsistency and remove redundant build step#275
dbrattli merged 2 commits into
mainfrom
repo-assist/eng-justfile-clean-fix-2026-04-25-9172c248d7bb2637

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist, an AI assistant for this repository.

Summary

Fixes two issues in the justfile build system:

1. clean / clean-all inconsistency

The clean recipe's own comment said it "preserves dotnet obj/bin directories", but the recipe body was deleting src/obj, src/bin, test/obj, and test/bin. This meant:

  • clean and clean-all produced exactly the same result — clean-all was a no-op wrapper
  • Every just build (which calls clean) performed a full dotnet restore from scratch, discarding the NuGet package cache

After this fix:

  • clean removes only Fable/Python build outputs and example artifacts. The .NET obj/bin directories are preserved so incremental dotnet build is fast.
  • clean-all (via clean + explicit removals) fully wipes obj/bin and forces a fresh NuGet restore. Use this when you want a guaranteed clean slate.

2. Redundant dotnet build in test recipe

# before
test: build
    dotnet build \{\{test_path}}   ← redundant
    dotnet run --project \{\{test_path}}

dotnet run always performs an implicit build before executing. The explicit dotnet build \{\{test_path}} step ran the same compilation twice, adding build time with no benefit. Removed.

Impact

  • Developer experience: just build and just test are faster because .NET restore/compilation is incremental instead of always starting from scratch.
  • No behaviour change for CI: CI always runs on a fresh runner, so clean vs clean-all semantics make no difference in CI. The build output is identical.
  • just clean-all is now meaningfully different from just clean — use it when you need a true fresh start.

Files changed

  • justfile — four lines removed, one comment updated

Note

🔒 Integrity filter blocked 10 items

The following items were blocked because they don't meet the GitHub integrity level.

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by Repo Assist · ● 2M ·

- clean no longer removes src/test obj/bin directories; the comment
  already said it should preserve these (for faster incremental builds)
- clean-all now correctly adds the obj/bin removal on top of clean,
  making it non-redundant (previously clean and clean-all did the same thing)
- remove redundant `dotnet build test` in test recipe; dotnet run
  already performs an implicit build before executing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dbrattli dbrattli changed the title [Repo Assist] chore(build): fix clean/clean-all inconsistency and remove redundant build step chore(build): fix clean/clean-all inconsistency and remove redundant build step Apr 26, 2026
@dbrattli dbrattli marked this pull request as ready for review April 26, 2026 09:15
`dotnet run --project` performs an implicit build, matching the
rationale already applied to the `test` recipe in this PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dbrattli dbrattli merged commit c91f38e into main Apr 26, 2026
2 checks passed
@dbrattli dbrattli deleted the repo-assist/eng-justfile-clean-fix-2026-04-25-9172c248d7bb2637 branch April 26, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant