Skip to content

Commit

Permalink
doc: add last step
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Oct 2, 2023
1 parent 993faf7 commit 9f90afe
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/migration_guides/v0.10.2_to_v1.0.0_nearcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Steps:
First we update to `1.0.0-alpha.5` version, which contains [deprecation](https://github.com/near/borsh-rs/pull/206) of `BorshSerialize::try_to_vec` method.

```diff
diff --git a/Cargo.toml b/Cargo.toml
index f38e88411..1587f4131 100644
--- a/Cargo.toml
+++ b/Cargo.toml
-borsh = { version = "0.10.2", features = ["rc"] }
+borsh = { version = "1.0.0-alpha.5", features = ["derive", "rc"] }
```
Expand All @@ -25,7 +29,7 @@ warning: use of deprecated method `borsh::BorshSerialize::try_to_vec`: use `bors
= note: `#[warn(deprecated)]` on by default
```

We choose to fix it at once, as this method is removed in `1.0.0-alpha.5` -> `1.0.0` transition completely
We choose to fix it at once, as this method is [removed](https://github.com/near/borsh-rs/pull/221) in `1.0.0-alpha.5` -> `1.0.0` transition completely
with following diff:

```diff
Expand Down Expand Up @@ -401,3 +405,14 @@ with similar fix.
## 10. errors similar to previous ones, in `near-store`, `near-network` and `near-state-viewer` packages
There was a bunch of `borsh::maybestd` imports, which got replaced by their direct from-`std` counterparts.
## 11. finally, we update `borsh` version to `1.0.0`:
```diff
diff --git a/Cargo.toml b/Cargo.toml
index f38e88411..1587f4131 100644
--- a/Cargo.toml
+++ b/Cargo.toml
-borsh = { version = "1.0.0-alpha.5", features = ["derive", "rc"] }
+borsh = { version = "1.0.0", features = ["derive", "rc"] }
```

0 comments on commit 9f90afe

Please sign in to comment.