Skip to content

Deserialize Msrv directly in Conf #11683

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Conversation

Alexendoo
Copy link
Member

Gives the error a span pointing to the invalid config value

Also puts Conf itself in the OnceLock rather than just the Msrv for the register_late_mod_pass work since it will be used from two different callbacks

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Oct 18, 2023

r? @Manishearth

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 18, 2023
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 18, 2023

📌 Commit f36f59c has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 18, 2023

⌛ Testing commit f36f59c with merge 4b4ac1d...

bors added a commit that referenced this pull request Oct 18, 2023
Deserialize `Msrv` directly in `Conf`

Gives the error a span pointing to the invalid config value

Also puts `Conf` itself in the `OnceLock` rather than just the `Msrv` for [the `register_late_mod_pass` work](rust-lang/rust#116731) since it will be used from two different callbacks

changelog: none
@bors
Copy link
Contributor

bors commented Oct 18, 2023

💔 Test failed - checks-action_test

@@ -100,7 +100,7 @@ Suppress lints whenever the suggested change would cause breakage for other crat
## `msrv`
The minimum rust version that the project supports

**Default Value:** `None` (`Option<String>`)
**Default Value:** `Msrv { stack: [] }` (`crate::Msrv`)
Copy link
Member

@flip1995 flip1995 Oct 18, 2023

Choose a reason for hiding this comment

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

Huh, why is the default value of MSRV an empty stack? 🤔

EDIT: Ah I see why now. But this might be confusing to the user. I'm not sure what to do about this though, so I don't want to block this PR on this. I really like the code improvements and the pointing to the value.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah damn I didn't think about that, I think we need to change that in general since other config values also show internal type names which isn't helpful for public documentation

Copy link
Member

Choose a reason for hiding this comment

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

Right, I don't think this has to be done in this PR though. So feel free to r=me here now. But if you feel like doing it in this PR, I won't stop you 🙃

@Alexendoo
Copy link
Member Author

@bors r=Manishearth,flip1995

I'll think about the config thing separately, I think it would need website changes as well

@bors
Copy link
Contributor

bors commented Oct 19, 2023

📌 Commit 1528c1d has been approved by Manishearth,flip1995

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 19, 2023

⌛ Testing commit 1528c1d with merge 9574d28...

@bors
Copy link
Contributor

bors commented Oct 19, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth,flip1995
Pushing 9574d28 to master...

@bors bors merged commit 9574d28 into rust-lang:master Oct 19, 2023
@Alexendoo Alexendoo deleted the msrv-config branch October 19, 2023 12:03
# for free to join this conversation on GitHub. Already have an account? # 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.

5 participants