Skip to content

just check and just pre-pr fail: scripts/checks/reinitializer does not exist #410

Description

@JspIIV

just check runs reinitializer-check-no-build, which shells out to a package that isn't in the tree:

# justfile:245
reinitializer-check-no-build:
  go run ./scripts/checks/reinitializer

scripts/checks/ contains common, interfaces, spacers and test-validation — there is no reinitializer. The sibling targets use the same relative form (go run ./scripts/checks/interfaces) and those packages do exist, so this one looks left behind rather than pathed differently.

Why it matters

check invokes the sub-checks as one just command, so the failure stops the chain:

check:
  @just semgrep-test-validity-check \
  semgrep \
  lint-check \
  snapshots-check-no-build \
  unused-imports-check-no-build \
  validate-deploy-configs \
  validate-spacers-no-build \
  reinitializer-check-no-build \   # <- fails here
  interfaces-check-no-build \      # <- never runs
  lint-forge-tests-check-no-build  # <- never runs

So two checks that do exist never get a chance to run.

It also breaks just pre-pr (and just pre-commit, which aliases it). That recipe is set -e and calls just check partway through:

just lint
just build-source
just check          # <- aborts here

# Restore build artifacts after running checks.
if [ -d "$TEMP_BUILD_DIR" ]; then
  ...

The artifact-restore block after it is skipped too, so the dev-build cache the recipe went to some trouble to save isn't put back.

Why it isn't showing up in CI

CI doesn't call check, pre-pr or pre-commit — the workflows use just deps, just forge-build, just lint-check, just semver-lock and just test. So CI stays green while the local "run all checks" path is broken.

On the check itself

Both targets describe it as "Checks that all upgrade/initialize functions have proper reinitializer modifiers". Grepping the tree, nothing else implements that: the only reinitializer hits are OpenZeppelin's modifier in src/vendor/Initializable.sol and a comment in test/universal/OptimismMintableERC20Factory.t.sol. So the check the justfile advertises isn't running anywhere right now.

Fix

I haven't sent a PR because the right fix depends on something I can't tell from outside: whether the script was dropped deliberately (in which case reinitializer-check, reinitializer-check-no-build and the line in check should go) or whether it went missing and should come back. Happy to send whichever you'd prefer.

Verified against main at 4f7acda, and scripts/checks/ on GitHub shows the same four packages.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions