-
Notifications
You must be signed in to change notification settings - Fork 250
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
Re-export dependencies #142
Comments
@nearmax @frol Feel like I got stuck with Rust: https://github.com/near/near-sdk-rs/tree/publish-0.9.3 |
When building
|
@nearmax @frol Please consider to inquire this to avoid common pitfalls related to the re-exporting practice rust-lang/api-guidelines#176 |
@evgenykuzyakov Here is the fix: cb5a008 The issues are:
|
Re-exporting common crates from `near_sdk` to be reused by contracts and avoid version issues. It still depends on the versions from `near-vm-logic` which can be addressed later. Bump near-* dependencies to `1.0.0`. Bump SDK version to `1.0.0` Rebuild all examples. Fixes: #142
Currently contract developers have to export the following libraries along with
near-sdk
themselves:The problem with that is that it makes DevX slightly worse and can create version mismatch, e.g.
near_sdk::collections
can use different version ofborsh
which will produce an obscure compilation error. We should export them intonear_sdk
and then contracts can access them fromnear_sdk::exports::
. This is a common practice in Rust crates, e.g. see syn.The text was updated successfully, but these errors were encountered: