near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.31k stars 618 forks source link

chore: bump borsh from 1.0 to 1.2 in lockfile #11715

Closed jakmeier closed 3 months ago

jakmeier commented 3 months ago

Using borsh 1.2 for nearcore workspace allows to use the ordered-float crate.

Note that I didn't update the Cargo.toml requirements, hence it won't require dependency updates on published crates from this repo.

The new features changes in borsh in 1.1 and 1.2 don't affect us and are backwards compatible changes according to semver rules.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.21%. Comparing base (f3287d3) to head (befcb8d). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11715 +/- ## ========================================== - Coverage 70.22% 70.21% -0.02% ========================================== Files 791 791 Lines 161937 161937 Branches 161937 161937 ========================================== - Hits 113715 113696 -19 - Misses 43262 43279 +17 - Partials 4960 4962 +2 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | Coverage Δ | | |---|---|---| | [backward-compatibility](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.35% <ø> (ø)` | | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `37.97% <ø> (+<0.01%)` | :arrow_up: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `69.96% <ø> (-0.01%)` | :arrow_down: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `69.80% <ø> (+<0.01%)` | :arrow_up: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `54.51% <ø> (-0.04%)` | :arrow_down: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.58% <ø> (ø)` | | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.38% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `64.49% <ø> (-0.02%)` | :arrow_down: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11715/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jakmeier commented 3 months ago

The breaking changes in borsh in 1.1 and 1.2 don't affect us.

WDYM by "breaking changes"? These releases are semver-compatible and the release notes do not mention any breaking changes either.

Right, there are no breaking changes, only added features. My bad for mixing up major and minor semver changes and terminology.

Updating Cargo.toml to a semver compatible version cannot break downstream users like that unless the dependency being upgraded is badly behaved. It'll force them to update their lock-files to a more recent version, and that's it.

I was referring to the dependency update, which IIRC may sometimes cause annoying dependency conflicts. But yeah, maybe I was overthinking it.

Since we're not going to be testing compilation for -Zminimal-versions, borsh 1.0 or borsh 1.1, there will be nothing that prevents us from eventually getting e.g. ordered_float into our published crates. The Cargo.toml dependency will need to be raised as these new features start getting used at that time.

However, since there aren't any uses in this PR, I don't think it is necessary to do it now.

I'm going to make use of ordered_float very soon in #11716. I guess you are saying I should bump the dependency in the workspace TOML in that PR?