Publish CodeGennable so the shipped example compiles from the package - #129
Publish CodeGennable so the shipped example compiles from the package#129thedavidmeister wants to merge 2 commits into
Conversation
`script/Build.sol` publishes and `.soldeerignore` excludes `/test`, so the package's only worked example imported a file no consumer receives. Move `CodeGennable` under `src/concrete/`, alongside the `src/generated/CodeGennable.sol` it produces, and point every import at it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 28 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch moved `test/concrete/CodeGennable.sol` to `src/concrete/` so the `script/Build.sol` that shipped in the published package could resolve its import. #138 deleted `script/Build.sol` and `src/generated/CodeGennable.sol` outright, so there is no shipped example left to compile and nothing in the published tree points at `test/`. Keeping the move would now push a test-only fixture into the published package for no consumer. `main`'s layout is taken: `CodeGennable` stays in `test/concrete/`, where `.soldeerignore`'s `/test` keeps it out of the package. This branch is now a no-op against `main`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Closing: this PR is now an empty diff, and the example it exists to publish no #138 deleted The branch took #76 — the published package is never compiled as published — stays open and Nothing here is lost. The branch is left in place as the audit trail. |
Important
OBSOLETE against post-#138
main— this branch is now an empty diff.Left open for the human to rule on; nothing here is a close decision.
The dangling import this PR fixes no longer exists. #138 deleted
script/Build.sol(the only file that imported../test/concrete/CodeGennable.sol) andsrc/generated/CodeGennable.sol(the orphaned artifact beside it).
git show origin/main:script/Build.sol→no such path. Nothing in the published tree points into
test/any more.Landing the move now would be a regression, not a no-op: it would push a
test-only fixture — an empty contract whose whole purpose is to give the suite
a non-zero
codehash— intosrc/, and therefore into the published soldeerpackage, with no consumer for it.
.soldeerignore's/testcurrently keeps itout.
mainwas merged in and its layout taken.git diff origin/mainon the mergecommit is empty.
Relationship to #76, restated. #76 is still OPEN and this branch no
longer closes it. #76 has two halves:
offered two routes, moving
CodeGennableintosrc/concrete/or adding/scriptto.soldeerignore; Strip thescript/Build.solworked example, leave the library lean #138 took a third, deletingscript/and thecommitted artifact entirely, which is why this PR's route is now moot.
open, and not this repo's. It is ci(sol): build the tree .soldeerignore publishes, not the repo tree rainix#316, exactly as this
PR's original description said. Nothing in this repo discharges it.
So #76's remaining live content lives in rainix. Whether #76 closes here is the
human's call, not this PR's.
Original PR description, kept for the record.
Closes #76.
What this is
Issue #76 has two halves. This PR is the repo half — removing the dangling
import so the package is internally consistent. The CI half (a job that compiles
the package as published, on every push) is in rainix, not here:
rainlanguage/rainix#316. Neither is complete on its own, so please
treat the two as one landing.
The decision the issue left open
The issue offered two routes and this takes the first, deliberately.
CodeGennableintosrc/concrete/(taken). Build cost: one filemove plus three import repoints. Carrying cost: the package ships one extra
8-line empty contract with no imports — and its output,
src/generated/CodeGennable.sol, already shipped, orphaned, alongside ascript/Build.solthat already shipped and could not compile. Removing itlater is deleting one file.
/scriptto.soldeerignore(rejected). Build cost: one line.Carrying cost: the library's only worked example — the thing a consumer
copies — is dropped from the package entirely, and
.soldeerignoregrowsanother hand-maintained entry. The issue's own thesis is that
.soldeerignorebeing a second definition of the library is the hazard; adding to it moves
away from the fix. Removing it later means re-adding the example and its
dependency, i.e. doing this PR anyway.
Imports changed
Other agents are in these files, so exactly:
script/Build.sol:8"../test/concrete/CodeGennable.sol""../src/concrete/CodeGennable.sol"test/lib/LibFs.buildFileForContract.t.sol:8"test/concrete/CodeGennable.sol""src/concrete/CodeGennable.sol"test/lib/LibCodeGen.bytecodeHashConstantString.t.sol:8"../concrete/CodeGennable.sol""src/concrete/CodeGennable.sol"The third was relative and is now root-relative, matching the sibling import on
line 6 of the same file. #56 moves
test/lib/totest/src/lib/; aroot-relative import survives that move, a
../-relative one does not.test/concrete/CodeGennable.solmoved tosrc/concrete/CodeGennable.solwithgit mv(content unchanged,=0.8.25concrete pragma unchanged). Nothing elsein the repo referenced it.
.audit/scope.jsonstill lists the old path and isleft alone — it is a frozen record of the audit at commit
7aa85a4, not amanifest.
QA
rainix-static soldeer-package-build(ci(sol): build the tree .soldeerignore publishes, not the repo tree rainix#316)run against this repo — fails on base (
935c725, exit 1,Error (6275): Source "test/concrete/CodeGennable.sol" not foundatscript/Build.sol:8), exit 0 on this branch.forge testis green on bothbase and branch, which is precisely the finding — no test in this repo can
discriminate, because the repo tree is complete and only the published tree is
broken.
script/Build.sol:8import →../test/concrete/→ killed by
soldeer-package-build(exit 1), survived byforge test;M2
LibFs.buildFileForContract.t.sol:8→test/concrete/→ killed byforge test; M3LibCodeGen.bytecodeHashConstantString.t.sol:8→../concrete/→ killed byforge test; M4 deletesrc/concrete/CodeGennable.sol→ killed by both.forge soldeer push --dry-runwould upload, built in a scratch project theway a consumer builds after
soldeer install. Expected behaviour comes from.soldeerignoreplus the package contents, independently of this repo'ssource tree or its suite.
the package as published on every push, (2) removing the inconsistency now.
(2) is this PR; (1) is ci(sol): build the tree .soldeerignore publishes, not the repo tree rainix#316. Both are covered, and
both must land together.
Everything below was run in this clone at
2026-08-16-issue-76, tools from theflake (
nix develop -c ...).Failing first. The reproduction is the new rainix check
rainix-static soldeer-package-build, run against this repo at935c725(unmodified
main). It builds what.soldeerignorewould publish, in a scratchproject, and it is red:
Passing after. Same command, same scratch dir, after this commit:
Full suite.
nix develop -c forge test→Ran 16 test suites in 2.54s (27.16s CPU time): 134 tests passed, 0 failed, 0 skipped (134 total tests).nix develop -c forge fmt --check→ exit 0.Mutation matrix. Each mutant applied alone to the committed tree, both
oracles re-run, mutant reverted. Baseline first, to prove the harness runs and
that a green reading is reachable:
soldeer-package-buildforge testscript/Build.solimport →../test/concrete/LibFs.buildFileForContract.t.solimport →test/concrete/bytecodeHashConstantString.t.solimport →../concrete/src/concrete/CodeGennable.solM1 is the whole issue in one row: reverting only the published file's import
leaves
forge testgreen and reds only the as-published build. Nothing thatexisted before this work could see it.
Not touched
.soldeerignorestill excludes/foundry.toml,/remappings.txtand/soldeer.lock, so the published package carries no build config — a consumersupplies it. That is normal for a soldeer library and the rainix check
scaffolds it the same way a consumer does.