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(env): minor improvements in environment variables doc #14676

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

weihanglo
Copy link
Member

What does this PR try to resolve?

Minor improvements in environment variables doc.

Fixes #10956
Fixes #13294

How should we test and review this PR?

Additional information

@rustbot
Copy link
Collaborator

rustbot commented Oct 11, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2024
@weihanglo weihanglo changed the title docs(env): clarify unavailable cfg values for build scripts docs(env): minor improvements in environment variables doc Oct 11, 2024
@weihanglo weihanglo added the A-environment-variables Area: environment variables label Oct 11, 2024
compiling the package (not when running binaries or tests).
on the current directory and the default workspace members.
This variable will not be set when building dependencies,
unless a dependency is also a workspace member.
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 concerned that this statement isn't entirely true. In many (most?) cases, it won't be set for workspace member dependencies. For example in cargo's own workspace, it won't be set for any of its dependencies when doing cargo run.

I think to make this more accurate, perhaps change it to something like this?

Suggested change
unless a dependency is also a workspace member.
unless a dependency is also a workspace member that was also selected on the command-line.

However, as noted in the issue, what is "selected on the command-line" is sometimes not intuitive.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just want to highlight that there is a bug in how cargo cache's this behavior, which is described in #14678. I don't think that needs to change anything here, but indicates that the answer to when it is set is "buggy".

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you. That is more accurate. Updated!

I think one of the problems here is that the paragraph wasn't well arranged. There is no paragraph or newline there. We may really need to give each variable a heading.

@ehuss
Copy link
Contributor

ehuss commented Oct 12, 2024

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 12, 2024

📌 Commit ffca7be has been approved by ehuss

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 12, 2024
@bors
Copy link
Collaborator

bors commented Oct 12, 2024

⌛ Testing commit ffca7be with merge 2c4cf1d...

@bors
Copy link
Collaborator

bors commented Oct 12, 2024

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 2c4cf1d to master...

@bors bors merged commit 2c4cf1d into rust-lang:master Oct 12, 2024
22 checks passed
@weihanglo weihanglo deleted the env-doc branch October 12, 2024 14:37
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 15, 2024
Update cargo

14 commits in 15fbd2f607d4defc87053b8b76bf5038f2483cf4..8c30ce53688e25f7e9d860b33cc914fb2957ca9a
2024-10-08 21:08:11 +0000 to 2024-10-15 16:43:16 +0000
- docs: More information on what is and isn't included by cargo package (rust-lang/cargo#14684)
- fix(resolver): share conflict cache between activation retries (rust-lang/cargo#14692)
- fix(git): dont fetch tags by default (rust-lang/cargo#14688)
- Support package selection options like `--exclude` in `cargo publish` (rust-lang/cargo#14659)
- docs: install options -> uninstall options (rust-lang/cargo#14682)
- docs: tools should only interpret a line starting with `{` as JSON (rust-lang/cargo#14677)
- cargo test --help: clarify --tests and --benches (rust-lang/cargo#14675)
- docs(env): minor improvements in environment variables doc (rust-lang/cargo#14676)
- docs: document official external commands (rust-lang/cargo#14669)
- Fix panic when running cargo tree on a package with a cross compiled bindep (rust-lang/cargo#14593)
- Remove the support for `Cargo.toml` of the cargo-script (rust-lang/cargo#14670)
- docs(resolver): Lay groundwork for documenting MSRV-aware logic (rust-lang/cargo#14662)
- chore(deps): update rust crate pulldown-cmark to 0.12.0 (rust-lang/cargo#14668)
- Improve resolver speed (rust-lang/cargo#14663)
@rustbot rustbot added this to the 1.84.0 milestone Oct 16, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Oct 17, 2024
Update cargo

14 commits in 15fbd2f607d4defc87053b8b76bf5038f2483cf4..8c30ce53688e25f7e9d860b33cc914fb2957ca9a
2024-10-08 21:08:11 +0000 to 2024-10-15 16:43:16 +0000
- docs: More information on what is and isn't included by cargo package (rust-lang/cargo#14684)
- fix(resolver): share conflict cache between activation retries (rust-lang/cargo#14692)
- fix(git): dont fetch tags by default (rust-lang/cargo#14688)
- Support package selection options like `--exclude` in `cargo publish` (rust-lang/cargo#14659)
- docs: install options -> uninstall options (rust-lang/cargo#14682)
- docs: tools should only interpret a line starting with `{` as JSON (rust-lang/cargo#14677)
- cargo test --help: clarify --tests and --benches (rust-lang/cargo#14675)
- docs(env): minor improvements in environment variables doc (rust-lang/cargo#14676)
- docs: document official external commands (rust-lang/cargo#14669)
- Fix panic when running cargo tree on a package with a cross compiled bindep (rust-lang/cargo#14593)
- Remove the support for `Cargo.toml` of the cargo-script (rust-lang/cargo#14670)
- docs(resolver): Lay groundwork for documenting MSRV-aware logic (rust-lang/cargo#14662)
- chore(deps): update rust crate pulldown-cmark to 0.12.0 (rust-lang/cargo#14668)
- Improve resolver speed (rust-lang/cargo#14663)
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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
4 participants