Commit Graph

16 Commits

Author SHA1 Message Date
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
Rajiv Sharma
390a9de45d Clippy fixes 1/N
Summary: As in title. I will try to fix up more such Clippy issues as-and-when I get some spare cycles.

Reviewed By: yancouto

Differential Revision: D43304007

fbshipit-source-id: 602cefd08df7608c4390e51211e88a873c645b00
2023-02-15 05:37:19 -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
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
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
Mark Juggurnauth-Thomas
2aa8069039 repo_authorization: implement path ACL checks
Summary:
Implement path ACL checks for basic read accesses to the repo.  Attempts to access
a tree or file will fail if the user doesn't have access to that path.  Attempts
to access arbitrary trees or files by their IDs will also fail if the user does not
have full repo read access, as the paths for these accesses cannot be checked.

In this initial version, we do not prevent queries that would allow users to
find out the names of paths that they do not have access to: for example
listing all files in a directory would still work.

Reviewed By: RajivTS

Differential Revision: D38129042

fbshipit-source-id: 1b2b6e5881712628c6d979d329447afac2050626
2022-08-03 08:27:47 -07:00
Harvey Hunt
bcb3fa71c7 mononoke: Remove BlobRepo from the mononoke_hg_sync_job
Summary:
The hg_sync job relies on `BlobRepo`, however enough pieces have been
refactored for that to change. This diff replaces `BlobRepo` with a custom
`Repo` struct for the hg_sync job that only has the required facets in it.

Reviewed By: yancouto

Differential Revision: D37789411

fbshipit-source-id: abe3ec5e8357a8e775a016542e80bba504493999
2022-07-14 04:30:52 -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
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