Skip to content

chore(linter): migrate Makefile to justfile#19473

Open
ajsutton wants to merge 5 commits intodevelopfrom
aj/migrate-linter-makefile-to-just
Open

chore(linter): migrate Makefile to justfile#19473
ajsutton wants to merge 5 commits intodevelopfrom
aj/migrate-linter-makefile-to-just

Conversation

@ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Mar 10, 2026

Summary

  • Migrates linter/Makefile build targets (build, test, clean) to a new linter/justfile using the shared go.just recipes
  • Replaces the original Makefile with a deprecation shim (justfiles/deprecated.mk) that delegates to just, preserving backwards compatibility for existing make invocations
  • Adds shared justfiles/flags.mk to extract Make variable assignments into JUSTFLAGS for forwarding to just as env vars
  • Extracts the file-dependency freshness check into a reusable justfiles/uptodate.sh helper script, so other justfiles can use the same pattern to skip unnecessary rebuilds

Stack

  1. This PR — linter migration + shared infrastructure
  2. optimism#19474 — cannon migration
  3. optimism#19475 — op-e2e migration
  4. optimism#19476 — op-program migration
  5. optimism#19477 — root Makefile migration
  6. optimism#19482 — CI config update
  7. optimism#19483 — cannon testdata migration

Test plan

  • just build in linter/ builds the custom linter (skips if up to date)
  • make build in linter/ delegates to just build with deprecation warning
  • just test runs go test ./... successfully
  • CI passes

🤖 Generated with Claude Code

@ajsutton ajsutton requested a review from a team as a code owner March 10, 2026 22:49
@ajsutton ajsutton force-pushed the aj/migrate-linter-makefile-to-just branch from 91fc9ea to 6ae14c9 Compare March 10, 2026 23:41
ajsutton and others added 4 commits March 11, 2026 03:47
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>
@ajsutton ajsutton force-pushed the aj/migrate-linter-makefile-to-just branch from 71f8602 to b7cd8f2 Compare March 11, 2026 03:48
…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
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.3%. Comparing base (4444277) to head (4603341).

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              
Flag Coverage Δ
cannon-go-tests-64 66.4% <ø> (ø)
contracts-bedrock-tests 80.2% <ø> (ø)
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 477 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant