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

Document since for cargo environment variables #15082

Open
raldone01 opened this issue Jan 19, 2025 · 4 comments
Open

Document since for cargo environment variables #15082

raldone01 opened this issue Jan 19, 2025 · 4 comments
Labels
A-documenting-cargo-itself Area: Cargo's documentation A-environment-variables Area: environment variables C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@raldone01
Copy link

raldone01 commented Jan 19, 2025

Problem

I tried to use CARGO_MANIFEST_PATH but it isn't available in older rustc versions.
It would be nice to add a since indication as is custom in std.

I am talking specifically about:
https://doc.rust-lang.org/cargo/reference/environment-variables.html

However, adding since to all new features and retroactively to older features would be nice.

Proposed Solution

Add since to the cargo environment variables.

@raldone01 raldone01 added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Jan 19, 2025
@raldone01 raldone01 changed the title Document since for cargo environment variables Document since for cargo environment variables Jan 19, 2025
@weihanglo weihanglo added A-documenting-cargo-itself Area: Cargo's documentation A-environment-variables Area: environment variables S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. and removed S-triage Status: This issue is waiting on initial triage. labels Jan 19, 2025
@weihanglo
Copy link
Member

Thanks for the idea. There were some discussions about expanding environment variables doc, though the previously proposed solution had some drawbacks and has yet been done. See https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Anchors.20for.20each.20environment.20variable.20in.20The.20Cargo.20Book.

@raldone01
Copy link
Author

raldone01 commented Jan 19, 2025

Oh yeah linking to specific environment variables would be awesome too!

@weihanglo
Copy link
Member

Yeah, and we have started adding MSRV note for some Cargo manifest fields recently like this. It is worth for every environment variable as well.

@raldone01

This comment has been minimized.

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-environment-variables Area: environment variables C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

2 participants