chore(linter): migrate Makefile to justfile#19473
Open
Conversation
91fc9ea to
6ae14c9
Compare
Migrate linter build targets from Make to Just. The Makefile now delegates to just with a deprecation warning, preserving backwards compatibility for existing make invocations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The deprecated.mk shim forwards all make variable assignments to just via JUSTFLAGS. This breaks when inherited variables (like GO_TEST_FLAGS from parent make processes) are not defined in the target justfile, since just rejects unknown variable overrides. Fix by passing variables as environment variables instead of just CLI args. Since all shared justfile variables (GITCOMMIT, GITDATE, VERSION, GOOS, GOARCH, etc.) use env() for defaults, they still pick up the forwarded values. Unknown variables are silently ignored. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The .PHONY declaration was formatted as a recipe (indented under .PHONY:) rather than as a prerequisite list (.PHONY: targets). This caused Make to treat targets like `cannon` and `op-program` as file/directory targets, and since directories with those names exist in the repo, Make would skip them with "is up to date" instead of running the just delegation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The original Makefile only rebuilt when files under analyzers/ or .custom-gcl.yml changed. Replicate this with a timestamp check in the just build recipe. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71f8602 to
b7cd8f2
Compare
…date.sh Move the file-dependency freshness check from an inline bash script in linter/justfile into a standalone helper at justfiles/uptodate.sh so other justfiles can reuse the same pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #19473 +/- ##
===========================================
- Coverage 75.8% 75.3% -0.5%
===========================================
Files 671 194 -477
Lines 71207 11285 -59922
===========================================
- Hits 53991 8502 -45489
+ Misses 17072 2639 -14433
Partials 144 144
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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 free
to 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.
Summary
linter/Makefilebuild targets (build,test,clean) to a newlinter/justfileusing the sharedgo.justrecipesjustfiles/deprecated.mk) that delegates tojust, preserving backwards compatibility for existingmakeinvocationsjustfiles/flags.mkto extract Make variable assignments intoJUSTFLAGSfor forwarding to just as env varsjustfiles/uptodate.shhelper script, so other justfiles can use the same pattern to skip unnecessary rebuildsStack
Test plan
just buildinlinter/builds the custom linter (skips if up to date)make buildinlinter/delegates tojust buildwith deprecation warningjust testrunsgo test ./...successfully🤖 Generated with Claude Code