-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] sol macro can't create definitions for files which import types #602
Comments
The sol macro is not a compiler! It's literally parsing the data as passed to it. Please use the compiled ABI! We can explore whether importing multiple files in such case makes sense. |
I understand it's not a compiler nor a preprocessor, hence my request for multiple imports. My reasoning for not wanting to use the JSON ABI is present in the issue (though again, that is the workaround I used). |
our intention for I'm going to close this as won't fix. we may revisit |
This seems in conflict with current documentation.
I do understand this falls under "when possible", and its solely my feelings on how this is written, and I do ack:
I don't say this to ask you change your decision though. I just wanted to note my thoughts and can respect the decision. Per #601 (comment), if the non-macro variant is made public, I believe I can stitch |
Component
sol! macro
What version of Alloy are you on?
0.7.0
Operating System
Linux
Describe the bug
I have the following:
where Sandbox.sol contains, at the top level,
Despite this being compiling Solidity (per solc), the sol macro fails with "unresolved custom type: Call". My invoation is as follows:
I would call this a feature-request for import resolution, except AFAICT, there's no possibly way to model this behavior through the current
sol
macro. I'm perfectly fine with needing to do,and tried exactly that (which wouldn't require import resolution, which sounds horrific). Because there's no way to model this behavior when using the file API AFAICT, I'd argue
sol
is incomplete regarding its intended behavior, making this a bug. Apologies if this should be a feature request, and please, feel free to mark it at one.My workaround for now is using the JSON ABI, yet per the macro's documentation, this is less functional for some cases. It's only because I don't have such cases at this moment, I can personally accept this workaround.
The text was updated successfully, but these errors were encountered: