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

Make cargo-rustc crate-type-aware #7755

Merged
merged 1 commit into from
Jan 13, 2020
Merged

Conversation

lu-zero
Copy link
Contributor

@lu-zero lu-zero commented Dec 29, 2019

This fixes #7339 and makes the usage of cargo rustc less surprising overall.

@rust-highfive
Copy link

r? @ehuss

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 29, 2019
@alexcrichton
Copy link
Member

I personally don't think it's a good idea for Cargo to be parsing rustc's flags, and I would prefer to not land this. The cargo rustc command is intended somewhat for debugging and tweaking things as opposed to first-class control of everything. While --crate-type is one thing we have to watch for today it's likely not the only one and I'd rather not have to play a constant came of catch-up with rustc.

@lu-zero
Copy link
Contributor Author

lu-zero commented Jan 7, 2020

I see what you mean, I can drop the last patch. As long I have an API mean add the crate types I'm happy.

@alexcrichton
Copy link
Member

Yeah I think having an internal API in Cargo should be fine!

@lu-zero
Copy link
Contributor Author

lu-zero commented Jan 9, 2020

Updated accordingly :)

@alexcrichton
Copy link
Member

I think this may need to be rebased on the anyhow changes to get tests passing?

@lu-zero
Copy link
Contributor Author

lu-zero commented Jan 13, 2020

Yes it needed that :)

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 13, 2020

📌 Commit d5eeab8 has been approved by alexcrichton

@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 Jan 13, 2020
@bors
Copy link
Contributor

bors commented Jan 13, 2020

⌛ Testing commit d5eeab8 with merge 56a5503...

bors added a commit that referenced this pull request Jan 13, 2020
Make cargo-rustc crate-type-aware

This fixes #7339 and makes the usage of `cargo rustc` less surprising overall.
@bors
Copy link
Contributor

bors commented Jan 13, 2020

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing 56a5503 to master...

@bors bors merged commit d5eeab8 into rust-lang:master Jan 13, 2020
@lu-zero lu-zero deleted the rustc-crate-type branch January 13, 2020 15:43
bors added a commit to rust-lang/rust that referenced this pull request Jan 14, 2020
Update cargo rls

## cargo

12 commits in 6e1ca924a67dd1ac89c33f294ef26b5c43b89168..ad3dbe10e1e654fb1f032a5dd9481d7cbaa00d65
2020-01-06 19:11:37 +0000 to 2020-01-13 21:37:15 +0000
- Add named config profiles. (rust-lang/cargo#7750)
- Make cargo-rustc crate-type-aware (rust-lang/cargo#7755)
- Rename `Kind` (rust-lang/cargo#7791)
- Update bash completion (rust-lang/cargo#7789)
- Add another curl spurious network error (rust-lang/cargo#7788)
- Some small tweaks around error in configuration (rust-lang/cargo#7783)
- Fix tests with `url` crate update (rust-lang/cargo#7787)
- Fix .gitignore of Cargo.lock in a subdirectory. (rust-lang/cargo#7779)
- Bump crates-io (rust-lang/cargo#7778)
- Migrate from the `failure` crate to `anyhow` (rust-lang/cargo#7776)
- Fix several needless_borrow clippy lints. (rust-lang/cargo#7771)
- Fix some links (rust-lang/cargo#7770)

## rls

2 commits in 7c0489c5ff4f5c594e65a3b22efd9ce373deab9b..b27e1173969639448cd2e486b1c5f0fcb1b3b17c
2020-01-04 20:15:37 +0100 to 2020-01-13 11:40:20 +0100
- Update Cargo (rust-lang/rls#1613)
- Rustup to #68024 (rust-lang/rls#1612)
bors added a commit to rust-lang/rust that referenced this pull request Jan 15, 2020
Update cargo rls

## cargo

12 commits in 6e1ca924a67dd1ac89c33f294ef26b5c43b89168..ad3dbe10e1e654fb1f032a5dd9481d7cbaa00d65
2020-01-06 19:11:37 +0000 to 2020-01-13 21:37:15 +0000
- Add named config profiles. (rust-lang/cargo#7750)
- Make cargo-rustc crate-type-aware (rust-lang/cargo#7755)
- Rename `Kind` (rust-lang/cargo#7791)
- Update bash completion (rust-lang/cargo#7789)
- Add another curl spurious network error (rust-lang/cargo#7788)
- Some small tweaks around error in configuration (rust-lang/cargo#7783)
- Fix tests with `url` crate update (rust-lang/cargo#7787)
- Fix .gitignore of Cargo.lock in a subdirectory. (rust-lang/cargo#7779)
- Bump crates-io (rust-lang/cargo#7778)
- Migrate from the `failure` crate to `anyhow` (rust-lang/cargo#7776)
- Fix several needless_borrow clippy lints. (rust-lang/cargo#7771)
- Fix some links (rust-lang/cargo#7770)

## rls

2 commits in 7c0489c5ff4f5c594e65a3b22efd9ce373deab9b..b27e1173969639448cd2e486b1c5f0fcb1b3b17c
2020-01-04 20:15:37 +0100 to 2020-01-13 11:40:20 +0100
- Update Cargo (rust-lang/rls#1613)
- Rustup to #68024 (rust-lang/rls#1612)
@ehuss ehuss added this to the 1.42.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo rustc -- --crate-type cdylib stopped working
5 participants