Uh oh!
There was an error while loading. Please reload this page.
Simplify atomics using lazy - #759
Conversation
09f7584 to
3a40345Compare| #[allow(dead_code, reason = "not used in all backends")] | ||
| mod error; | ||
| #[allow(dead_code, reason = "not used in all backends")] | ||
| mod lazy; |
There was a problem hiding this comment.
We can't unconditionally include lazy. It will cause breakage on platforms without AtomicUsize.
There was a problem hiding this comment.
Which platorms, please? Are they not included in CI?
There was a problem hiding this comment.
Interesting, well it used to be the riscv32imc platforms (which do not have atomics). However, for some reason lazy.rs is building, even on a target like riscv32imc-unknown-none-elf which definitely doesn't have atomics. I'll investigate furthur.
| use core::mem::MaybeUninit; | ||
| mod backends; | ||
| #[allow(dead_code, reason = "not used in all backends")] |
There was a problem hiding this comment.
Remove this, we only want #[allow(dead_code)] on certain methods in the error module.
There was a problem hiding this comment.
There are only two pub (crate) items on the error module and prior to this change they are both marked allow(dead_code). Which methods do you not want this on?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
320758f to
d22e6e5CompareThere was a problem hiding this comment.
I am not convinced that we should "simplify" the NetBSD backend by reusing the lazy module. The current code is fairly straightforward and self-contained, I don't see significant issues with it.
This PR also introduces a lot of other IMO unnecessary changes out of scope for the purpose declared in the PR title.
tamird
commented
Nov 25, 2025
Sure, I can break it up into more PRs if you folks prefer. I was just looking for ways to make things a bit more neat. Anyway, I used a macro to introduce |
briansmith
commented
Dec 5, 2025
At least, I don't see how this change makes things easier to understand. The additional abstraction with the macros makes things harder to understand.
+1. |
tamird
commented
Dec 5, 2025
I'll mark this as draft - said other changes were in #760 (now #763) |
newpavlov
commented
Dec 10, 2025
Closing per my comment above. |
No description provided.