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

Emit warning on misspelled environment variables #6694

Merged
merged 3 commits into from Mar 7, 2019

Conversation

Projects
None yet
5 participants
@ordovicia
Copy link
Contributor

ordovicia commented Feb 23, 2019

This PR makes Cargo emit a warning when RUST_FLAGS or RUSTDOC_FLAGS environment variables are used instead of RUSTFLAGS or RUSTDOCFLAGS.

$ RUST_FLAGS=foo ./target/debug/cargo build
warning: Cargo does not read `RUST_FLAGS` environment variable. Did you mean `RUSTFLAGS`?

Fixes #6406

@rust-highfive

This comment has been minimized.

Copy link

rust-highfive commented Feb 23, 2019

r? @Eh2406

(rust_highfive has picked a reviewer for you, use r? to override)

@dwijnand

This comment has been minimized.

Copy link
Member

dwijnand commented Feb 23, 2019

I think this is good to land. Maybe there's a slightly better place in the execution where this should happen, but somewhere reasonable in compile_ws is where I'd've started too.

@Eh2406

This comment has been minimized.

Copy link
Contributor

Eh2406 commented Mar 7, 2019

Do we want to look for other misspellings?

I don't know where the code should live:
@bors r? @dwijnand

@rust-highfive rust-highfive assigned dwijnand and unassigned Eh2406 Mar 7, 2019

@dwijnand

This comment has been minimized.

Copy link
Member

dwijnand commented Mar 7, 2019

Let's try this out. We can always change this warning or drop it in the future.

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 7, 2019

📌 Commit 3ca98ad has been approved by dwijnand

bors added a commit that referenced this pull request Mar 7, 2019

Auto merge of #6694 - ordovicia:misspell-env-var, r=dwijnand
Emit warning on misspelled environment variables

This PR makes Cargo emit a warning when `RUST_FLAGS` or `RUSTDOC_FLAGS` environment variables are used instead of `RUSTFLAGS` or `RUSTDOCFLAGS`.

```shell
$ RUST_FLAGS=foo ./target/debug/cargo build
warning: Cargo does not read `RUST_FLAGS` environment variable. Did you mean `RUSTFLAGS`?
```

Fixes #6406
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 7, 2019

⌛️ Testing commit 3ca98ad with merge 37a4555...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 7, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: dwijnand
Pushing 37a4555 to master...

@bors bors merged commit 3ca98ad into rust-lang:master Mar 7, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details

@ordovicia ordovicia deleted the ordovicia:misspell-env-var branch Mar 8, 2019

@ehuss ehuss referenced this pull request Mar 12, 2019

Merged

Update cargo #59143

bors added a commit to rust-lang/rust that referenced this pull request Mar 13, 2019

Auto merge of #59143 - ehuss:update-cargo, r=alexcrichton
Update cargo

5 commits in 95b45eca19ac785263fed98ecefe540bb47337ac..dd761226d944712a363ea515cb294f4e2b6bdbe5
2019-03-06 19:24:30 +0000 to 2019-03-11 18:51:14 +0000
- Fingerprint build script deps only for path packages. (rust-lang/cargo#6734)
- Add --quiet option for `cargo test` (rust-lang/cargo#6358)
- .gitignore should end with a newline. (rust-lang/cargo#6732)
- Emit warning on misspelled environment variables (rust-lang/cargo#6694)
- Update glob requirement from 0.2.11 to 0.3.0 (rust-lang/cargo#6724)

bors added a commit to rust-lang/rust that referenced this pull request Mar 13, 2019

Auto merge of #59143 - ehuss:update-cargo, r=ehuss
Update cargo

6 commits in 95b45eca19ac785263fed98ecefe540bb47337ac..0e35bd8af0ec72d3225c4819b330b94628f0e9d0
2019-03-06 19:24:30 +0000 to 2019-03-13 06:52:51 +0000
- Make `hg` optional for tests. (rust-lang/cargo#6739)
- Fingerprint build script deps only for path packages. (rust-lang/cargo#6734)
- Add --quiet option for `cargo test` (rust-lang/cargo#6358)
- .gitignore should end with a newline. (rust-lang/cargo#6732)
- Emit warning on misspelled environment variables (rust-lang/cargo#6694)
- Update glob requirement from 0.2.11 to 0.3.0 (rust-lang/cargo#6724)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.