-
Notifications
You must be signed in to change notification settings - Fork 271
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
Upgrade slang to 0.18.3 #1102
Upgrade slang to 0.18.3 #1102
Conversation
The newest version includes many performance improvements, and adds WASM support. It also adds a bunch of requested public APIs. This allows importing Slang from any WASM-compatible environment (NodeJS), at the cost of using ESM (or using `await import()` from CJS). That turns the calling utility `makeNamespacedInput()` to be `async`. Please let me know if I need to verify/run anything else.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@nomicfoundation/slang@0.17.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep reviewing
Should this be released under a minor? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits, I don't think they're a blocker
Continuation of #1100
The
upgrades-core
package has amakeNamespacedInput
function, where near the end of its processing, it uses Slang to try to sanitize the source code further to remove non-struct NatSpec. This previously used Slang 0.17.Slang 0.18.x supports WASM and must be imported using
await import()
.To avoid converting the
makeNamespacedInput
function to async which would result in breaking changes, this PR instead removes the sanitization step frommakeNamespacedInput
and exposes an asynctrySanitizeNatSpec
function that can be called separately. We then call this new function in thehardhat-upgrades
plugin.