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

Unknown [project] table in cargo docs #11129

Closed
TheNeikos opened this issue Sep 22, 2022 · 2 comments
Closed

Unknown [project] table in cargo docs #11129

TheNeikos opened this issue Sep 22, 2022 · 2 comments
Labels
A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues C-bug Category: bug

Comments

@TheNeikos
Copy link
Contributor

Problem

In the cargo docs there is a reference to a [project] table: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace

I could not find anything about it. Is it maybe meant to say 'package'? Or is it only undocumented?

(I specifically could not find it in the manifest: https://doc.rust-lang.org/cargo/reference/manifest.html)

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

@TheNeikos TheNeikos added the C-bug Category: bug label Sep 22, 2022
@Muscraft
Copy link
Member

Thanks for the report!

I believe [project] used to be what [package] is today. Both are still supported within Cargo but it's not documented and shouldn't be used. This was an oversight on my part when writing up the documents. I'll make sure to fix it here soon!

@weihanglo weihanglo added A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues labels Sep 23, 2022
bors added a commit that referenced this issue Sep 27, 2022
Reduce references to `[project]` within cargo

There was an issue (#11129) with `[project]` being put in the docs but nothing else stating what `[project]` is. This was an oversight by me when writing the docs as `[project]` is still supported in cargo. [Back in 2014](86b2a2a) `[project]` was [renamed to `[package]`](#3388 (comment)), since then it has kinda sat as something that exists and is supported but not really. I brought this up in a [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/removal.20of.20.60.5Bproject.5D.60), and it was suggested that we could show a warning when `[project]` is used in a manifest of a _top-level_ crate.

To go slightly further than this I tried to change as many references from `[project]` to `[package]` as possible. This should hopefully help with confusion between `[project]` and `[package]` in the future.

This PR also includes a cherry-picked commit from #11131 as it was having issues with bors and fits well with the changes that are being made in this PR.

This should ideally be reviewed commit by commit
@epage
Copy link
Contributor

epage commented Sep 27, 2022

Looks like this was resolved.

@epage epage closed this as completed Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants