build: rename dev scripts to compile/lint#680
Conversation
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
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughRenames contract compilation scripts and Turbo tasks from ChangesCommand renames
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (9)
.github/ISSUE_TEMPLATE/01_bug_report.yml.github/workflows/checks.yml.github/workflows/test.ymlCHANGELOG.mdCONTRIBUTING.mdREADME.mdcontracts/package.jsonpackage.jsonturbo.json
| "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", |
There was a problem hiding this comment.
🎯 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.
| "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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
@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.
andrew-fleming
left a comment
There was a problem hiding this comment.
Let's just add a multisig compile wrapper in the root manifest and we're good to go!
| "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", |
There was a problem hiding this comment.
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.
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).
Types of changes
What types of changes does your code introduce to OpenZeppelin Midnight Contracts?
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:*(matchingcompact-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 compactbecomesyarn compile). The contractlibrary, its published API, and the compiler binaries (
compact-compiler,compact compile) are unchanged. The@openzeppelin/compact-*package names,the
skip-compacttoolchain-install flag, and thecompactkeyword are leftas-is.
PR Checklist
Further comments
The changelog entry references this PR number; it is filled in once the PR is
opened.
Summary by CodeRabbit
Documentation
compileandlintcommands.Chores