Conversation
genStmt had no case for SComment, causing a crash when translating Hull IR that contains comments. The runsol pipeline was unaffected because the Hull parser strips comments during the serialize/parse roundtrip. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
move the hull→yul pipeline logic from yule/Main.hs into a reusable yule/Pipeline.hs module. add --output-dir flag to sol-core so output files can be written to a specified directory instead of cwd. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
new `csol` binary with a `build` subcommand that compiles .solc files through the full sol-core→yule→solc pipeline. supports --contract to select a specific hull object and --output-dir for output placement. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
`csol run` compiles and executes a contract in a single step using hevm as a library. supports calldata specification (--sig/--arg or --calldata), --value, --no-create (skip deployment), --solc-optimize, and -d for dumping intermediate artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- remove unused foldl' import in FieldAccess.hs - remove redundant catch-all in genStmt (all cases now covered) - gate EmitHull debug output behind --debug-hull flag Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mbenke
reviewed
Apr 14, 2026
Collaborator
mbenke
left a comment
There was a problem hiding this comment.
$ cabal run -- csol run test/examples/dispatch/basic.solc --runtime-sig 'something()(uint)'
Compiling to Hull...
Lowering to Yul and compiling to EVM bytecode...
Create: success
Gas used: 278171
Address: 0xb4c79daB8f259C7Aee6E5b2Aa729821864227e84
State changes:
0xb4c79daB8f259C7Aee6E5b2Aa729821864227e84:
code: 0 -> 1389 bytes
nonce: 0 -> 0x1
csol: Internal Error: while trying to parse function signature `something()(uint)`, unable to parse solc output:
{"errors":[{"component":"general","errorCode":"2314","formattedMessage":"ParserError: Expected '{' but got '('\n --> hevm.sol:1:36:\n |\n1 | contract ABI { function something()(uint) public {}}\n | ^\n\n","message":"Expected '{' but got '('","severity":"error","sourceLocation":{"end":36,"file":"hevm.sol","start":35},"type":"ParserError"}],"sources":{}}
-- CallStack (from HasCallStack):
internalError, called at src/EVM/Solidity.hs:424:10 in hevm-0.57.0-KXDqVf1FXowDQ8m2JSt4uT:EVM.Solidity
CallStack (from HasCallStack):
error, called at src/EVM/Types.hs:1539:19 in hevm-0.57.0-KXDqVf1FXowDQ8m2JSt4uT:EVM.Types
internalError, called at src/EVM/Solidity.hs:424:10 in hevm-0.57.0-KXDqVf1FXowDQ8m2JSt4uT:EVM.Solidity
HasCallStack backtrace:
collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:204:5 in ghc-internal:GHC.Internal.Exception
error, called at src/EVM/Types.hs:1539:19 in hevm-0.57.0-KXDqVf1FXowDQ8m2JSt4uT:EVM.Types
internalError, called at src/EVM/Solidity.hs:424:10 in hevm-0.57.0-KXDqVf1FXowDQ8m2JSt4uT:EVM.Solidity
Collaborator
|
How is |
Contributor
Author
Ah yea, I think hevm doesn't support parsing the return type in abi signatures as cast does, can add a nicer error at least here though... |
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.
This branch adds csol, a unified CLI that drives the full compilation and execution pipeline (sol-core → yule → solc → EVM) from a single command, replacing the need to manually chain separate binaries or use shell scripts like runsol.sh.
I kept the old binaries and scripts around for now in case peoples workflows still depend on them, but would suggest that we can drop them in a future PR unless there are objections?
As part of the changes here I also bumped our ghc from 9.8 to 9.10 and updated to the latest nixpkgs (needed for hevm to build) and fixed a small bug in yul generation to support emiting code containing comments (these were always stripped in the previous pipeline when converting the in memory hull objects to their text form).