Futures-rs: Consider moving futures 0.1 to a different crate name

Created on 27 Sep 2018  路  8Comments  路  Source: rust-lang/futures-rs

Currently, the bulk of the ecosystem depends on futures 0.1. However, the doc URL (https://docs.rs/futures) is redirected to 0.2 (which has been yanked).

Even once futures 0.3 is released, given the size of the ecosystem, it will take significant time before futures 0.1 can be sunset.

To reduce confusion, I propose moving futures 0.1 to a new crate name. This will also allow futures 0.3 to avoid the "-preview" hack.

I am open to naming suggestions.

Most helpful comment

Done! Sorry for the delay.

All 8 comments

It's also possible (and even with a rename, probably still a good idea) for the 0.3 docs to include a highlight at the top with a link if people are looking for the 0.1 docs.

The current doc link points to 0.1 docs (thanks, @seanmonstar!). Does this resolve this issue?

The same issue will continue being a problem once futures 0.3 is released. The ecosystem will be dependent on 0.1 for the foreseeable future. The question is how best to smooth the transition.

There's an additional reason for this. I have a crate which has the following desires:

  • Support Rust 1.18
  • Optionally support futures 0.1
  • Optionally support futures 0.3 / standard library futures

The recommended way to use both versions simultaneously is to use Cargo's renaming feature. However, that feature is only available starting in Rust 1.31. If a crate uses this Cargo.toml renaming syntax, they are forcing any users to compile with Rust 1.31+.

Instead, I encourage you to follow what Serde did and release a uniquely-named crate for version 0.1. This crate would basically boil down to:

[package]
name = "futures01"
version = "0.1.0"

[dependencies]
futures = "0.1"
extern crate futures;
pub use futures::*;

Any user that has Rust 1.31 should use renaming, but people supporting older versions can use the renamed crate. Once this is released once, you should be able to release futures 0.1 and futures 0.3 versions in parallel.

I don't have any particular opposition to releasing futures 0.1 as futures01 on crates.io.

I don't have any particular opposition to releasing futures 0.1 as futures01 on crates.io.

Is there anything I could do to help on this front? I'd love to be able to release my crate with support for both versions of futures soon.

Done! Sorry for the delay.

Oh, wow, thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sile picture sile  路  5Comments

critiqjo picture critiqjo  路  3Comments

xrl picture xrl  路  3Comments

aturon picture aturon  路  5Comments

Nemo157 picture Nemo157  路  5Comments