Skip to content

build: rename dev scripts to compile/lint#680

Merged
0xisk merged 4 commits into
mainfrom
build/rename-compile-lint-scripts
Jul 17, 2026
Merged

build: rename dev scripts to compile/lint#680
0xisk merged 4 commits into
mainfrom
build/rename-compile-lint-scripts

Conversation

@0xisk

@0xisk 0xisk commented Jul 15, 2026

Copy link
Copy Markdown
Member

Types of changes

What types of changes does your code introduce to OpenZeppelin Midnight Contracts?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Split out from #673 per review feedback, to keep the live-test harness PR
focused on the harness.

Renames the developer-facing scripts and Turbo tasks:

  • compact / compact:*compile / compile:*
  • fmt-and-lint / fmt-and-lint:*lint / lint:* (matching compact-tools)

The README, CONTRIBUTING guide, CI workflows, and the bug-report template are
updated to match.

Scope note: this is a dev-tooling rename only. It is "breaking" solely for
local and CI commands (yarn compact becomes yarn compile). The contract
library, its published API, and the compiler binaries (compact-compiler,
compact compile) are unchanged. The @openzeppelin/compact-* package names,
the skip-compact toolchain-install flag, and the compact keyword are left
as-is.

PR Checklist

  • I have read the Contributing Guide
  • I have added tests that prove my fix is effective or that my feature works. N/A: tooling rename, no behavior change.
  • I have added documentation for new methods or changes to existing method behavior.
  • CI Workflows Are Passing

Further comments

The changelog entry references this PR number; it is filled in once the PR is
opened.

Summary by CodeRabbit

  • Documentation

    • Updated development, compilation, testing, and formatting instructions to use the new compile and lint commands.
    • Updated the bug report template with the correct compilation command.
    • Refreshed the unreleased changelog entries.
  • Chores

    • Renamed compilation and linting scripts across project tooling.
    • Updated automated checks and test workflows to use the renamed commands.

Rename the contract-compilation scripts and Turbo tasks
`compact` / `compact:*` to `compile` / `compile:*`, and the Biome
scripts `fmt-and-lint` / `fmt-and-lint:*` to `lint` / `lint:*`
(matching compact-tools). Update the README, CONTRIBUTING, CI
workflows, and issue template that reference them.

The compiler binary invocations (`compact-compiler`, `compact
compile`), the `@openzeppelin/compact-*` package names, the
`skip-compact` toolchain-install flag, and the `compact` keyword are
left unchanged.

Refs: #673
@0xisk
0xisk requested review from a team as code owners July 15, 2026 12:45
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0795cfd2-c5fd-460e-a1f5-a02e6fc314df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Renames contract compilation scripts and Turbo tasks from compact to compile, and Biome scripts from fmt-and-lint to lint. CI workflows, documentation, issue templates, contributor guidance, and changelog entries are updated to use the new commands.

Changes

Command renames

Layer / File(s) Summary
Compilation and lint task wiring
contracts/package.json, package.json, turbo.json
Contract scripts, workspace scripts, and Turbo task dependencies use the renamed compilation and lint commands.
CI and command documentation
.github/workflows/*, .github/ISSUE_TEMPLATE/*, README.md, CONTRIBUTING.md, CHANGELOG.md
CI commands, examples, contributor instructions, issue templates, and changelog entries use the new command names.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: andrew-fleming

Poem

A rabbit hops where compact once ran,
Compile now leads the build caravan.
Lint checks sparkle, workflows align,
Docs follow every renamed sign.
“Hop-hop hooray!” says the bunny divine.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: renaming developer scripts from compact/fmt-and-lint to compile/lint.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch build/rename-compile-lint-scripts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 11-17: Add a root-level compile:multisig script alongside the
existing compile:access, compile:archive, and other compile wrappers, invoking
the matching Turbo task with the `@openzeppelin/compact-contracts` filter and
log-prefix setting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 19b8b703-e80e-4cf9-862c-e10218f81727

📥 Commits

Reviewing files that changed from the base of the PR and between 477afa9 and 90f0f2f.

📒 Files selected for processing (9)
  • .github/ISSUE_TEMPLATE/01_bug_report.yml
  • .github/workflows/checks.yml
  • .github/workflows/test.yml
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • contracts/package.json
  • package.json
  • turbo.json

Comment thread package.json
Comment on lines +11 to +17
"compile": "turbo run compile --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:access": "turbo run compile:access --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:archive": "turbo run compile:archive --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:crypto": "turbo run compile:crypto --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:security": "turbo run compile:security --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:token": "turbo run compile:token --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:utils": "turbo run compile:utils --filter=@openzeppelin/compact-contracts --log-prefix=none",

@coderabbitai coderabbitai Bot Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Expose compile:multisig at the workspace root.

contracts/package.json and turbo.json define this task, but yarn compile:multisig currently fails because Line 11-17 omits its root wrapper.

Proposed fix
     "compile:crypto": "turbo run compile:crypto --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
+    "compile:multisig": "turbo run compile:multisig --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
     "compile:security": "turbo run compile:security --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"compile": "turbo run compile --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:access": "turbo run compile:access --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:archive": "turbo run compile:archive --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:crypto": "turbo run compile:crypto --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:security": "turbo run compile:security --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:token": "turbo run compile:token --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:utils": "turbo run compile:utils --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile": "turbo run compile --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
"compile:access": "turbo run compile:access --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
"compile:archive": "turbo run compile:archive --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
"compile:crypto": "turbo run compile:crypto --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
"compile:multisig": "turbo run compile:multisig --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
"compile:security": "turbo run compile:security --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
"compile:token": "turbo run compile:token --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
"compile:utils": "turbo run compile:utils --filter=`@openzeppelin/compact-contracts` --log-prefix=none",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 11 - 17, Add a root-level compile:multisig script
alongside the existing compile:access, compile:archive, and other compile
wrappers, invoking the matching Turbo task with the
`@openzeppelin/compact-contracts` filter and log-prefix setting.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't fail bc of how yarn 4 resolves. From yarn's docs for yarn run:

...if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.

That said, we should still include a wrapper for multisig

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrew-fleming, good catch — thanks for the clarification on Yarn 4's colon-resolution fallback. That explains why yarn compile:multisig doesn't hard-fail today. Agreed that adding the explicit root wrapper for compile:multisig is still worthwhile for consistency with the other compile:* scripts and to avoid relying on the implicit workspace fallback.


✏️ Learnings added
Learnt from: andrew-fleming
Repo: OpenZeppelin/compact-contracts PR: 680
File: package.json:11-17
Timestamp: 2026-07-15T16:22:24.718Z
Learning: In this repository (OpenZeppelin compact-contracts), Yarn 4 resolves `yarn run <name>` for scripts containing a colon by falling back to a workspace script if exactly one workspace defines a script with that matching name, even if no root-level script wrapper exists. This is documented Yarn behavior, not a bug, but the project still adds explicit root-level wrapper scripts (e.g., in package.json `scripts`) for each `compile:*` task for consistency.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@0xisk 0xisk self-assigned this Jul 15, 2026

@andrew-fleming andrew-fleming left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just add a multisig compile wrapper in the root manifest and we're good to go!

Comment thread package.json
Comment on lines +11 to +17
"compile": "turbo run compile --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:access": "turbo run compile:access --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:archive": "turbo run compile:archive --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:crypto": "turbo run compile:crypto --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:security": "turbo run compile:security --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:token": "turbo run compile:token --filter=@openzeppelin/compact-contracts --log-prefix=none",
"compile:utils": "turbo run compile:utils --filter=@openzeppelin/compact-contracts --log-prefix=none",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't fail bc of how yarn 4 resolves. From yarn's docs for yarn run:

...if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.

That said, we should still include a wrapper for multisig

The multisig compile task is defined in contracts/package.json and
turbo.json but had no root-level wrapper, unlike the other compile:*
scripts. yarn 4 masks this via its colon-name workspace fallback, so
it never hard-failed, but the explicit wrapper keeps the root scripts
consistent and avoids relying on the implicit fallback.
@0xisk
0xisk requested a review from andrew-fleming July 17, 2026 10:27

@andrew-fleming andrew-fleming left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@0xisk
0xisk merged commit 05c3914 into main Jul 17, 2026
8 checks passed
@0xisk
0xisk deleted the build/rename-compile-lint-scripts branch July 17, 2026 15:29
0xisk added a commit that referenced this pull request Jul 17, 2026
Rebasing onto main replays this branch's earlier compile->compact and
check->fmt-and-lint rename churn on top of main's #680 rename, which
silently reverts the script and Turbo task names back to the old form
wherever git saw no conflict.

Restore main's compile:*/lint* naming across package.json, turbo.json,
the test/bug-report workflows, and scripts/keyIntegrity.ts, and refresh
yarn.lock for main's @types/node and fast-check bumps (#685, #686).
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.

2 participants