fix(contracts): build hierarchical .compact tree for publish#539
Conversation
The flat build copied every module to the package root, but the modules' internal imports use source-tree relative paths (`../utils/Utils`, `../security/Initializable`). Flattening severed them, so 7 of 10 published modules failed to compile in any consumer. Add `--hierarchical` to the build script so the published package preserves the access/ security/ token/ utils/ tree. Cross-module imports now resolve, and consumer import paths match the documented `@openzeppelin/compact-contracts/<dir>/<Module>` convention. Verified by packing dist, installing the tarball in a fresh app, and compiling all 10 modules (including dependent ones) with skip-zk.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe ChangesBuild Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
andrew-fleming
left a comment
There was a problem hiding this comment.
I was just looking into this. Good call!
Types of changes
What types of changes does your code introduce to OpenZeppelin Midnight Contracts?
Put an
xin the boxes that applyFixes #???
PR Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
Summary by CodeRabbit
Release Notes
This release contains no user-facing changes. Internal build configuration has been updated to improve the build process.