Commit Graph

213 Commits

Author SHA1 Message Date
Mat Hostetter
68f72f1a4d Remove unused raw-api feature from dashmap crate
Reviewed By: zertosh

Differential Revision: D46058815

fbshipit-source-id: a586471098b243102b8eb11d41e630d11259f88a
2023-05-22 10:38:20 -07:00
Youssef Ibrahim
b219f34a26 test_repo_factory: add method for building warm bookmarks cache
Summary: Has the same behaviour as the contruction of warm bookmarks cache in Repo::new_test_common. To keep the same behaviour this required making TestRepoFactory into an async builder and modifying all of its callsites.

Reviewed By: RajivTS

Differential Revision: D45227318

fbshipit-source-id: 51303d48bebc0c4b915a359a7d0942bf485e8db5
2023-04-25 12:45:33 -07:00
David Tolnay
b5d3aab8ce Update ref-cast from 1.0.12 to 1.0.16
Reviewed By: zertosh

Differential Revision: D45278283

fbshipit-source-id: 85f83923f4a18e87b60a8ab68ab731fe74fd2a8c
2023-04-25 12:08:03 -07:00
Thomas Orozco
22e700ccf3 (reland) rust/third-party: update to futures 0.3.28
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
2023-04-04 10:14:43 -07:00
Mark Isaacson
3463e3d61b Revert D44623815: rust/third-party: update to futures 0.3.28
Differential Revision:
D44623815

Original commit changeset: 343ddb9277e1

Original Phabricator Diff: D44623815

fbshipit-source-id: 2d99e8d24fd9b13343dfeb082788b0a6258fbe8c
2023-04-03 09:25:13 -07:00
Thomas Orozco
159cf5c5e6 rust/third-party: update to futures 0.3.28
Summary:
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: D44623815

fbshipit-source-id: 343ddb9277e1703104e516d07fe0610b5020930a
2023-04-03 08:30:49 -07:00
Manu Bretelle
6779125864 enable futures-03 feature
Summary:
Enable this feature so we can trace async-streams.
https://fb.workplace.com/groups/learningrust/posts/3419749284962599?comment_id=3419814948289366

Reviewed By: zertosh, davidbarsky

Differential Revision: D43899678

fbshipit-source-id: e1fb1110ec22684e318b851d8eef42dbcaca8491
2023-03-09 16:54:47 -08:00
Emerson Ford
15d7db2ebc fix autocargo
Summary: title, ran `arc autocargo`

Reviewed By: edward-shen

Differential Revision: D43887113

fbshipit-source-id: 63c2ecf4a94973b3f560b52ea4eab18a68ce7fac
2023-03-07 13:59:20 -08:00
Pierre Chevalier
47bfef71ac Rename BookmarkName to BookmarkKey
Summary:
In a future diff, we want to separate the concepts of `BookmarkName` which represents the name of a bookmark with that of `BookmarkKey`, which refers to a unique bookmark, namespaced by a category: `Branch`, `Tag` or `Note`.

This will allow us to represent different types of refs importing from git repositories that may have conflicting names, but are semantically different.

Since `BookmarkName` is widely referred to in mononoke, start with a pure renaming diff for ease of reviewing.

This code change is a pure refactoring and has no effect on the behaviour of Mononoke.

Reviewed By: RajivTS

Differential Revision: D43350002

fbshipit-source-id: e64a84f7b3b70c4254702ebd7ace4d645cd00eff
2023-02-22 08:53:04 -08:00
Youssef Ibrahim
0c5939f6a7 tunables: optionify tunables and remove get_ prefix
Summary: Currently fetching a tunable (except by repo ones) returns the default value when the tunable is not set. This can be error prune as it doesn't enforce handling the not set case and makes it awkward to set default values, it's also not consistent with the by repo tunables which return an option instead. This diff changes tunable fetching to make it return an option, and adds a .unwrap_or_default() at every callsite to maintain the current behaviour.

Reviewed By: yancouto

Differential Revision: D43123305

fbshipit-source-id: 32cb69ba78d52bc22979250c6e16edd1800cd1de
2023-02-09 08:43:11 -08:00
Andres Suarez
00b1f93276 Update tokio-1.21.2 to tokio-1.25.0
Reviewed By: diliop

Differential Revision: D42837228

fbshipit-source-id: 5e891cf1ff8ab1beff6e3c845b913144655778ea
2023-01-30 14:49:36 -08:00
Yan Soares Couto
d33053926a Use ref to CoreContext in Changesets trait
Summary:
I changed both traits `Changesets` and `ChangesetFetcher` to take context by reference instead of by value. This removes a lot of unnecessary cloning we were doing.

It was really annoying because A LOT of places use this. I fixed all of them to get them to compile, but not all of them to do the minimal number of clones, as there's other stuff that still unnecessarily takes context by value.

Reviewed By: mitrandir77

Differential Revision: D42547207

fbshipit-source-id: 2d852abb8bf7825026b3b2ffe647ba0fc9e35b56
2023-01-17 09:30:05 -08:00
Mark Juggurnauth-Thomas
4d7a42f2b9 blobrepo: remove specialized changeset fetcher methods
Summary:
Make `BlobRepo` like an ordinary facet container by removing its specialized methods.

In this diff, we remove the specialized changeset fetcher methods in favour of the facet traits.

Reviewed By: mitrandir77

Differential Revision: D42314302

fbshipit-source-id: d35e9cb94549b4a1447701dcad7007884b0cfb2f
2023-01-04 08:33:58 -08:00
Mark Juggurnauth-Thomas
5ab69a1b7f blobrepo: remove specialized bonsai mapping methods
Summary:
Make `BlobRepo` like an ordinary facet container by removing its specialized methods.

In this diff, we remove the specialized bonsai mapping methods in favour of the facet traits.

Reviewed By: mitrandir77

Differential Revision: D42311252

fbshipit-source-id: ac4cbdedf711b4cc6eaf8f2093579948efb0083e
2023-01-04 02:23:02 -08:00
Mark Juggurnauth-Thomas
d34d81ae46 blobrepo: remove specialized bookmarks methods
Summary:
Make `BlobRepo` like an ordinary facet container by removing its specialized methods.

In this diff, we remove the specialized bookmarks methods in favour of the facet traits.

Reviewed By: mitrandir77

Differential Revision: D42296644

fbshipit-source-id: abd5faa348e21929b01112cadbc3fb4944fce1dc
2023-01-04 02:23:02 -08:00
Mat Hostetter
9e915ad00e Add raw-api feature to dashmap
Summary: raw-api allows access to the underlying DashMap shards, which I need.

Reviewed By: davidbarsky

Differential Revision: D42132672

fbshipit-source-id: 22b753f3ec95c85526f96a9e26d28379b2b4179b
2022-12-20 10:31:47 -08:00
David Barsky
df0dde069b rust-analyzer: update to 2022-12-14
Summary:
Replaces D41855449.

This diff updates:
- rust-analyzer to 2022-12-12's release.
- bumps `dashmap` to 5.4.0 from 5.2.0
- bumps `windows-sys` to 0.42, which unfortunately necessary because `dashmap` bumped their minimum version of `parking_lot` internally.
- bumps `notify` from the pre-release builds to 5.0

 allow-large-files

Reviewed By: zertosh

Differential Revision: D41971461

fbshipit-source-id: 51c1d969d0cdcabcc37f2381e8c942fd0d0af765
2022-12-16 11:20:56 -08:00
Dimitris Iliopoulos
4cb68b230a update to Rust 1.65.0
Summary:
Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes:
* Account for stabilized [`#![feature(backtrace)]`](https://github.com/rust-lang/rust/pull/99573) and [`#![feature(generic_associated_types)]`](https://github.com/rust-lang/rust/pull/99573)
* Account for removal of [`#![feature(result_into_ok_or_err)]`](https://github.com/rust-lang/rust/pull/100604)
* Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](https://github.com/rust-lang/rust/pull/97015)
* Account for [`Error` trait move into core](https://github.com/rust-lang/rust/pull/99917)
* Account for `#[warn(non_camel_case_types)]`
* Various function signature, lifetime requirement changes and lint fixes

Reviewed By: zertosh

Differential Revision: D40923615

fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
2022-11-09 19:37:29 -08:00
Jeremy Fitzhardinge
170dfa66c1 third-party/rust: dashmap 4.x -> 5.x
Summary: Update to current version.

Reviewed By: zertosh

Differential Revision: D41141983

fbshipit-source-id: 3fd18b8f702a49b0ff67254dbddfd71580724a20
2022-11-09 15:00:10 -08:00
Stiopa Koltsov
a4f9d57f54 bump version to 0.1.2
Summary: This is the latest version number [on crates](https://crates.io/crates/fbinit_macros/0.1.2).

Reviewed By: jsgf

Differential Revision: D40536148

fbshipit-source-id: 86fc58f09cdb716e2aed8571a8ddee65f5dfc844
2022-10-20 12:08:11 -07:00
David Tolnay
0be906fba0 Update to async-trait 0.1.58
Summary: This release makes async trait methods work better with rust-analyzer's "go to definition" and other IDE functionality.

Reviewed By: zertosh

Differential Revision: D40532047

fbshipit-source-id: 1871d1819ebe1aab0846b0135f051c45e6e8821b
2022-10-19 17:35:20 -07:00
Mark Juggurnauth-Thomas
1a3eb263f0 removed unused auto_impl uses and document others
Summary:
Remove `auto-impl` where it is not necessary.  Add documentation for cases
where it's known to be necessary for valid reasons.

Reviewed By: quark-zju

Differential Revision: D40357646

fbshipit-source-id: d37c8ae36c1034bbb3e646d278b54c84d183ed58
2022-10-19 13:35:09 -07:00
Andrey Buchinskiy
5b2403f8ff bump tokio version to 1.21.2
Reviewed By: zertosh

Differential Revision: D40199323

fbshipit-source-id: 32355e73ea669a180ac759ddb02760db10c8b02b
2022-10-14 15:24:20 -07:00
David Tolnay
66d5a59ec1 Update ref-cast to 1.0.12
Summary:
Release notes:
- https://github.com/dtolnay/ref-cast/releases/tag/1.0.7 (uninteresting)
- https://github.com/dtolnay/ref-cast/releases/tag/1.0.8 (uninteresting)
- https://github.com/dtolnay/ref-cast/releases/tag/1.0.9 (uninteresting)
- https://github.com/dtolnay/ref-cast/releases/tag/1.0.10 (support for PhantomPinned)
- https://github.com/dtolnay/ref-cast/releases/tag/1.0.11 (support for private inner types, private casts, and const casts)
- https://github.com/dtolnay/ref-cast/releases/tag/1.0.12 (bugfix)

Reviewed By: zertosh

Differential Revision: D40308777

fbshipit-source-id: 77debe6fa4b247749421e07363968f3fde798451
2022-10-12 14:46:30 -07:00
Pierre Chevalier
b9029685c7 Fix clippy lints
Summary:
Some of these lints must have come from the update to rust 1.64.0. Some might have slipped through recent diffs.

These three categories were encountered:
* [unnecessary_lazy_evaluations](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations) (this is an older lint, but the `then_some` case must be recent)
```
warning: unnecessary closure used with `bool::then`
   --> eden/mononoke/tools/facebook/derived_data_metrics_tailer/src/main.rs:314:28
    |
314 |                 anyhow::Ok(is_ancestor.then(|| c))
    |                            ^^^^^^^^^^^^----------
    |                                        |
    |                                        help: use `then_some(..)` instead: `then_some(c)`
    |
    = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
```
* [manual_retain](https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain) (new in 1.64.0)
```
warning: this expression can be written more simply using `.retain()`
   --> eden/mononoke/reachabilityindex/skiplist/src/lib.rs:365:9
    |
365 | /         bfs_layer = bfs_layer
366 | |             .into_iter()
367 | |             .filter(|(hash, _gen)| !skip_list_edges.mapping.contains_key(hash))
368 | |             .collect();
    | |______________________^ help: consider calling `.retain()` instead: `bfs_layer.retain(|hash, &mut _gen| !skip_list_edges.mapping.contains_key(hash))`
    |
    = note: `#[warn(clippy::manual_retain)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain
```
* [needless_borrow](https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow) (this is not new, so probably due to regressions on master)
```
warning: this expression borrows a value the compiler would automatically borrow
   --> eden/mononoke/mercurial/types/src/blobnode.rs:239:45
    |
239 |         let pid1: Option<HgNodeHash> = Some((&p1).nodeid());
    |                                             ^^^^^ help: change this to: `p1`
    |
    = note: `#[warn(clippy::needless_borrow)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
```

Reviewed By: mitrandir77

Differential Revision: D39885511

fbshipit-source-id: 835045999d621f01392baefdc5e790a2292fc498
2022-09-28 08:03:41 -07:00
Andres Suarez
25bec96f4c update to rust 1.64.0
Summary: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html

Reviewed By: diliop, dtolnay

Differential Revision: D39825734

fbshipit-source-id: 4a789f2c24707fbc6a14b506448d405d5a60a53d
2022-09-27 15:18:58 -07:00
Harvey Hunt
ee3aef0d1c mononoke: blobrepo: Add a BookmarksMaybeStaleExt trait and remove get_heads_maybe_stale from BlobRepo
Summary:
`BlobRepo` provides a few helper methods for calling bookmarks code
with specific arguments. In order to remove `BlobRepo`, these helper methods
can be moved into an extension trait - `BookmarksMaybeStaleExt`.

Add the `BookmarksMaybeStaleExt` extension trait and remove
`get_heads_maybe_stale` from `BlobRepo`. In a future diff I will update callers
to use `BookmarksMaybeStaleExt::get_publishing_bookmarks_maybe_stale`, but
first I need to do some renaming.

Differential Revision: D39509512

fbshipit-source-id: 62eebf19c5156013fa899a939bbb7fc3888a497d
2022-09-27 10:02:51 -07:00
Harvey Hunt
39f3d58666 mononoke: blobrepo: Rename get_bonsai_heads_maybe_stale to get_heads_maybe_stale
Summary:
Bonsai changesets are the default in Mononoke and hg specific methods
are inside of `blobrepo_hg`. Rename the `get_bonsai_heads_maybe_stale`
method to `get_heads_maybe_stale`.

Reviewed By: yancouto

Differential Revision: D39509515

fbshipit-source-id: fdf945fac08b015bc7f8a47a4c7b36453349f56d
2022-09-27 10:02:51 -07:00
Harvey Hunt
5964a20eb6 mononoke: blobrepo: Remove get_bonsai_bookmark
Summary:
This method is a smaller wrapper around `bookmarks().get()`. Remove it
to make removing dependencies on `BlobRepo` easier in the future.

Differential Revision: D39509513

fbshipit-source-id: 52e634038db48d347c52f9b0df554737b08736be
2022-09-27 10:02:51 -07:00
David Tolnay
e747fc4585 third-party/rust: Revert D39418421 "unpin thiserror"
Summary: D39418421 (a1593af094) 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
2022-09-15 17:20:40 -07:00
Edwin Smith
a1593af094 unpin thiserror
Reviewed By: bolinfest, zertosh

Differential Revision: D39418421

fbshipit-source-id: 2f0246f190403a6f481e8803834174f229c0849a
2022-09-13 07:15:29 -07:00
Michael Bolin
1c4c2f65aa use git-config@0.7.1 instead of patched version
Reviewed By: mzr

Differential Revision: D39331880

fbshipit-source-id: 5990d68d718297a6df72e5eea3c16fed5b84169e
2022-09-09 21:01:16 -07:00
Jan Mazur
3c235cf6d3 futures 0.3.21 -> 0.3.24
Summary: We have some deprecated functions in GH builds.

Differential Revision: D38909563

fbshipit-source-id: 3e8b77b10c352bfdfcbfe344f0ea2e95d4a339ad
2022-09-05 13:49:07 -07:00
Mark Juggurnauth-Thomas
e5b2131ec4 reorder import groups
Summary: Reorder import groups in "StdExternalCrate" order.

Reviewed By: mzr

Differential Revision: D38426225

fbshipit-source-id: b7bc8ccc0843f72bfa66ce6e04acf8e2e299ce81
2022-08-04 13:24:30 -07:00
Yan Soares Couto
8e21b7bcf3 Clear clippy warnings in reachabilityindex and repo_client
Reviewed By: markbt

Differential Revision: D38422365

fbshipit-source-id: 80f98b03d96023a46573f7d2c52b6fdf019b7286
2022-08-04 05:54:16 -07:00
Jan Mazur
33cb6059db handle 'warning: use of ok_or followed by a function call'
Summary:
I ran `arc clippy-check //eden/mononoke/...` and the handled the type of errors like in the title with clippy's suggestion.

I didn't use a global regex over files. I only made changes in lines and files that clippy complained about.

Reviewed By: yancouto

Differential Revision: D38246419

fbshipit-source-id: a474de9de28363ff3f04904f8a488e35b8eabce1
2022-07-28 12:24:19 -07:00
Yan Soares Couto
d2c7cee8be Clippy it all! (9/N)
Summary: See D37647178 (bb7c43bd3d)

Reviewed By: markbt

Differential Revision: D37649911

fbshipit-source-id: 48f19547ee9ffe3cdee82fa9de4294e62c73061a
2022-07-14 10:44:21 -07:00
Yan Soares Couto
bac1f40476 Clippy it all! (6/N)
Summary: See D37647178 (bb7c43bd3d)

Reviewed By: mitrandir77

Differential Revision: D37647742

fbshipit-source-id: a22aa6f2899e4587928339b46063edb0b83fcd2b
2022-07-14 10:44:21 -07:00
Mateusz Kwapich
241f57f46b short-circut ancestry check if ancestor has larger generation than descendant
Summary:
let's not even bother traversing skiplist in this case - it would short circut
few steps later but I think it makes the entire code easier to read once we get
this assumption sorted.

Reviewed By: farnz

Differential Revision: D37603995

fbshipit-source-id: 8636ed6345463c35b59a149c627cdacc3a5887d8
2022-07-06 06:39:05 -07:00
Mateusz Kwapich
b01977c46d remove spurious deny warnings statements
Summary:
Not sure how we got there but I'm pretty sure that we didn't intent to have
those between imports.

Reviewed By: stepancheg

Differential Revision: D37494565

fbshipit-source-id: 40ada0f5f63b0a5f31d2cccc8bedd5b6fff12311
2022-06-28 15:27:12 -07:00
Mateusz Kwapich
45190441ae fix self imports
Summary:
The reformatter can't deal with self imports, let's help it.

I've ran:

```
fd -g  '**/*.rs' -x sd -s '::{self}' ''
arc f
```

Reviewed By: stepancheg

Differential Revision: D37494566

fbshipit-source-id: badc7aff2ea931085df61ce241ae26e13916c1eb
2022-06-28 15:27:12 -07:00
Mateusz Kwapich
b8384b6c8e reformat rust sources to one import per line
Reviewed By: yancouto, mzr

Differential Revision: D37493536

fbshipit-source-id: f0e07b725236ffa8326f90e6dce7e06869ba23af
2022-06-28 11:44:12 -07:00
Robert Kelly
24cb4d916b ethers.rs
Summary:
This is a pretty in depth third party library being added.  The main changes are...

**version bumping**:
dunce = "1.0.0" => "1.0.2"
once_cell = "1.8" => "1.12"
tracing = "0.1.32" => "0.1.35"

adding ethers-rs fork:
https://github.com/rlkelly/ethers-rs.git

this depends on forks of:
coins-bip32  = https://github.com/rlkelly/bitcoins-rs.git
coins-bip39  = https://github.com/rlkelly/bitcoins-rs.git
eth-keystore = https://github.com/rlkelly/eth-keystore-rs.git

this was necessary to remove the wasm target, which creates a cyclic dependency for "indexmap".  This was ran into previously here:

https://fb.workplace.com/groups/rust.language/permalink/8603206789727860/

also, some fixups were created for a few packages to facilitate build.  I'm not a fan of libraries creating a build step to generate documentation...
----

This still does not have the ethers-middleware crate or the ethers-solc crate because it has the external build dependency of solc, which would make this a bit more complex to add:
https://docs.soliditylang.org/en/latest/installing-solidity.html

adding the crates without solc makes the process of integrating this library much easier, but it would be beneficial in the future.

@public
update rust deps

Reviewed By: jsgf

Differential Revision: D37320246

fbshipit-source-id: 251bd1c3c0e51733347a534fa597dea33d1df74b
2022-06-23 20:03:16 -07:00
David Tolnay
4a03469e09 third-party/rust: Update async-trait from 0.1.52 to 0.1.56
Summary:
Release notes:

- https://github.com/dtolnay/async-trait/releases/tag/0.1.53 (improved error messages)
- https://github.com/dtolnay/async-trait/releases/tag/0.1.54 (`impl Trait` support)
- https://github.com/dtolnay/async-trait/releases/tag/0.1.55 (compatibility with 2021 edition closure capture rules)
- https://github.com/dtolnay/async-trait/releases/tag/0.1.56 (more `impl Trait` work)

Reviewed By: zertosh

Differential Revision: D36881793

fbshipit-source-id: ce9b86693dd18efa6884d29419970b41ebff5447
2022-06-02 17:05:05 -07:00
Yan Soares Couto
1618f59fe7 Remove deny(warnings) from codebase
Reviewed By: farnz

Differential Revision: D36664060

fbshipit-source-id: cee392fb4639a738e8086c9293a2a731481436f3
2022-05-25 09:04:08 -07:00
Ilia Medianikov
212b82e0fa path_acls: implement AclRegions facet
Summary:
When given a (commit, path) pair, `AclRegions` facet returns all Hipster ACLs that permit accessing that (commit, path). See D34272143 for how configuration works.

To answer those queries effectively, we precompute a trie over all path prefixes from rules in the config. Then, for each (commit, path) query:
1. Use the trie to extract all rules that match by path.
2. For all rules we got from #1 naively check that the given commit matches them.

Design doc: https://docs.google.com/document/d/1MQBk-N-kRS7L-7IoFzkN0BdCif1UfyDQd0P1qOnx8TQ/edit?usp=sharing

Reviewed By: markbt

Differential Revision: D34674134

fbshipit-source-id: b7ca5c6a1651cd6ef379e5a4d12068f15492c496
2022-05-19 08:34:32 -07:00
Ilia Medianikov
e387b2619c mononoke: add FacebookInit to TestRepoFactory
Summary: Segmented Changelog requires `CoreContext` for construction, so we can create a test mock if `TestRepoFactory` has a `FacebookInit`.

Reviewed By: markbt, mitrandir77

Differential Revision: D35251021

fbshipit-source-id: 57051e227804669794f19fc2ca130f52cb938b0c
2022-04-13 02:45:23 -07:00
Huapeng Zhou
7a8725f586 rust: update crossterm to 0.23.0 and arc-swap to 1.5.0
Summary:
Needed to import [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor).

(Note: this ignores all push blocking failures!)

Reviewed By: dtolnay

Differential Revision: D34434866

fbshipit-source-id: 69741b4ac767e0ab5ecc8307dd40267d9dcbf4ae
2022-04-12 23:50:06 -07:00
Huapeng Zhou
2d8e387606 rust: update serde_json to 1.0.79 and serde to 1.0.136
Summary:
Needed to import [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor).

(Note: this ignores all push blocking failures!)

Reviewed By: dtolnay

Differential Revision: D34433589

fbshipit-source-id: f92ea3ba640d19f170513b558f3d5208790bab67
2022-04-10 23:39:55 -07:00
Huapeng Zhou
a232791ef1 rust: update anyhow to 1.0.56
Summary:
Needed by cloud-hypervisor https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L19.

(Note: this ignores all push blocking failures!)

Reviewed By: jsgf

Differential Revision: D34432496

fbshipit-source-id: deaa320c74a22e325a116bcc0d5b0120c4f3744b
2022-04-07 04:31:34 -07:00