[DEV] Treat an unimplemented contract as a terminal compilation failure - #144
Merged
Conversation
A contract that inherits functions it never implements is rejected by solc unless it is declared abstract. That is a defect in the contract's source, not in the compilation settings, so no workaround can clear it -- but the retry loop cannot tell, and its catch-all fires anyway: the run spends several more certoraRun invocations, then the import-patch pass, before reporting a generic "compilation analysis failed" that names neither the contract nor the reason. The contracts most exposed to this are the generated harnesses, written against their target's own file and so blind to what the target inherits from elsewhere. Detect the diagnostic next to the existing abstract-main-contract check and raise on it, naming the contract and the file that declares it. Like that check, it runs before any workaround is applied, so the loop stops at the compilation that reported it. Detection folds solc's hard wrap away first, as the other multi-line detectors in this module do. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three collisions in compilation_workarounds.py and its tests, all between independent additions landing at the same point, so both sides are kept: the UnimplementedContractError type and regex alongside dev's UnsatisfiableSolcPinError/BlockedPin/SolcFallbackPlan, the two terminal guards in the workaround loop as consecutive checks, and both names in the test module's import list. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Mirror of #131 onto the
devbleeding-edge branch.Source branch:
shelly/autosetup-terminal-unimplemented-contract. This branch is that head merged forward withdev; #131 itself is untouched and still targetsmaster.Per the
devbranch policy this merges without review oncepyrightandpytestare green.