feat(common): add ABI compatibility checks and reorganize CI scripts#2167
Closed
feat(common): add ABI compatibility checks and reorganize CI scripts#2167
Conversation
Contributor
|
Would be nice to put your scripts in a dedicated folder within the |
Eikix
commented
Mar 25, 2026
PanGan21
reviewed
Mar 25, 2026
PanGan21
reviewed
Mar 25, 2026
Used by both abi-compat and upgrade-check subsystems.
Mirrors the ci/abi-compat/ structure: check.ts (CI entrypoint), lib.ts (core logic), list.ts (local multi-package report), hints.ts (domain config).
Capture exec errors with truncated output instead of swallowing them. Clean up worktrees explicitly on failure instead of relying on prune. Matches the pattern established in abi-compat/list.ts.
e654507 to
9b50494
Compare
- Remove --force flag from forge inspect in abi-compat/lib.ts to avoid redundant recompilation (4x per side per package). - Simplify printPackageReport return in abi-compat/list.ts. - Derive valid package names from PACKAGE_CONFIG in upgrade-check parseArgs instead of hardcoding strings.
Without --force, a prior failed compilation (e.g. before address constants are generated) leaves error artifacts in forge's cache. Subsequent runs reuse the cached failure even after the source files are fixed. Reproduced by: forge clean, attempt compilation without addresses (fails), generate addresses, run check — forge returns the cached error for Decryption while other contracts work.
Forge may prepend compilation progress text to stdout on the first invocation in a clean directory. This caused Decryption (the first contract checked) to fail JSON.parse in CI while subsequent contracts succeeded from cache. Extract the JSON array from the output instead of parsing the whole string, matching the approach used by the upgrade-check bytecode extraction.
Contributor
Author
|
Superseded by a refreshed PR opened from a new head branch to avoid stale bot review state and Mergify issues. |
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
ci/into subsystem folders:abi-compat/,upgrade-check/,shared/repoRootcomputationStructure
Both subsystems follow the same pattern:
check.ts— CI entrypoint (single package, GitHub Actions annotations)lib.ts— core comparison logiclist.ts— local multi-package report (creates worktrees, installs deps, runs comparison)config.ts— package names, contract lists, build depsWhat ABI compat checks
Local usage
Code smell fixes
ci/abi-compat/exceptions.ts: import from./abi-compat-config(nonexistent) fixed to./configci/upgrade-check/list.ts:run()now captures stderr/stdout on failure instead of swallowing errors; worktrees cleaned up explicitly instead of relying ongit worktree pruneci/upgrade-check/list.ts:repoRootuseddirname(import.meta.dir)which would resolve to wrong directory after move; fixed toresolve(import.meta.dir, "../..")ci/upgrade-check/list.ts: inlinePackageName/PACKAGE_CONFIGextracted toconfig.tsValidation
bun build --no-bundle