ParkMyCar / compact_str

A memory efficient string type that can store up to 24* bytes on the stack
MIT License
638 stars 46 forks source link

fix: Merge skew and MSRV workflow #331

Closed ParkMyCar closed 11 months ago

ParkMyCar commented 11 months ago

With some recent PRs we hit some merge skews that prevented a test from compiling, this PR fixes those issues. It also bumps the MSRV CI workflow to 1.60, suddenly when running in 1.59 we get the following error:

$ cargo +1.59 check --no-default-features                                                                                                                         [±fix/merge-skew ●]
    Updating crates.io index
error: failed to select a version for `rkyv`.
    ... required by package `compact_str v0.8.0-beta (/Users/parker/Development/compact_str/compact_str)`
versions that meet the requirements `^0.7` are: 0.7.41, 0.7.40, 0.7.39, 0.7.38, 0.7.37, 0.7.36, 0.7.35, 0.7.34, 0.7.33, 0.7.32, 0.7.31, 0.7.30, 0.7.29, 0.7.28, 0.7.27, 0.7.26, 0.7.25, 0.7.24, 0.7.23, 0.7.22, 0.7.21, 0.7.20, 0.7.19, 0.7.18, 0.7.17, 0.7.16, 0.7.15, 0.7.14, 0.7.13, 0.7.12, 0.7.11, 0.7.10, 0.7.9, 0.7.8, 0.7.7, 0.7.6, 0.7.5, 0.7.4, 0.7.3, 0.7.2, 0.7.1, 0.7.0

all possible versions conflict with previously selected packages.

  previously selected package `rkyv v0.7.31`
    ... which satisfies dependency `rkyv = "^0.7"` of package `compact_str v0.8.0-beta (/Users/parker/Development/compact_str/compact_str)`

failed to select a version for `rkyv` which could resolve this conflict

... which is confusing, since the version of rkyv selected satisfies the dependency, and there haven't been any new versions of rkyv released in 5 months? It seems related to this issue, https://github.com/rust-lang/cargo/issues/10189, which indicates something further down in the dependency chain is to blame. Haven't had a chance to dig further, so I bumped the MSRV workflow to 1.60

NobodyXu commented 11 months ago

@ParkMyCar would be great if you can merge my PR #282

Kijewski commented 11 months ago

You actually don't need to install a nightly toolchain, just set RUSTC_BOOTSTRAP=1. Compare: https://github.com/strawlab/iana-time-zone/blob/main/.github/workflows/rust.yml#L111-L138

ParkMyCar commented 11 months ago

You actually don't need to install a nightly toolchain, just set RUSTC_BOOTSTRAP=1. Compare: https://github.com/strawlab/iana-time-zone/blob/main/.github/workflows/rust.yml#L111-L138

Good to know!

Since there are some open PRs I want to review and merge, for now I'm going to just bump the MSRV workflow to 1.60 so we can get CI green.

Kijewski commented 11 months ago

1.60 added namespaced features and weak dependencies, which might come in handy if we want to add more integrations without a semver breaking change.

And since 1.60 was released on 2022-04-07, I guess we should not invest any more work into making 1.59 work.