Skip to content

Print colored warnings when build script panics#8017

Merged
bors merged 1 commit into
rust-lang:masterfrom
aleksator:3672_color_build_script_warnings_on_panic
Mar 18, 2020
Merged

Print colored warnings when build script panics#8017
bors merged 1 commit into
rust-lang:masterfrom
aleksator:3672_color_build_script_warnings_on_panic

Conversation

@aleksator

Copy link
Copy Markdown
Contributor

Fixes #3672

@rust-highfive

Copy link
Copy Markdown

r? @Eh2406

(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 Mar 18, 2020
@Eh2406

Eh2406 commented Mar 18, 2020

Copy link
Copy Markdown
Contributor

@bors r? @ehuss

@rust-highfive rust-highfive assigned ehuss and unassigned Eh2406 Mar 18, 2020
Comment thread src/cargo/core/compiler/custom_build.rs Outdated
Comment on lines 458 to 465

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe derive Default on BuildOutput, and then use default() here to avoid specifying all these fields.

Comment thread src/cargo/core/compiler/custom_build.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of using a closure here, perhaps do something like:

if let Err(e) = output {return Err(e);
}

Just seems a slightly clearer to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, this was actually the first version I wrote, but changed it to this one to avoid needless wrapping/unwrapping. Will change back

@aleksator aleksator force-pushed the 3672_color_build_script_warnings_on_panic branch from 04d880b to 590c803 Compare March 18, 2020 19:09
@ehuss

ehuss commented Mar 18, 2020

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Mar 18, 2020

Copy link
Copy Markdown
Contributor

📌 Commit 590c803 has been approved by ehuss

@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 Mar 18, 2020
@bors

bors commented Mar 18, 2020

Copy link
Copy Markdown
Contributor

⌛ Testing commit 590c803 with merge 03d7154...

@bors

bors commented Mar 18, 2020

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-azure
Approved by: ehuss
Pushing 03d7154 to master...

@bors bors merged commit 03d7154 into rust-lang:master Mar 18, 2020
@aleksator aleksator deleted the 3672_color_build_script_warnings_on_panic branch March 19, 2020 09:41
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 25, 2020
Update cargo.

8 commits in 7019b3ed3d539db7429d10a343b69be8c426b576..8a0d4d9c9abc74fd670353094387d62028b40ae9
2020-03-17 21:02:00 +0000 to 2020-03-24 17:57:04 +0000
- Re-implement proc-macro feature decoupling. (rust-lang/cargo#8028)
- Remove unused transitive dependencies: miniz_oxide, adler32 (rust-lang/cargo#8023)
- Fix bug with -Zfeatures=dev_dep and `check --profile=test`. (rust-lang/cargo#8027)
- Remove Config from CompileOptions. (rust-lang/cargo#8021)
- Add `rustless.org` to documented blocklist. (rust-lang/cargo#7922)
- Print colored warnings when build script panics (rust-lang/cargo#8017)
- Do not supply --crate-version flag to rustdoc if present in RUSTDOCFLAGS (rust-lang/cargo#8014)
- Add proc-macro to index, and new feature resolver. (rust-lang/cargo#8003)
Centril added a commit to Centril/rust that referenced this pull request Mar 26, 2020
Update cargo.

8 commits in 7019b3ed3d539db7429d10a343b69be8c426b576..8a0d4d9c9abc74fd670353094387d62028b40ae9
2020-03-17 21:02:00 +0000 to 2020-03-24 17:57:04 +0000
- Re-implement proc-macro feature decoupling. (rust-lang/cargo#8028)
- Remove unused transitive dependencies: miniz_oxide, adler32 (rust-lang/cargo#8023)
- Fix bug with -Zfeatures=dev_dep and `check --profile=test`. (rust-lang/cargo#8027)
- Remove Config from CompileOptions. (rust-lang/cargo#8021)
- Add `rustless.org` to documented blocklist. (rust-lang/cargo#7922)
- Print colored warnings when build script panics (rust-lang/cargo#8017)
- Do not supply --crate-version flag to rustdoc if present in RUSTDOCFLAGS (rust-lang/cargo#8014)
- Add proc-macro to index, and new feature resolver. (rust-lang/cargo#8003)
@ehuss ehuss added this to the 1.44.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.

Print & color build script warnings, even when build script panics

5 participants