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

Allow specifying dependencies for individual artifacts #2887

Closed
wants to merge 9 commits into from
Prev Previous commit
Remove some redundant lines
  • Loading branch information
dmarcuse committed Mar 28, 2020
commit a5aef08eb9843414eb6bdeed948bb034e9b67e88
8 changes: 2 additions & 6 deletions text/0000-cargo-artifact-specific-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ name = "myproject"
version = "0.1.0"
edition = "2018"

[dependencies]

[lib]
name = "myproject"
path = "src/lib.rs"
Expand All @@ -47,8 +45,6 @@ name = "myproject"
version = "0.1.0"
edition = "2018"

[dependencies]

[lib]
name = "myproject"
path = "src/lib.rs"
Expand Down Expand Up @@ -78,7 +74,7 @@ clap = "*"
[lib]
name = "myproject"

[lib.dependencies] # only one library can be specified, so lib name isn't required
[lib.dependencies]
# ...
```

Expand Down Expand Up @@ -137,4 +133,4 @@ Specifically for test/bench/example artifacts, the `dev-dependencies` section ma

- Specifying an artifact-specific and crate-wide dependency with the same name could be allowed under certain circumstances, such as:
- Enabling a feature(s) of a dependency for a specific artifact, but not for the entire crate
- Indicating more specific version requirements for the same dependency as long as the constraints are compatible according to semantic versioning
- Indicating more specific version requirements for the same dependency as long as the constraints are compatible according to semantic versioning