Summary: The default opt-level was recently lowered from 1 to 0. `syscalls::syscall!(...)` has one branch to check the error code while `syscalls::raw_syscall!()` does not. Presumably, this branch was getting optimized out when opt-level=1, but not when opt-level=0 and thus started causing the highly-sensitive timer tests to start failing.
Reviewed By: VladimirMakaev
Differential Revision: D47892355
fbshipit-source-id: 9d19d4a1a1e0521650ffcb46a93f4a61a07bcae1
Summary:
Update num_cpus to version 1.16.0. We need this version as it is a requirement
of libbpf-sys v1.2.1+v1.2.0, which is to be imported subsequently.
Reviewed By: zertosh
Differential Revision: D47380958
fbshipit-source-id: d1fa12a1c8a974686d70d47876e990da4a73b839
Summary:
The clippy action has been in a broken state since 1438ff0f2e. This fixes the GitHub action and all of the clippy warnings.
Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/20
Reviewed By: VladimirMakaev
Differential Revision: D47322336
Pulled By: jasonwhite
fbshipit-source-id: 88f8d16cc81269448c2425d8b56bcc3623e04b31
Summary:
This fixes a bug related to bare carriage returns that caused D47318798 to fail in `third-party-rust-verification`. The `schemafy_core` crate contains a file that uses carriage returns which are not followed by newlines 🤮. When that file fails to parse, Reindeer falls back to using non-precise srcs, which produced the following difference to the generated output.
```
diff --git a/third-party/rust/BUCK b/third-party/rust/BUCK
--- a/third-party/rust/BUCK
+++ b/third-party/rust/BUCK
@@ -77047,6 +77047,7 @@
name = "schemafy_core-0.5.1",
srcs = [
"vendor/schemafy_core-0.5.1/src/lib.rs",
+ "vendor/schemafy_core-0.5.1/src/main.rs",
"vendor/schemafy_core-0.5.1/src/one_or_many.rs",
],
crate = "schemafy_core",
```
Reviewed By: zertosh
Differential Revision: D47318928
fbshipit-source-id: 086b96393cc43371b724ac95e841990385576432
Summary: This supports new syntax added in the past months, including `c"..."` CStr literals.
Reviewed By: shayne-fletcher
Differential Revision: D47316927
fbshipit-source-id: ac0e514ca89dad282e64decd01d3a94b3bff8490
Summary:
fbcode is migrating to LLVM-15 for safer and more up-to-date code and new compiler features. All contbuilds in your directory have passed our build test with LLVM-15, and your directory does not house any packages. This diff will migrate it to LLVM-15.
If you approve of this diff, please use the "Accept & Ship" button. If you have a blocker on building with LLVM 15, please comment on this diff. All fbcode directories will move to LLVM 15, so please start working on the fixes, testing and canary ASAP. If all tests are green, we will land this on Friday 06/23/2023.
See the [FAQ post](https://fb.workplace.com/groups/llvm15platform010/posts/749154386769776/)! Please also direct any questions to [this group](https://fb.workplace.com/groups/llvm15platform010).
- If you approve of this diff, please use the "Accept & Ship" button :-)
Build directives:
Reviewed By: palmje
Differential Revision: D46861414
fbshipit-source-id: 29e309e6ef24248aa49bbdd4491c3be23056411f
Summary:
first in a set of diffs with the intent of removing `lazy_static!` from fbcode.
this diff changes `std::sync::Mutex` and `parking_lot::Mutex` to plain `static` initializations where possible.
Reviewed By: zertosh
Differential Revision: D46335784
fbshipit-source-id: 105848f38dcb8083be77a4ad4db267058081fe53
Summary: upgrade parking_lot from version 0.11.2 to version 0.12.1
Reviewed By: zertosh, diliop, dtolnay
Differential Revision: D46398501
fbshipit-source-id: ffae0ea188abad5253f1524216dd18ce9a53a74c
Summary:
rustls 0.21.0 finally has support for IP addresses in certs.
Lots of other crates have (in)direct dependencies on rustls so I have to upgrade those too:
* hyper, reqwest, and auxiliary crates for those have been updated
* tonic has been updated and our local patch removed (since the relevant PR was merged upstream)
Reviewed By: zertosh
Differential Revision: D45989949
fbshipit-source-id: 658c11d29859d6d36368a412dab05e3c99313ee0
Summary: The version we're using is > 1 year old. I noticed the old version doesn't allow to override `assert_eq!` in a form of `use pretty_assertions::assert_eq`
Reviewed By: asm89
Differential Revision: D46010319
fbshipit-source-id: b48678e76fe907bdfbc6709ab438db992eb8d674
Summary:
Basically `arc lint -e extra --take RUSTFIX --apply-patches` over all of
fbcode. Actually done with
`fbcode/common/rust/tools/rustfix2/scripts/rustfix_codemod`.
Some of these fixes don't actually convey the intent of the code, but I
am applying them anyway because they've been outstanding forever. This
diff actually fixes all machine fixable rustfix issues.
Manual changes:
- `fbcode/security/tools/sush2/src/lib/tw.rs` because the pattern match
on a variable is not a thing. (There's a good Learning Rust question
with a good answer on this)
- `fbcode/zippydb/lib/rust/rodos/lib.rs` needed the `#[cfg(test)]`,
otherwise too many unused imports would be removed.
Reviewed By: dtolnay
Differential Revision: D44823936
fbshipit-source-id: 20a35e4977dc362f71b4f88b93b8c2b9a4a7c06a
Summary:
Note: this is a re-land of D44623815, which was was reverted because of a land race with D44626072
In particular this fixes `FlattenUnordered` having a nasty deadlock, but also
some other bugs:
```
# 0.3.28 - 2023-03-30
* Update to syn 2. This raises MSRV of utility crates to 1.56. (#2730, #2733)
* Fix bug in `FlattenUnordered` (#2726, #2728)
# 0.3.27 - 2023-03-11
* Add `TryFlattenUnordered` (#2577, #2590, #2606, #2607)
* Add `AbortHandle::is_aborted` (#2710)
* Add `AbortRegistration::handle` (#2712)
* Make `BiLock` strict-provenance compatible (#2716)
# 0.3.26 - 2023-01-30
* Add `Either::as_pin_mut` and `Either::as_pin_ref` (#2691)
* Add `Shared::ptr_eq` and `Shared::ptr_hash` (#2691)
* Implement `FusedStream` for `Buffered` (#2676)
* Implement `FusedStream` for all streams in `ReadyChunks` (#2693)
* Fix bug in `FuturesOrdered::push_front` (#2664)
* Remove `Fut::Output: Clone` bounds from some `Shared` methods (#2662)
* Remove `T: Debug` bounds from `Debug` implementations of `mpsc` and `oneshot` types (#2666, #2667)
# 0.3.25 - 2022-10-20
* Fix soundness issue in `join!` and `try_join!` macros (#2649)
* Implement `Clone` for `sink::Drain` (#2650)
# 0.3.24 - 2022-08-29
* Fix incorrect termination of `select_with_strategy` streams (#2635)
# 0.3.23 - 2022-08-14
* Work around MSRV increase due to a cargo bug.
```
Reviewed By: zertosh
Differential Revision: D44632588
fbshipit-source-id: bdd87cb02b3aef63a65b1f9b852579225adfedbd
Summary:
Rust recently changed the default channel implementation, so maybe that's what triggered this failure.
This is a pretty brittle test. :/
Reviewed By: VladimirMakaev
Differential Revision: D44389514
fbshipit-source-id: 65ecc07edcab1aef99eb31dea2343d6ff4a92aa2
Summary: Trying to publish more of our docs and materials.
Reviewed By: VladimirMakaev
Differential Revision: D44387507
fbshipit-source-id: 32cd324db73483ec3f0dd7c2c1b0817f559fa958
Summary:
* Adds a `README.md` file.
* Adds optional features to enable memory access and the async API.
`safeptrace` depends on `reverie-process` and `reverie-memory`, so those will need to be published as crates too.
Reviewed By: VladimirMakaev
Differential Revision: D44386559
fbshipit-source-id: e74c55d5d26239aa09aedac130dca880eb5f1206
Summary:
Removes need for patch.
It had already been updated to 3.4 but this just formalizes it.
Reviewed By: jasonwhite
Differential Revision: D44274378
fbshipit-source-id: d17ecbbee06c7df30f689eb859fb31fdf07d8d44
Summary: I am interested in running clippy under buck2 in CI for https://github.com/dtolnay/cxx, but I need it to be configured with `msrv = "..."` the same as my Cargo builds.
Reviewed By: diliop
Differential Revision: D43991741
fbshipit-source-id: c9a6a923651cebf5f24a48c6cd5daac0631cb763
Summary:
`memmap` is unmaintained and hasn't been changed in over 4 years. `memmap2` is
a fork, which is regularly maintained.
Also bump dependency on `grep` as it removes the last third-party internal
reference to memmap.
Reviewed By: dtolnay
Differential Revision: D43486158
fbshipit-source-id: f763848bd295facf60ec601620afd68dfc655bea
Summary:
This causes problems with creating a Nix package for Reverie since it is pulling the readme from a parent directory while nix is trying to isolate each package in the workspace.
Fixes https://github.com/facebookexperimental/reverie/issues/17.
Reviewed By: rrnewton
Differential Revision: D42466480
fbshipit-source-id: 8a7eef961a4477ca31b53c39cb72b57bad07f0ad
Summary:
LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance.
This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code.
- If you approve of this diff, please use the "Accept & Ship" button :-)
Reviewed By: luciang
Differential Revision: D42465117
fbshipit-source-id: 64e7dec0eecaa4e3c50d4fea5ffd1c57cd8b58d7
Summary:
LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance.
This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code.
- If you approve of this diff, please use the "Accept & Ship" button :-)
Reviewed By: luciang
Differential Revision: D42465119
fbshipit-source-id: 02ad87bf0d56b6ced76912bd1d866a192dbbcbda
Summary:
When dba0b5b9b7 moved `LocalMemory` into the standalone `reverie-memory` crate, a doctest import was not updated.
Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/18
Reviewed By: VladimirMakaev
Differential Revision: D42330995
Pulled By: jasonwhite
fbshipit-source-id: 54b4d6770a1b156f09f9feb014730dcec80f32c5
Summary: This removes the need for `safeptrace` to depend on `reverie-syscalls`, which is a somewhat heavyweight library.
Reviewed By: VladimirMakaev
Differential Revision: D41751372
fbshipit-source-id: 36f601c7f441b070cd3a0678621649c4fb12b28e
Summary:
Everything in Reverie is super Linux-specific, so we should just skip compilation if we're not targetting Linux.
This is helpful for consumers of the library when it gets published to crates.io. With this, they don't need to have a special case for this in the `[dependencies]` section of `Cargo.toml`.
Reviewed By: VladimirMakaev
Differential Revision: D41824410
fbshipit-source-id: be1e0a887e35ed151cfad27af8107246df30c2e5
Summary: Might lead to a minor speed up, but probably not due to the magic of compiler optimizations. I noticed this a while back and meant to fix it before publishing the `safeptrace` crate (so this won't be a breaking change later).
Reviewed By: VladimirMakaev
Differential Revision: D41699769
fbshipit-source-id: ef3e5f24468ddb4b69b8628e28b1da8cfdcbce7b
Summary:
We want to use this in detcore, and reverie-util is slated to go away.
Detcore-model is meant to be widely depended on anyway, so this is a fine place for it.
Reviewed By: jasonwhite
Differential Revision: D41627508
fbshipit-source-id: bb477909217231d8fb6a7bafbfca1fb72a578ec2
Summary: Removing this to remove another dependency on `reverie-util`, so we can eventually get rid of it.
Reviewed By: rrnewton
Differential Revision: D41629842
fbshipit-source-id: bf6d518db6e5ff9f4149936a7dabc0e912133886
Summary:
We output the pretty backtrace as JSON, but demangling of symbol names only happens when a symbol is debug printed, which therefore doesn't apply to the JSON.
Instead, demangle pretty backtraces by default so this demangling applies to the output JSON
Reviewed By: jasonwhite
Differential Revision: D41687077
fbshipit-source-id: ee5919597a37664dfb8a66c4fdeda86379d024a9