Skip to content
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

Compilation error on fresh Cargo.toml that depends on near-sdk-rs 5.0.0-alpha.1 #1129

Closed
fadeevab opened this issue Jan 11, 2024 · 1 comment

Comments

@fadeevab
Copy link

I tried to compile my project with near-sdk-rs 5.0.0-alpha.1 because of this issue #1119, however, build fails with the errors:

error: proc-macro derive panicked
 --> src/main.rs
  |
6 | #[derive(BorshSerialize, BorshDeserialize)]
  |          ^^^^^^^^^^^^^^
  |
  = help: message: called `Result::unwrap()` on an `Err` value: Could not find `borsh` in `dependencies` or `dev-dependencies` in `/home/xxxx/yyyyy/Cargo.toml`!
@frol
Copy link
Collaborator

frol commented Jan 12, 2024

Given that we re-export borsh from near-sdk, you need to hint it to borsh:

#[borsh(crate = "near_sdk::borsh")]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants