Skip to content

Comments

internal: Add minicore smoke test#14604

Merged
bors merged 1 commit intorust-lang:masterfrom
HKalbasi:dev3
Apr 18, 2023
Merged

internal: Add minicore smoke test#14604
bors merged 1 commit intorust-lang:masterfrom
HKalbasi:dev3

Conversation

@HKalbasi
Copy link
Member

fix #14501

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 18, 2023
#[test]
fn minicore_smoke_test() {
// Checks that there is no diagnostic in minicore for each flag.
for flag in MiniCore::available_flags() {
Copy link
Member

Choose a reason for hiding this comment

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

Given flags can be nested to activate things only when multiple are active this doesn't make too much sense. I think it's fine to just check with all flags enabled.

Copy link
Member Author

Choose a reason for hiding this comment

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

In this way it can catch missing dependencies between flags, which happened for me one time IIRC. But yes it seems it doesn't cover some cases. Is it fine to check one time for each flag and one time with all flags enabled? A complete check should try every 2^n subset of flags, which is definitely not worth it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I implemented the "one time for each flag and one time with all flags" approach.

Copy link
Member

Choose a reason for hiding this comment

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

Doing both seems fine as well 👍

@Veykril
Copy link
Member

Veykril commented Apr 18, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Apr 18, 2023

📌 Commit f05f7ab has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 18, 2023

⌛ Testing commit f05f7ab with merge 112464f...

@bors
Copy link
Contributor

bors commented Apr 18, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 112464f to master...

@bors bors merged commit 112464f into rust-lang:master Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a test that checks minicore for errors

4 participants