Skip to content

Conversation

GrigorenkoPV
Copy link
Contributor

@GrigorenkoPV GrigorenkoPV commented Dec 23, 2024

Tracking issue: #134646

r? @tgross35

I've used sync_poison_mod feature flag instead, because sync_poison had already been used back in 1.2.

try-job: x86_64-msvc

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 23, 2024
@rust-log-analyzer

This comment has been minimized.

#![stable(feature = "rust1", since = "1.0.0")]

// No formatting: this file is just re-exports, and their order is worth preserving.
#![cfg_attr(rustfmt, rustfmt::skip)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this skip just get applied to specific blocks, like in https://github.com/rust-lang/rust/blob/addbd001ec56741829f20a3000892f8620dd0843/library/core/src/unicode/mod.rs? Applying to the whole file would probably make it a bit too easy for things to get messy.

Copy link
Contributor Author

@GrigorenkoPV GrigorenkoPV Dec 23, 2024

Choose a reason for hiding this comment

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

Then pretty much every block of uses would have to be annotated, because otherwise rustfmt will regroup them.

IMO this looks even noisier and less accurate with all the additional attributes and inability to leave two blank lines between the groups (rustfmt removes double empty lines).

Copy link
Contributor

Choose a reason for hiding this comment

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

Alright, the blank line section breaks are fine but could you remove the double blank lines since rustfmt doesn't do those anywhere? I.e. \n\n\n -> \n\n.

@tgross35
Copy link
Contributor

tgross35 commented Dec 23, 2024

I don't think this plays with rustdoc nicely. Searching for Mutex now gives the absolute std::sync::poison::Mutex path, where it has an "unstable" mark. But if you open it in std::sync::Mutex, it is fine.

These should probably be marked doc(inline) for now. But @rust-lang/rustdoc is there something we can do better for stable types reexported from unstable modules? This is also a problem for other types too, e.g. FromBytesUntilNulError looks like it is unstable because it got moved from core::ffi to core::ffi::c_str.

Edit: opened #134702

@GrigorenkoPV
Copy link
Contributor Author

These should probably be marked doc(inline) for now.

Done. This helped with the search, but not with the things like MutexGuard's doc's reference to Mutex::lock being converted to the absolute (unstable) std::sync::poison::Mutex path.

@tgross35
Copy link
Contributor

tgross35 commented Dec 23, 2024

I am not sure what you mean, could you post a screenshot (edit: on the rustdoc issue, #134702)? Unfortunately we probably should wait on a Rustdoc fix then, this would be a lot of API to have misleading documentation.

// * RwLock (nonpoison_rwlock)

// FIXME(sync_nonpoison): conditionally select the default flavor based on edition(?).
use self::poison as default_poison_flavor;
Copy link
Contributor

Choose a reason for hiding this comment

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

We are at least two years off from an edition where we would change these defaults, so I don't think this needs to be addressed at this point. Just reexporting from self::poison should be fine, things might change between now and the next edition.

@rust-log-analyzer

This comment has been minimized.

@GrigorenkoPV
Copy link
Contributor Author

#134702 got closed, but #134702 (comment) is still a problem.
I guess we can manually qualify all the links in docs to lead to std::sync::* until the std::sync::poison module is stabilized, but that sounds a bit suboptimal.

@tgross35
Copy link
Contributor

It seems like the rustdoc output should be fixed with #134806, could you double check?

With that the only remaining thing is to drop default_poison_flavor #134692 (comment) and the small style nit above, rest lgtm.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 31, 2024
@GrigorenkoPV
Copy link
Contributor Author

It seems like the rustdoc output should be fixed with #134806, could you double check?

Yes, works fine now.

With that the only remaining thing is to drop default_poison_flavor #134692 (comment)

Done.

and the small style nit above

Done

@tgross35
Copy link
Contributor

tgross35 commented Jan 1, 2025

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 1, 2025

📌 Commit 2ff5393 has been approved by tgross35

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 1, 2025
@bors
Copy link
Collaborator

bors commented Jan 2, 2025

⌛ Testing commit dd99d4c with merge e3acb18...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jan 2, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 2, 2025
@GrigorenkoPV
Copy link
Contributor Author

I was not able to run debuginfo tests locally (they failed, maybe due to llvm version mismatch or something else, no idea), so I tried blessing them blindly and ended up adding an extra ::poison::. I removed it now. Hopefully, now it'll work.

@notriddle
Copy link
Contributor

@bors r=tgross35

@bors
Copy link
Collaborator

bors commented Jan 2, 2025

📌 Commit ee2ad4d has been approved by tgross35

It is now in the queue for this repository.

@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 2, 2025
@tgross35
Copy link
Contributor

tgross35 commented Jan 2, 2025

@bors rollup=iffy

@bors
Copy link
Collaborator

bors commented Jan 3, 2025

⌛ Testing commit ee2ad4d with merge ac00fe8...

@bors
Copy link
Collaborator

bors commented Jan 3, 2025

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing ac00fe8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 3, 2025
@bors bors merged commit ac00fe8 into rust-lang:master Jan 3, 2025
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Jan 3, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ac00fe8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -4.1%, secondary -3.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.1% [-4.1%, -4.1%] 1
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) -4.1% [-4.1%, -4.1%] 1

Cycles

Results (primary -3.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.0% [-3.0%, -3.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.0% [-3.0%, -3.0%] 1

Binary size

Results (primary 0.0%, secondary 0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.1%] 23
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.1%] 23

Bootstrap: 763.847s -> 763.746s (-0.01%)
Artifact size: 325.57 MiB -> 325.60 MiB (0.01%)

@GrigorenkoPV GrigorenkoPV deleted the sync_poision branch January 3, 2025 11:07
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. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants