Summary:
The latest version of cpython has a function we need. Let's update.
This also points us back at the main cpython repo, instead of quark-zju's personal
repo.
Reviewed By: quark-zju
Differential Revision: D32370604
fbshipit-source-id: 345883d916f10d131bc8c7bd1f9520514a07e039
Summary:
Update tracing-subscriber crate to 0.3.1. Also add some features that David Barsky suggested.
Also update tracing-appender since 0.1.x is incompatible.
Reviewed By: zsol
Differential Revision: D32175169
fbshipit-source-id: ad714db1c1c67b508be1c97d3dc960dd7d809cc6
Summary:
This updates the existing Diem & Move crates to the latest release (1.5).
A patch was needed to make feature unification work.
- `diem-crypto` has two exclusive features "fiat" and "u64", with ["fiat"] being the default feature set
- `diem-types` depends on `diem-crypto`, but it doesn't disable the default features, so "fiat" is enabled as a result
- jellyfish-merkle uses both `diem-types` and `diem-crypto` with feature "u64" enabled. This is problematic since "u64" and "fiat" cannot coexist.
- The patch simply disables the default features from `diem-crypto` in the `Cargo.toml` of `diem-types`
The following libraries have been bumped to satisfy version selection:
1. hex: 0.4 => 0.4.3
2. proptest: 0.1 => 1.0
3. proptest-derive: 0.2 => 0.3
4. serde_json: 1.0.60 => 1.0.64
#buildmore
Reviewed By: jsgf
Differential Revision: D31842317
fbshipit-source-id: c4d75b167e32f5f004dc8ed578750d7b2c6fe0ff
Summary:
D31800345 (d28a9f4ccd) removed some imports to fix an unused import warning.
However, these imports were actually needed for opt mode builds. This broke our
contbuild: https://www.internalfb.com/intern/sandcastle/job/13510799390741059/
Add the imports back, but gate behind the same `cfg` as where they are used.
Reviewed By: mzr
Differential Revision: D32020281
fbshipit-source-id: 90a91e8cf51bad72a277ab2d4a67b54a401849f2
Summary:
The 2021 edition has some new traits in the prelude, which means they no longer require an explicit import in every module that wants to use them.
Details: https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html
Reviewed By: metajack
Differential Revision: D31823254
fbshipit-source-id: 7532a198347b032f0cf9277c916d54db268581ba
Summary: Generated by `rg -g Cargo.toml 'edition = "2018"' -l | xargs sed 's/edition = "2018"/edition = "2021"/' -i`. I guess these are all the handwritten Cargo.tomls. I confirmed that `cargo autocargo` does not revert any of the changed files in this diff.
Reviewed By: aaronabramov
Differential Revision: D31832704
fbshipit-source-id: ac4ea947ae80d25911fa9eedf2951eeead9d5636
Summary: We need the rayon feature in the next diff in the stack
Reviewed By: alunyov
Differential Revision: D31833982
fbshipit-source-id: e908b3a8f8a16647df0bffe7a44115393254f7d9
Summary: Generated by `sed -i 's/edition = "2018"/edition = "2021"/' common/rust/cargo_from_buck/project_configs/*.toml` and `cargo autocargo` following the autocargo code change in D31830985 and its corresponding MSDK rebuild in D31832311.
Reviewed By: zertosh
Differential Revision: D31832698
fbshipit-source-id: db79024cad311467d5b7c13b7abedc6464f09366
Summary:
Recent versions of Rust allow directly iterating over values of an array, as opposed to iterating over references to slice elements and needing to clone the slice elements out of the array to obtain them by value.
```
// Before
for elem in [x, y, z].iter() {
do_thing(*elem);
}
// After
for elem in [x, y, z] {
do_thing(elem);
}
```
This diff updates several places in fbcode to use this style.
Details: https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html
Reviewed By: zertosh
Differential Revision: D31823193
fbshipit-source-id: 57eb396c0c4c2b90bd3f741430f8c5a390224337
Summary: `blobstore` was only mutated when behind an attribute, so restructuring the code a bit to remove the `mut` warning with this in mind.
Reviewed By: fanzeyi
Differential Revision: D31805427
fbshipit-source-id: 1bb82a497d4c8f6b413736e022eddd3894c284e3
Summary: The compiler thinks they are unused, but they are actually used, just behind attributes.
Reviewed By: fanzeyi
Differential Revision: D31804925
fbshipit-source-id: d84c3cf103317d2fd41408e478bc52a41b2e8fa6
Summary:
Previously was getting this warning:
```
warning: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
--> eden/hg-server/lib/hg-http/src/lib.rs:77:47
|
77 | static PROGRESS_REPORTING_STATE: Lazy<Box<dyn Drop + Send + Sync>> = Lazy::new(|| {
| ^^^^
|
= note: `#[warn(dyn_drop)]` on by default
```
Reviewed By: fanzeyi
Differential Revision: D31804927
fbshipit-source-id: c54dc768200bafe06f9f38db6b2a37e524d38ea8
Summary: Codemod to add `..Default::default()` to Rust thrift struct instantiations. This will be required by D31751301.
Reviewed By: dtolnay
Differential Revision: D31749612
fbshipit-source-id: 56b0081550d4a24a1741407c47ac342e6fec87f0
Summary: Bump in preparation for a new release
Reviewed By: brianc118
Differential Revision: D31657479
fbshipit-source-id: eeb2a08c54f6db75b6e515ca0966637f31b906a8
Summary: we run the eden endpoints from mononoke server, not via this binary any more. remove it
Reviewed By: StanislavGlebik
Differential Revision: D31501592
fbshipit-source-id: 0626fe43f0f1ce4a6c7165a734eb487225fa65b6
Summary:
The hg client uses a version of reqwest that relies on tokio-0.2. In
the next diff I will add `clientinfo` as a dependency of Mononoke LFS server,
which also pulls in `configparser`. However, Mononoke LFS server uses
tokio-1.0.
Update the reqwest dependency to be the latest version.
Reviewed By: quark-zju
Differential Revision: D31389559
fbshipit-source-id: acf4c3b5c9df2a8bc8cfa134a2d314fbb96c3354
Summary:
Using modulo on arbitrary integers to get random numbers [isn't correct](https://www.internalfb.com/diff/D31305392 (da13975a4f)?dst_version_fbid=311037904117090&transaction_fbid=550270779610744), as the distribution between numbers isn't fair (unless the size is a power of two).
This was raised on D31305392 (da13975a4f), but we decided to land that quickly to unblock builds before doing these changes.
I'm applying the changes suggested on D31305392 (da13975a4f). This is what this diff does:
- For all cases where we generate small numbers (up to 5), replace with call to `Gen::choose`, so `u32::arbitrary(g) % 3` becomes `g.choose(&[0, 1, 2]).unwrap()`.
- For generating numbers in range 0..=1, I instead replaced with generating a boolean, which gets rid of the `unreachable!` calls.
- I removed the code to generate numbers in range 0..=0.
- For generating larger numbers, I used `u64::arbitrary` instead, which should make things "less wrong".
Some things I assumed, but am happy to change before landing, just let me know:
- Theoretically we don't *need* to change the code for `% 2` and `% 4`, as the math checks out there. I changed it for consistency there, but am happy to change it back.
- Using boolean also wasn't suggested initially, I'm happy to change back.
Reviewed By: krallin
Differential Revision: D31379381
fbshipit-source-id: a0bac26ebabd32a6c65f717512de998ef5dc37c8
Summary:
A spawner type is required for new thrift clients, specify the noop one for now.
This also requires regenerating the generated thrift libraries.
Reviewed By: yancouto
Differential Revision: D31338518
fbshipit-source-id: cbecf3ec6f9678918ca459c19f1cc160214fadfd
Summary: I'm parsing some deeply-nested JSON, and it's running into the limit. This feature enables a potential footgun, but even with the feature enabled you have to add code to reach for said footgun.
Reviewed By: jsgf
Differential Revision: D31284743
fbshipit-source-id: 00ea5d7d7db8bdeb878d48fe390831f39e007409
Summary:
This updates the following crates to their latest versions:
- `rand`: 0.7 => 0.8
- `quickcheck`: 0.9 => 1.0
Both crates introduced some breaking changes, so affected clients had to be fixed accordingly. Most changes are rather mechanical and shouldn't change the existing logic. In addition, a few buggy property tests were uncovered, presumably due to `quicktest` becoming smarter with its choice of inputs in the newer version, and the fixes are included in this diff.
Reviewed By: yancouto
Differential Revision: D31115820
fbshipit-source-id: 60a61dfac3236fd93cd4f03b86506654d81d330f
Summary:
this relies on local changes to make it so cargo metadata ACTUALLY finds this
binary: https://github.com/tokio-rs/console/pull/146 is where I try to upstream
it
Reviewed By: jsgf
Differential Revision: D30944630
fbshipit-source-id: 5d34a32a042f83eff7e7ae7445e23badf10fffe3
Summary:
0.4.24 is incompatible with crates that use `deny(warnings)` on a compiler 1.55.0 or newer.
Example error:
```
error: unused borrow that must be used
--> common/rust/shed/futures_ext/src/stream/return_remainder.rs:22:1
|
22 | #[pin_project]
| ^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
```
The release notes for 0.4.28 call out this issue. https://github.com/taiki-e/pin-project/releases/tag/v0.4.28
Reviewed By: krallin
Differential Revision: D30858380
fbshipit-source-id: 98e98bcb5a6b795b93ed1efd706a1711f15c57db
Summary:
Same fix as D30874167 (9edb2cafe7), but for hg-server. This was broken in a recent
update.
Reviewed By: yancouto
Differential Revision: D30882520
fbshipit-source-id: 7e23556f619e3ead585e9e756456f30578ff7cab
Summary:
Bump all the versions on crates.io to highest to make migration to github
versions in next diff work.
Reviewed By: dtolnay
Differential Revision: D30829928
fbshipit-source-id: 09567c26f275b3b1806bf8fd05417e91f04ba2ef
Summary: Keep two versions of fbthrift_ext that one with tokio-0.2 and the other with tokio-1.x. This diff is just renaming.
Reviewed By: dtolnay
Differential Revision: D30558441
fbshipit-source-id: bfe7e96b95529f2745f635190df5118a0cb44014
Summary:
fburl.com/botsdiffs is a random diff
fburl.com/botdiffs is the wiki
Differential Revision: D30547647
fbshipit-source-id: 337d6457cb6403f11fbbc9654f3d34f50d69b0e5
Summary:
Part of Rust-analyzer update.
Updated the affected sources (migrage from Url#into_string to Into#into
Reviewed By: jsgf
Differential Revision: D30344564
fbshipit-source-id: fc3ccbe25d7b3d9369a01dfb6b7f8e6a200a7083
Summary: Switch from chashmap to dashmap as dashmap upstream is more responsive.
Reviewed By: krallin
Differential Revision: D30046524
fbshipit-source-id: b4377000d33421c9d23c499fd5d6c9ef4b302ee5
Summary:
The use of dyn traits of the Thrift-generated server traits was emitting future compatibility warnings with recent versions of rustc, due to a fixed soundness hole in the trait object system:
```
error: the trait `x_account_aggregator_if::server::XAccountAggregator` cannot be made into an object
|
= this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
```
This diff pulls in https://github.com/dtolnay/async-trait/releases/tag/0.1.51 which results in the Thrift-generated server traits no longer hitting the problematic pattern.
Reviewed By: zertosh
Differential Revision: D29979939
fbshipit-source-id: 3e6e976181bfcf35ed453ae681baeb76a634ddda
Summary: Ensure checking is covered with the pyre config. unblocks deprecation of pyre targets based checking.
Reviewed By: pradeep90
Differential Revision: D29878832
fbshipit-source-id: 1bbeca3b61ae5b0362b768bbbe53057a1d72ee7f
Summary: There is a regression in 1.7.0 (which we're on at the moment) so we might as well update.
Reviewed By: zertosh, farnz
Differential Revision: D29358047
fbshipit-source-id: 226393d79c165455d27f7a09b14b40c6a30d96d3