Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Declare support level for each crate in our Charter / docs #14600

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ Cargo downloads your Rust project’s dependencies and compiles your project.
[The Cargo Book]: https://doc.rust-lang.org/cargo/
[Cargo Contributor Guide]: https://rust-lang.github.io/cargo/contrib/

> The Cargo binary distributed through with Rust is maintained by the Cargo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already mentioned in the "Installing Cargo" section.

Should we move "For all other uses of this crate..." to under "Compiling from Source"? Something like

## Compiling from Source

While [the `cargo` crate](https://crates.io/crates/cargo) is avaiable via crates.io,
compiling it from source is not intended for external use,
regardless for using either as a binary or library.
This crate may make major changes to its APIs.

### Requirements

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That section heavily implies "building the binary from source" and doesn't really cover the "depending on it as a library" case.

I feel like a lot of this should be re-worked, mostly by moving in to the contributor guide. I recommend we remove the install instructions and defer re-working the compilation instructions.

> team for use by the wider ecosystem.
> For all other uses of this crate (as a binary or library) this is maintained
> by the Cargo team, primarily for use by Cargo and not intended for external
> use (except as a transitive dependency). This crate may make major changes to
> its APIs.

## Code Status

[![CI](https://github.com/rust-lang/cargo/actions/workflows/main.yml/badge.svg?branch=auto-cargo)](https://github.com/rust-lang/cargo/actions/workflows/main.yml)

Code documentation: <https://doc.rust-lang.org/nightly/nightly-rustc/cargo/>

## Installing Cargo

Cargo is distributed by default with Rust, so if you've got `rustc` installed
locally you probably also have `cargo` installed locally.

## Compiling from Source

### Requirements
Expand Down
3 changes: 3 additions & 0 deletions benches/benchsuite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use. This
> crate may make major changes to its APIs or be deprecated without warning.
4 changes: 4 additions & 0 deletions benches/benchsuite/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use. This
//! > crate may make major changes to its APIs or be deprecated without warning.

#![allow(clippy::disallowed_methods)]

use cargo::GlobalContext;
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-platform/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-platform"
version = "0.1.8"
version = "0.1.9"
edition.workspace = true
license.workspace = true
rust-version.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions crates/cargo-platform/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> This crate is maintained by the Cargo team for use by the wider
> ecosystem. This crate follows semver compatibility for its APIs.
Comment on lines +1 to +2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on the fence here. My intention when I created it was to be more "internal". I was thinking that if others found it useful, we could expand that to a more "experimental" status. I didn't know if anyone would actually have a use for it, and it wasn't really something I wanted to put effort into.

Also, as evident by the lack of a README, this isn't really up to my standards for an intentional artifact that we intend to support.

It looks like it has a few dependents now, though: https://crates.io/crates/cargo-platform/reverse_dependencies.

I'm fine with elevating this to be "intentional" if ya'll agree. It has required almost no maintenance effort, and I don't expect us to delete it, and we already have semver checks. I just wanted to make clear what I was originally thinking.

(We probably should eventually add a real README, though 🤣)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification!

I think its reasonable for the Rust Project to provide an API for this micro-DSL. My main concern is what shape any of that should take and thats where I feel like the commitment of "Intentional" is strong. Granted, the definition of "Intentional" is strong enough I'm hesitant to mark anything intentional but anything else would also be too weak / scare people away.

3 changes: 3 additions & 0 deletions crates/cargo-platform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//!
//! See `examples/matches.rs` for an example of how to match against a `Platform`.
//!
//! > This crate is maintained by the Cargo team for use by the wider
//! > ecosystem. This crate follows semver compatibility for its APIs.
//!
//! [`Platform`]: enum.Platform.html

use std::fmt;
Expand Down
8 changes: 3 additions & 5 deletions crates/cargo-test-macro/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
WARNING: You might not want to use this outside of Cargo.

* This is designed for testing Cargo itself. Use at your own risk.
* No guarantee on any stability across versions.
* No feature request would be accepted unless proved useful for testing Cargo.
> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use. This
> crate may make major changes to its APIs or be deprecated without warning.
8 changes: 3 additions & 5 deletions crates/cargo-test-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
//! This is meant to be consumed alongside `cargo-test-support`. See
//! <https://rust-lang.github.io/cargo/contrib/> for a guide on writing tests.
//!
//! WARNING: You might not want to use this outside of Cargo.
//!
//! * This is designed for testing Cargo itself. Use at your own risk.
//! * No guarantee on any stability across versions.
//! * No feature request would be accepted unless proved useful for testing Cargo.
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use. This
//! > crate may make major changes to its APIs or be deprecated without warning.

use proc_macro::*;
use std::path::Path;
Expand Down
8 changes: 3 additions & 5 deletions crates/cargo-test-support/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
WARNING: You might not want to use this outside of Cargo.

* This is designed for testing Cargo itself. Use at your own risk.
* No guarantee on any stability across versions.
* No feature request would be accepted unless proved useful for testing Cargo.
> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use. This
> crate may make major changes to its APIs or be deprecated without warning.
8 changes: 3 additions & 5 deletions crates/cargo-test-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
//! targeted at cargo contributors
//! - Updated on each update of the `cargo` submodule in `rust-lang/rust`
//!
//! **WARNING:** You might not want to use this outside of Cargo.
//!
//! * This is designed for testing Cargo itself. Use at your own risk.
//! * No guarantee on any stability across versions.
//! * No feature request would be accepted unless proved useful for testing Cargo.
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use. This
//! > crate may make major changes to its APIs or be deprecated without warning.
//!
//! # Example
//!
Expand Down
2 changes: 2 additions & 0 deletions crates/cargo-util-schemas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> This crate is maintained by the Cargo team for use by the wider
> ecosystem. This crate follows semver compatibility for its APIs.
3 changes: 3 additions & 0 deletions crates/cargo-util-schemas/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
//! parsing command-lines.
//! Any logic for getting final semantics from these will likely need other tools to process, like
//! `cargo metadata`.
//!
//! > This crate is maintained by the Cargo team for use by the wider
//! > ecosystem. This crate follows semver compatibility for its APIs.

pub mod core;
pub mod manifest;
Expand Down
3 changes: 3 additions & 0 deletions crates/cargo-util/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use (except as a transitive dependency). This
> crate may make major changes to its APIs or be deprecated without warning.
4 changes: 4 additions & 0 deletions crates/cargo-util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//! Miscellaneous support code used by Cargo.
//!
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use (except as a transitive dependency). This
//! > crate may make major changes to its APIs or be deprecated without warning.

#![allow(clippy::disallowed_methods)]

Expand Down
2 changes: 2 additions & 0 deletions crates/crates-io/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> This crate is maintained by the Cargo team for use by the wider
> ecosystem. This crate follows semver compatibility for its APIs.
3 changes: 3 additions & 0 deletions crates/crates-io/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! > This crate is maintained by the Cargo team for use by the wider
//! > ecosystem. This crate follows semver compatibility for its APIs.

use std::collections::BTreeMap;
use std::fs::File;
use std::io::prelude::*;
Expand Down
4 changes: 4 additions & 0 deletions crates/home/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ that Cargo and rustup store their data.

See [rust-lang/rust#43321].

> This crate is maintained by the Cargo team, primarily for use by Cargo and Rustup
> and not intended for external use. This
> crate may make major changes to its APIs or be deprecated without warning.

[rust-lang/rust#43321]: https://github.com/rust-lang/rust/issues/43321

## License
Expand Down
4 changes: 4 additions & 0 deletions crates/home/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
//!
//! See also this [discussion].
//!
//! > This crate is maintained by the Cargo team, primarily for use by Cargo and Rustup
//! > and not intended for external use. This
//! > crate may make major changes to its APIs or be deprecated without warning.
//!
//! [discussion]: https://github.com/rust-lang/rust/pull/46799#issuecomment-361156935

#![allow(clippy::disallowed_methods)]
Expand Down
4 changes: 4 additions & 0 deletions crates/mdman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

mdman is a small utility for creating man pages from markdown text files.

> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use (except as a transitive dependency). This
> crate may make major changes to its APIs or be deprecated without warning.

## Usage

See the [man page](doc/out/mdman.md) generated by this tool.
4 changes: 4 additions & 0 deletions crates/mdman/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//! mdman markdown to man converter.
//!
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use (except as a transitive dependency). This
//! > crate may make major changes to its APIs or be deprecated without warning.

use anyhow::{bail, Context, Error};
use pulldown_cmark::{CowStr, Event, LinkType, Options, Parser, Tag, TagEnd};
Expand Down
4 changes: 4 additions & 0 deletions crates/resolver-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
This crate aims to test the resolution of Cargo's resolver. It implements a [SAT solver](https://en.wikipedia.org/wiki/SAT_solver) to compare with resolution of Cargo's resolver.
This ensures that Cargo's dependency resolution is proven valid by lowering to [SAT problem](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem).

> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use (except as a transitive dependency). This
> crate may make major changes to its APIs or be deprecated without warning.

## About the test

The Cargo's resolver is very sensitive to what order it tries to evaluate constraints. This makes it incredibly difficult
Expand Down
4 changes: 4 additions & 0 deletions crates/resolver-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use (except as a transitive dependency). This
//! > crate may make major changes to its APIs or be deprecated without warning.

#![allow(clippy::print_stderr)]

use std::cmp::{max, min};
Expand Down
2 changes: 1 addition & 1 deletion crates/rustfix/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustfix"
version = "0.8.6"
version = "0.8.7"
authors = [
"Pascal Hertleif <killercup@gmail.com>",
"Oliver Schneider <oli-obk@users.noreply.github.com>",
Expand Down
4 changes: 4 additions & 0 deletions crates/rustfix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ This is a low-level library. You pass it the JSON output from `rustc`, and you c

If you are looking for the [`cargo fix`] implementation, the core of it is located in [`cargo::ops::fix`].

> This crate is maintained by the Cargo team, primarily for use by Cargo and Rust compiler test suite
> and not intended for external use (except as a transitive dependency). This
> crate may make major changes to its APIs or be deprecated without warning.

[`cargo fix`]: https://doc.rust-lang.org/cargo/commands/cargo-fix.html
[`cargo::ops::fix`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/fix.rs

Expand Down
4 changes: 4 additions & 0 deletions crates/rustfix/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
//! 3. Create a [`CodeFix`] with the source of a file to modify.
//! 4. Call [`CodeFix::apply`] to apply a change.
//! 5. Call [`CodeFix::finish`] to get the result and write it back to disk.
//!
//! > This crate is maintained by the Cargo team, primarily for use by Cargo and Rust compiler test suite
//! > and not intended for external use (except as a transitive dependency). This
//! > crate may make major changes to its APIs or be deprecated without warning.

use std::collections::HashSet;
use std::ops::Range;
Expand Down
2 changes: 1 addition & 1 deletion credential/cargo-credential-1password/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-credential-1password"
version = "0.4.4"
version = "0.4.5"
rust-version.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
5 changes: 5 additions & 0 deletions credential/cargo-credential-1password/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

A Cargo [credential provider] for [1password].

> This crate is maintained by the Cargo team as a part of an experiment around
> 1password integration. We encourage people to try to use this crate in their projects and
> provide feedback through [issues](https://github.com/rust-lang/cargo/issues/), but do not
> guarantee long term maintenance.

## Usage

`cargo-credential-1password` uses the 1password `op` CLI to store the token. You
Expand Down
5 changes: 5 additions & 0 deletions credential/cargo-credential-1password/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
//! Cargo registry 1password credential process.
//!
//! > This crate is maintained by the Cargo team as a part of an experiment around
//! > 1password integration. We encourage people to try to use this crate in their projects and
//! > provide feedback through [issues](https://github.com/rust-lang/cargo/issues/), but do not
//! > guarantee long term maintenance.

#![allow(clippy::disallowed_methods)]
#![allow(clippy::print_stderr)]
Expand Down
4 changes: 4 additions & 0 deletions credential/cargo-credential-libsecret/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ See the [credential-provider] documentation for how to use this.

This credential provider is built-in to cargo as `cargo:libsecret`.

> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use (except as a transitive dependency). This
> crate may make major changes to its APIs or be deprecated without warning.

[GNOME libsecret]: https://wiki.gnome.org/Projects/Libsecret
[credential-provider]: https://doc.rust-lang.org/nightly/cargo/reference/registry-authentication.html
4 changes: 4 additions & 0 deletions credential/cargo-credential-libsecret/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use (except as a transitive dependency). This
//! > crate may make major changes to its APIs or be deprecated without warning.

#[cfg(target_os = "linux")]
mod linux {
//! Implementation of the libsecret credential helper.
Expand Down
4 changes: 4 additions & 0 deletions credential/cargo-credential-macos-keychain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ See the [credential-provider] documentation for how to use this.

This credential provider is built-in to cargo as `cargo:macos-keychain`.

> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use (except as a transitive dependency). This
> crate may make major changes to its APIs or be deprecated without warning.

[macOS Keychain]: https://support.apple.com/guide/keychain-access/welcome/mac
[credential-provider]: https://doc.rust-lang.org/nightly/cargo/reference/registry-authentication.html

4 changes: 4 additions & 0 deletions credential/cargo-credential-macos-keychain/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//! Cargo registry macos keychain credential process.
//!
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use (except as a transitive dependency). This
//! > crate may make major changes to its APIs or be deprecated without warning.

#![allow(clippy::print_stderr)]

Expand Down
4 changes: 4 additions & 0 deletions credential/cargo-credential-wincred/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ See the [credential-provider] documentation for how to use this.

This credential provider is built-in to cargo as `cargo:wincred`.

> This crate is maintained by the Cargo team, primarily for use by Cargo
> and not intended for external use (except as a transitive dependency). This
> crate may make major changes to its APIs or be deprecated without warning.

[Windows Credential Manager]: https://support.microsoft.com/en-us/windows/accessing-credential-manager-1b5c916a-6a16-889f-8581-fc16e8165ac0
[credential-provider]: https://doc.rust-lang.org/nightly/cargo/reference/registry-authentication.html
4 changes: 4 additions & 0 deletions credential/cargo-credential-wincred/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//! Cargo registry windows credential process.
//!
//! > This crate is maintained by the Cargo team, primarily for use by Cargo
//! > and not intended for external use (except as a transitive dependency). This
//! > crate may make major changes to its APIs or be deprecated without warning.

#[cfg(windows)]
mod win {
Expand Down
2 changes: 1 addition & 1 deletion credential/cargo-credential/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-credential"
version = "0.4.6"
version = "0.4.7"
rust-version.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
Loading