You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I built my contracts to OUT_DIR. sol!(MyContract, concat!(env!("OUT_DIR"), "/contracts/MyContract.abi")) fails to compile with "expected ident". Reviewing the macro myself, the macro appears to be looking for a string literal for the path (preventing usage of so-derived paths).
This can be worked around by hooking into alloy-sol-macro-expander directly from a build script. That crate has weaker semver guarantees and building custom expanders is largely undocumented (though it was a small amount of code once I worked it out). I understand if this is closed as won't fix accordingly, I just wanted to explain why I thought the issue at least worth filing.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Component
sol! macro
Describe the feature you would like
I built my contracts to
OUT_DIR
.sol!(MyContract, concat!(env!("OUT_DIR"), "/contracts/MyContract.abi"))
fails to compile with "expected ident". Reviewing the macro myself, the macro appears to be looking for a string literal for the path (preventing usage of so-derived paths).This can be worked around by hooking into
alloy-sol-macro-expander
directly from a build script. That crate has weaker semver guarantees and building custom expanders is largely undocumented (though it was a small amount of code once I worked it out). I understand if this is closed as won't fix accordingly, I just wanted to explain why I thought the issue at least worth filing.Additional context
No response
The text was updated successfully, but these errors were encountered: