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

don't enable parking_lot nightly features #84614

Merged
merged 1 commit into from
Apr 29, 2021
Merged

Conversation

RalfJung
Copy link
Member

Having the compiler itself depend on external libraries that use nightly features can lead to "fun" bootstrap situations. Within the rustc repo we use cfg(bootstrap) to resolve those, but that is not a reasonable option for external dependencies.

So I propose we stop enabling the "nightly" feature of parking_lot here. In my experiments, this then indeed leads to the feature not being enabled (i.e., nothing else enables it), and everything still builds. However, this means parking_lot's RwLock will no longer have hardware lock elision for readers -- I hope that is okay to lose in exchange for less bootstrap brain twisting. ;)

Cc @Amanieu

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(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 Apr 27, 2021
@jyn514
Copy link
Member

jyn514 commented Apr 27, 2021

Having the compiler itself depend on external libraries that use nightly features can lead to "fun" bootstrap situations. Within the rustc repo we use cfg(bootstrap) to resolve those, but that is not a reasonable option for external dependencies.

However, this means parking_lot's RwLock will no longer have hardware lock elision for readers -- I hope that is okay to lose in exchange for less bootstrap brain twisting. ;)

Hmm, has this caused trouble in practice? Maybe it sense to wait until this breaks things before turning it off, with the intention of re-enabling it once the breakage is fixed?

@RalfJung
Copy link
Member Author

This is causing trouble right now in #84556. A few rabbit holes down, I found myself opening this PR. ;)

@Mark-Simulacrum
Copy link
Member

@bors try @rust-timer queue

I suspect this'll likely be a minor-ish performance hit, in which case we'll want to re-add it after we fix parking_lot on nightly, but if it isn't then we can just keep it non-nightly I suspect.

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 28, 2021
@bors
Copy link
Contributor

bors commented Apr 28, 2021

⌛ Trying commit 170a10b with merge 8e137b1d29b0369e5c35127a5b3c13c786ab6487...

@Mark-Simulacrum Mark-Simulacrum removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 28, 2021
@bors
Copy link
Contributor

bors commented Apr 28, 2021

☀️ Try build successful - checks-actions
Build commit: 8e137b1d29b0369e5c35127a5b3c13c786ab6487 (8e137b1d29b0369e5c35127a5b3c13c786ab6487)

@rust-timer
Copy link
Collaborator

Queued 8e137b1d29b0369e5c35127a5b3c13c786ab6487 with parent da43ee8, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (8e137b1d29b0369e5c35127a5b3c13c786ab6487): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 29, 2021
@Mark-Simulacrum
Copy link
Member

Seems to not actually matter much for performance, if at all, so we can probably not re-enable it. Alternatively, this is not the only place nightly is actually enabled, and this PR does nothing.

@bors r+

@bors
Copy link
Contributor

bors commented Apr 29, 2021

📌 Commit 170a10b has been approved by Mark-Simulacrum

@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 Apr 29, 2021
@bors
Copy link
Contributor

bors commented Apr 29, 2021

⌛ Testing commit 170a10b with merge ada1024...

@bors
Copy link
Contributor

bors commented Apr 29, 2021

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing ada1024 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 29, 2021
@bors bors merged commit ada1024 into rust-lang:master Apr 29, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 29, 2021
@RalfJung
Copy link
Member Author

Alternatively, this is not the only place nightly is actually enabled, and this PR does nothing.

I did try to exclude this by using patch and making builds with that feature fail -- but I might have screwed that up.

FWIW, the issue with re-enabling this is that we might end up in a situation where we actually rely on the nightly-only feature, so the next recursive bootstrap problem might be harder to resolve (since just using stable parking_lot might not be an option).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

7 participants