rust-lang / crates-io-cargo-teams

the home of the crates io team
5 stars 11 forks source link

Cargo team: planning areas #5

Open nrc opened 5 years ago

nrc commented 5 years ago

These are the 'big things' that might be happening in the near-ish future for Cargo, which might be on the 2019 roadmap, and which we should discuss in small 'focus groups' over the next few months. Please add more things and any meta-thoughts, but lets leave discussion of the specifics for later.

dwijnand commented 5 years ago

cargo repl would be nice (possibly based on https://github.com/google/evcxr/tree/master/evcxr_repl?)

dwijnand commented 5 years ago

Other 'big things' which might be worth undertaking:

(2nd top 👍'd is the sysroot/xargo ticket, already mentioned)

ehuss commented 5 years ago

You can look through https://doc.rust-lang.org/nightly/cargo/reference/unstable.html and review the status of all unstable features.

I would say "rename-dependencies" is the closest to stabilization (I don't know of any outstanding issues). We may want to prioritize it, since in might help with 2018 usage.

custom registries (is this just stabilisation?)

There seems to be a lot of unresolved issues in the tracking issue.

metabuild (native deps for sys crates; I'm not really sure what this is)

This is just an easier way to write a build script (using metadata in Cargo.toml instead of writing a Rust program), and can be used for a wide range of things (not just sys crate building). It's low priority until we can find people to play with it.

I have been researching "decoupled features" where Cargo features can be more granular. It sounds like @alexcrichton wants to go with a conservative route to only decouple cross-compiled artifacts. I think there is significant interest in a more pervasive split where normal/build/dev/target-cfg can all receive different features (for example, a feature needed for build is not forced upon your main crate). It's one of the most requested enhancements. I think it would be good to have progress on this...somehow.

ehuss commented 5 years ago

Another major area that I think needs attention is reducing disk space usage. There are multiple points to this: automatically cleaning target, improvements to manual cargo clean, and dealing with stale cache files in the registry directory. There are a fair number of issues filed for this, and I see it come up periodically on forums and other places (like llogiq's recent blog post). I have some ideas for some short-term solutions for updating toolchains which I'll post soon. However, I'm not sure if making incremental improvements is a good idea vs. making major changes.

nrc commented 5 years ago

Categorization

I'm not really happy with the names, but the main point is the groupings

nrc commented 5 years ago

The kind of things we need to work out for each feature are:

withoutboats commented 5 years ago

custom registries (is this just stabilisation?)

There's one change I wanted to put in but I've never gotten around to getting green in CI. rust-lang/cargo#5915. Otherwise I think it needs a review to see if everything else is spic & span, then a stabilization PR.

jtgeibel commented 5 years ago

I'd like to ping the cargo team on rust-lang/crates.io#1539. Basically, when dependencies are renamed then the way features are encoded in the index can be confusing to end users. We don't currently surface it in the front-end, but the API does include a list of features. In the example of tarpc-0.13.0, the list includes "rpc/serde1" where the actual package tarpc-lib has been renamed to rpc.

If we wanted to display this info to the user, one option would be to rewrite this on the server when a crate is published. I'm proposing that we modify cargo to send two versions of the feature list, one for when cargo is talking to itself via the index and another for display to the user. One advantage of this approach would be that alternative registries are more likely to handle this correctly if cargo is explicit in the metadata it sends. Thoughts?

alexcrichton commented 5 years ago

@jtgeibel I think this is mostly a planning issue, so perhaps it's best to discuss that in https://github.com/rust-lang/crates.io/issues/1539?

nrc commented 5 years ago

We should also consider what community commands we want to bring in, e.g., cargo tree, cargo add (cc #14), cargo watch, etc.

nrc commented 5 years ago

Notes to self: