-
Notifications
You must be signed in to change notification settings - Fork 71
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
Old NEAR contracts won't compile with the new borsh
re-exported from near-sdk-rs
("Could not find borsh
")
#277
Comments
This new behavior is by design and |
@frol in this case, |
@fadeevab Re-export also keeps things consistent. Ideally, I don't want to derive neither serde nor borsh manually, so I at the back of my mind I am thinking how to achieve that without introducing too much magic to it. |
@frol :) One quick workaround came to my mind: falling back to
Little bit dirty :) However, intuitively, if I already use All that is not critical of course. |
@fadeevab Given that there are more than just borsh that needs to be configured near/near-sdk-rs#1142, I don't think this change is worth it. |
I hit the issue with the new
near-sdk-rs
: near/near-sdk-rs#1129I tried to compile my project with
near-sdk-rs
5.0.0-alpha.1
because of this issue near/near-sdk-rs#1119, however, build fails with the errors:BEFORE, a simple import of
near_sdk::borsh::self
was enough to make derive macro work.NOW, either a direct
borsh
import is needed (thus, re-export fromnear-sdk
becomes useless), or#[borsh(crate = "near_sdk::borsh")]
is necessary for every structure (as suggested by @frol, near/near-sdk-rs#1129 (comment))The text was updated successfully, but these errors were encountered: