Summary:
I am upgrading nix to 0.29.0. To ensure each step produces clean CI
and is bisectable if something goes wrong, start by going from 0.25 to
0.26.4.
Reviewed By: zertosh
Differential Revision: D66275116
fbshipit-source-id: 63c87ff4f4c631061e5a1c721f52563dc90b7e2b
Summary:
From release notes:
Ractor v0.12.4 is released!
In this release there are 2 primary changes
1. We're adding the ability to runtime inspect the message type of an untyped `ActorCell` which can be helpful for supervision flows
2. We're also adding helpers for interacting with a supervisor's children (retrieval of the children, stopping them, and draining them) without having to have the supervisor keep additional handles around
Both are in #277
Tokio is being upgraded to add support for `join_all()` in `JoinSet` which `ractor` leverages (easier to upgrade than backport a hack into ractor)
Reviewed By: Imxset21
Differential Revision: D64833735
fbshipit-source-id: 897302bf95467310131348f1ee8c1f766e81f725
Summary:
ignore-conflict-markers
A while ago, I made the parsing of tags in gitoxide tolerate a missing
timestamp.
We have now seen this situation in two repos:
* aosp/platform/external/brctl
* aosp/platform/external/iproute2
Update all gitoxide crates to their latest version (equivalent to upstream main)
to propagate that fix to us.
I had to list all gitoxide crates explicitely to avoid issues with conflicting requirements
for any crates in the dependency chain.
The commit I'm pointing at in my fork of gitoxide is litterally `main` plus a version update
to propagate the fix throughout the gix ecosystem.
NOTE: I had to slightly edit the integration test to make the failure
representative of the incorrect parsing, but see the updated
integration test for proof that the latest version can parse a tag that's
missing a timestamp.
Reviewed By: RajivTS, singhsrb
Differential Revision: D63771328
fbshipit-source-id: fdbc9d762bacf48c7b17615181371cd92a4a921f
Summary: I need these newer versions in a package I want. Upgrade them so instead of having two copies floating around the repo (one we use, one as a dependency), we only have one.
Reviewed By: zertosh
Differential Revision: D62025056
fbshipit-source-id: 452d440cfa3b22f57f113568774c39fcb2fe2446
Summary:
Need to add some third-party, which is pulling newer tokio.
Land upgrade separately for visibility and for easier bisect and revert.
Reviewed By: Imxset21, JakobDegen
Differential Revision: D55030643
fbshipit-source-id: 47b509ce2103d1dd64c66aa250133eb25758a750
Summary:
building the "renderdag" package (fbcode/eden/scm/lib/renderdag/Cargo.toml) fails with
```lang=php,counterexample
error[E0277]: the trait bound `InternalBitFlags: Serialize` is not satisfied
--> /data/users/shaynefletcher/fbsource/fbcode/eden/scm/lib/renderdag/src/render.rs:213:46
```
this diff resolves the issue by enabling the `serde` feature on the bitflags crate
Reviewed By: capickett
Differential Revision: D54067851
fbshipit-source-id: 2f6ababbae0c4667e4896f03a2fb39c973de535c
Summary:
## Motivation
Since the latest compiler update, we are getting `clippy::bad_bit_mask` errors at the callsites of `bitflags!` macros where one of the variant is zero.
[Upstream won't address it in the `1.x` branch](https://github.com/bitflags/bitflags/pull/373) and recommends upgrading to the `2.x` branch.
We are very close to reaching **zero clippy lints** in [Mononoke and other servers](https://fburl.com/code/pd76yn5e), which would feel nice.
## Specific categories of changes (in case it helps with the code review)
The change from `1.x` to `2.x` introduces a number of backward compatibility breakages which I had to workaround in our codebase.
See [the release notes for 2.0](https://github.com/bitflags/bitflags/releases/tag/2.0.0) for the explanation for the manual fixes I had to perform at each call site.
---
**Adding traits to derive:**
```
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
```
> Generated flags types now derive fewer traits. If you need to maintain backwards compatibility, you can derive the following yourself:
---
**Replacing read uses of `.bits` with `.bits()`**
> You can now use the .bits() method instead of the old .bits.
> The representation of generated flags types has changed from a struct with the single field bits to a newtype.
---
**Replacing raw setting of `.bits` with `.from_bits_retain()`**
Due to the point above, the representation of the type is not exposed anymore. From [the documentation](https://docs.rs/bitflags/latest/bitflags/example_generated/struct.Flags.html#method.from_bits_retain), `from_bits_retain` "convert from a bits value exactly", which matches the old behaviour
---
**Replacing the unsafe `from_bits_unchecked` method with `from_bits_retain`**
> The unsafe from_bits_unchecked method is now a safe from_bits_retain method.
---
**Extracting some structs outside of the `bitflags!` macro**
Apart from the derives that `bitflags` knows about, such as `serde`, `bitflags` now can't deal with custom derives in macros with the previous syntax. I followed the recommendation from [their documentation](https://docs.rs/bitflags/latest/bitflags/index.html#custom-derives) to declare the `struct` ahead of of the macro call and only declare the `impl` block inside the macro.
---
**Changes to test output**
This does not stand out in the release notes, but as of [this upstream PR](https://github.com/bitflags/bitflags/pull/297), the `Debug` output of generated bitflags has changed. This means any tests that rely on this (and of course, there are a few) needed updating.
In particular, the `vespa` tests rely on that output in a non-obvious way. You might have to trust me (and CI) on these ones...
Reviewed By: dtolnay
Differential Revision: D49742979
fbshipit-source-id: c818c37af45f0964e8fdb7ec6173ad66bb982c00
Summary: Adds basic info that every crate should have.
Reviewed By: dtolnay
Differential Revision: D52051107
fbshipit-source-id: 828ac6a752dbb4b419577fca08815014c8b96c42
Summary:
Release notes: https://blog.rust-lang.org/2023/10/05/Rust-1.73.0.html
This release is coupled with an update of the `anyhow` and `thiserror` crates because the unstable standard library API for backtraces has changed.
Fbcode changes:
- `feature(default_free_fn)` deleted (D50300881)
- `noop_method_call` lint becomes warn-by-default (D50486032, D50516201)
- stronger `invalid_reference_casting` detection (D50488164)
- `feature(unix_chown)` has been stabilized
- `feature(provide_any)` and `std::provider` deleted
- `clippy::unwrap_or_else_default` renamed to `clippy::unwrap_or_default`
- type inference ambiguities (D51780425)
- `nu-command` build error (D51779062)
Reviewed By: AndreasBackx, shayne-fletcher
Differential Revision: D50294321
fbshipit-source-id: 0fac87f6ba072ad029f9ce41ce94ed813e855b20
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: 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:
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:
* 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: 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: Fixes `skip_seccomp_syscall` on aarch64 to *actually* skip the syscall. I plan on cleaning this up a bit more in a later diff because we are calling `getregs` and `setregs` more than necessary on a per-interception basis.
Reviewed By: VladimirMakaev
Differential Revision: D40867423
fbshipit-source-id: d72b4998b5c1c44f426a9129eccb205ccfc320fa
Summary: Update from 0.2.135 to 0.2.137, the latest version on crates.io, in preparation for backporting a PR in the diff after this one.
Reviewed By: zertosh
Differential Revision: D40874274
fbshipit-source-id: debf9dae82ecc20201470e634f10904a2b308e51
Summary:
Followed guide here https://www.internalfb.com/intern/wiki/Linting/License_Lint/ to add fbcode/hermetic_infra/** code to license linter. As we have parts of our code shipped as Open Source it's important to get this automated
This diff is updating existing file's licenses to not get conflict after lint rule enablement
Reviewed By: jasonwhite
Differential Revision: D40674080
fbshipit-source-id: da6ecac036f8964619cf7912058f3a911558e7b1
Summary: This updates the libc crate to 0.2.135, which includes the FICLONE constant needed to the given ioctl.
Reviewed By: justintrudell
Differential Revision: D40286796
fbshipit-source-id: acfa115479cd289f478d8d73937be34ced5c4bbb
Summary:
When I was trying to use `nix::unistd::gethostname` in D39783468, the version `0.23.0` will require users to pass in a `buf` as a parameter, however, in `0.25.0`, there is no need to pass in a `buf` as a parameter. Hence, I would love to update `nix` crate from `0.23` to `0.25` in order to not pass a redundant `buf` while calling `nix::unistd::gethostname`.
I fixed conflicts reflected from the signals manually so this diff is more than a few lines of code in `Cargo.toml`.
Here are the [changes](https://github.com/nix-rust/nix/compare/v0.23.0..v0.25.0) between `0.23` and `0.25`. See `CHANGELOG.md` for the most significant changes in this version.
Reviewed By: bgw
Differential Revision: D39919100
fbshipit-source-id: 7f62585ff72230bd2608aeb5a4780dc0128795f7
Summary: D39418421 (8fef664fab) prematurely upgraded `thiserror`. Various projects in fbcode use nightly features including std::backtrace but the current fbcode Rust toolchain is 1.63.0, in which the backtrace API is different from the API of the latest nightlies.
Reviewed By: quark-zju
Differential Revision: D39562441
fbshipit-source-id: d1f8a993ec776cf82b1736b242bd4466def21230