tower-rs / tower

async fn(Request) -> Result<Response, Error>
https://docs.rs/tower
MIT License
3.56k stars 281 forks source link

Upgrade to indexmap v2 (MSRV 1.63) #741

Closed cuviper closed 4 months ago

cuviper commented 1 year ago

We were later able to relax hashbrown and indexmap to MSRV 1.63, so I've updated that here. Either way, this is well beyond tower's stated 6-month MSRV policy.

Ameobea commented 9 months ago

ahash, a dependency of v1 indexmap, no longer compiles on new Rust nightly versions: https://github.com/tkaitchuck/aHash/issues/200

As a result, the latest version of tower no longer builds on Rust nightly

This PR should fix that problem

cuviper commented 9 months ago

ahash, a dependency of v1 indexmap

I'm not sure what you're seeing, but indexmap has never had a dependency on ahash. Even its hashbrown dependency has always been with default-features = false to avoid ahash there, unless something else enabled that.

Ameobea commented 9 months ago

ahash, a dependency of v1 indexmap

I'm not sure what you're seeing, but indexmap has never had a dependency on ahash. Even its hashbrown dependency has always been with default-features = false to avoid ahash there, unless something else enabled that.

You're right, I wasn't precise. ahash is a dependency on more level down as you pointed out: tower -> indexmap -> hashbrown -> ahash.

Pulling in tower by itself with no other crates, even with features = ["full"] set, still compiles on nightly because hashbrown has default-features = false set by default.

It seems some other crate in our workspace is turning on the ahash feature of hashbrown. The output of cargo tree was showing ahash in the tree underneath tower even though the feature got turned on elsewhere.

So in that case, bumping indexmap to v2 on tower probably wouldn't help out since there is some other crate somewhere depending on it and turning on the feature.

Apologies for the confusion here.

cuviper commented 9 months ago

OK -- cargo tree -i ahash -e features may help you track that down!

tobz commented 3 months ago

This has been released as part of tower@v0.5.0.

Thanks again for your contribution!