2021-09-02 12:31:35 +03:00
|
|
|
# @generated by autocargo
|
|
|
|
|
2020-03-31 13:56:11 +03:00
|
|
|
[package]
|
|
|
|
name = "deleted_files_manifest"
|
|
|
|
version = "0.1.0"
|
2021-02-19 22:02:06 +03:00
|
|
|
authors = ["Facebook"]
|
|
|
|
edition = "2018"
|
2020-03-31 13:56:11 +03:00
|
|
|
license = "GPLv2+"
|
|
|
|
|
|
|
|
[lib]
|
|
|
|
path = "lib.rs"
|
|
|
|
|
|
|
|
[dependencies]
|
2021-02-19 22:02:06 +03:00
|
|
|
anyhow = "1.0"
|
|
|
|
async-stream = "0.3"
|
2021-07-30 00:36:39 +03:00
|
|
|
async-trait = "0.1.51"
|
2021-02-26 02:09:13 +03:00
|
|
|
blobrepo = { version = "0.1.0", path = "../../blobrepo" }
|
|
|
|
blobstore = { version = "0.1.0", path = "../../blobstore" }
|
2021-09-07 17:43:03 +03:00
|
|
|
borrowed = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
2021-02-26 02:09:13 +03:00
|
|
|
bounded_traversal = { version = "0.1.0", path = "../../common/bounded_traversal" }
|
thrift/lib/rust: update to Bytes 1.x
Summary:
Like it says in the title. The API between Bytes 1.x has changed a little bit,
but the concepts are basically the same, so we just need to change the
callsites that were calling `bytes()` and have them ask for `chunk()` instead.
This diff attempts to be as small as it can (and it's already quite big). I
didn't attempt to update *everything*: I only updated whatever was needed to
keep `common/rust/tools/scripts/check_all.sh` passing.
However, there are a few changes that fall out of this. I'll outline them here:
## `BufExt`
One little caveat is the `copy_to_bytes` we had on `BufExt`. This was
introduced into Bytes 1.x (under that name), but we can't use it here directly.
The reason we can't is because the instance we have is a `Cursor<Bytes>`, which
receives an implementation of `copy_from_bytes` via:
```
impl<T: AsRef<[u8]>> Buf for std::io::Cursor<T>
```
This means that implementation isn't capable of using the optimized
`Bytes::copy_from_bytes` which doesn't do a copy at all. So, instead, we need
to use a dedicated method on `Cursor<Bytes>`: `copy_or_reuse_bytes`.
## Calls to `Buf::to_bytes()`
This method is gone in Bytes 1.x, and replaced by the idiom
`x.copy_to_bytes(x.remaining())`, so I updated callsites of `to_bytes()`
accordingly.
## `fbthrift_ext`
This set of crates provides transports for Thrift calls that rely on Tokio 0.2
for I/O. Unfortunately, Tokio 0.2 uses Bytes 0.5, so that doesn't work well.
For now, I included a copy here (there was only one required, when reading from
the socket). This can be removed if we update the whole `fbthrift_ext` stack to
Bytes 1.x. fanzeyi had been wanting to update this to Tokio 1.x, but was blocked on `thrift/lib/rust` using Bytes 0.5, and confirmed that the overhead of a copy here is fine (besides, this code can now be updated to Tokio 1.x to remove the copy).
## Crates using both Bytes 0.5 & Bytes 1.x
This was mostly the case in Mononoke. That's no coincidence: this is why I'm
working on this. There, I had to make changes that consist of removing Bytes
0.5 to Bytes 1.x copies.
## Misuse of `Buf::bytes()`
Some places use `bytes()` when they probably mean to use `copy_to_bytes()`. For
now, I updated those to use `chunk()`, which keeps the behavior the same but
keeps the code buggy. I filed T91156115 to track fixing those (in all
likelihood I will file tasks for the relevant teams).
Reviewed By: dtolnay
Differential Revision: D28537964
fbshipit-source-id: ca42a614036bc3cb08b21a572166c4add72520ad
2021-05-20 19:41:36 +03:00
|
|
|
bytes = { version = "1.0", features = ["serde"] }
|
2021-02-26 02:09:13 +03:00
|
|
|
cloned = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
|
|
|
context = { version = "0.1.0", path = "../../server/context" }
|
|
|
|
derived_data = { version = "0.1.0", path = ".." }
|
2021-03-04 17:40:30 +03:00
|
|
|
futures = { version = "0.3.13", features = ["async-await", "compat"] }
|
2021-02-26 02:09:13 +03:00
|
|
|
manifest = { version = "0.1.0", path = "../../manifest" }
|
2021-02-19 22:02:06 +03:00
|
|
|
maplit = "1.0"
|
2021-02-26 02:09:13 +03:00
|
|
|
mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
|
|
|
|
repo_blobstore = { version = "0.1.0", path = "../../blobrepo/repo_blobstore" }
|
2021-03-11 15:25:00 +03:00
|
|
|
sorted_vector_map = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
2021-08-31 01:53:19 +03:00
|
|
|
tokio = { version = "1.10", features = ["full", "test-util"] }
|
2021-02-26 02:09:13 +03:00
|
|
|
unodes = { version = "0.1.0", path = "../unodes" }
|
2020-03-31 13:56:11 +03:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2021-02-26 02:09:13 +03:00
|
|
|
derived_data_test_utils = { version = "0.1.0", path = "../test_utils" }
|
|
|
|
fbinit = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
mononoke: update to tokio 1.x
Summary:
NOTE: there is one final pre-requisite here, which is that we should default all Mononoke binaries to `--use-mysql-client` because the other SQL client implementations will break once this lands. That said, this is probably the right time to start reviewing.
There's a lot going on here, but Tokio updates being what they are, it has to happen as just one diff (though I did try to minimize churn by modernizing a bunch of stuff in earlier diffs).
Here's a detailed list of what is going on:
- I had to add a number `cargo_toml_dir` for binaries in `eden/mononoke/TARGETS`, because we have to use 2 versions of Bytes concurrently at this time, and the two cannot co-exist in the same Cargo workspace.
- Lots of little Tokio changes:
- Stream abstractions moving to `tokio-stream`
- `tokio::time::delay_for` became `tokio::time::sleep`
- `tokio::sync::watch::Sender::send` became `tokio::sync::watch::Sender::broadcast`
- `tokio::sync::Semaphore::acquire` returns a `Result` now.
- `tokio::runtime::Runtime::block_on` no longer takes a `&mut self` (just a `&self`).
- `Notify` grew a few more methods with different semantics. We only use this in tests, I used what seemed logical given the use case.
- Runtime builders have changed quite a bit:
- My `no_coop` patch is gone in Tokio 1.x, but it has a new `tokio::task::unconstrained` wrapper (also from me), which I included on `MononokeApi::new`.
- Tokio now detects your logical CPUs, not physical CPUs, so we no longer need to use `num_cpus::get()` to figure it out.
- Tokio 1.x now uses Bytes 1.x:
- At the edges (i.e. streams returned to Hyper or emitted by RepoClient), we need to return Bytes 1.x. However, internally we still use Bytes 0.5 in some places (notably: Filestore).
- In LFS, this means we make a copy. We used to do that a while ago anyway (in the other direction) and it was never a meaningful CPU cost, so I think this is fine.
- In Mononoke Server it doesn't really matter because that still generates ... Bytes 0.1 anyway so there was a copy before from 0.1 to 0.5 and it's from 0.1 to 1.x.
- In the very few places where we read stuff using Tokio from the outside world (historical import tools for LFS), we copy.
- tokio-tls changed a lot, they removed all the convenience methods around connecting. This resulted in updates to:
- How we listen in Mononoke Server & LFS
- How we connect in hgcli.
- Note: all this stuff has test coverage.
- The child process API changed a little bit. We used to have a ChildWrapper around the hg sync job to make a Tokio 0.2.x child look more like a Tokio 1.x Child, so now we can just remove this.
- Hyper changed their Websocket upgrade mechanism (you now need the whole `Request` to upgrade, whereas before that you needed just the `Body`, so I changed up our code a little bit in Mononoke's HTTP acceptor to defer splitting up the `Request` into parts until after we know whether we plan to upgrade it.
- I removed the MySQL tests that didn't use mysql client, because we're leaving that behind and don't intend to support it on Tokio 1.x.
Reviewed By: mitrandir77
Differential Revision: D26669620
fbshipit-source-id: acb6aff92e7f70a7a43f32cf758f252f330e60c9
2021-04-28 17:35:21 +03:00
|
|
|
fbinit-tokio = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
2021-02-26 02:09:13 +03:00
|
|
|
fixtures = { version = "0.1.0", path = "../../tests/fixtures" }
|
2021-03-25 17:32:21 +03:00
|
|
|
test_repo_factory = { version = "0.1.0", path = "../../repo_factory/test_repo_factory" }
|
2021-02-26 02:09:13 +03:00
|
|
|
tests_utils = { version = "0.1.0", path = "../../tests/utils" }
|
2021-04-22 20:58:37 +03:00
|
|
|
|
|
|
|
[patch.crates-io]
|
2021-09-02 16:17:16 +03:00
|
|
|
daemonize = { git = "https://github.com/krallin/daemonize", rev = "f7be28efa1b4a70e43bb37b5f4ff4d664992edca" }
|
2021-04-22 20:58:37 +03:00
|
|
|
lru-disk-cache = { git = "https://github.com/mozilla/sccache", rev = "033ebaae69beeb0ac04e8c35d6ff1103487bd9a3" }
|
2021-08-31 07:10:38 +03:00
|
|
|
mockall = { git = "https://github.com/fbsource/mockall", rev = "4bc4ff4ab7d04ebaa7e7c9510a3337b7dda9d324" }
|
|
|
|
mockall_derive = { git = "https://github.com/fbsource/mockall", rev = "4bc4ff4ab7d04ebaa7e7c9510a3337b7dda9d324" }
|
2021-05-05 20:31:41 +03:00
|
|
|
mysql_common = { git = "https://github.com/iammxt/rust_mysql_common", rev = "0e4c86952f1e799960e736c0b2bb9d2a6d935bf1" }
|
2021-08-25 13:05:36 +03:00
|
|
|
object = { git = "https://github.com/gimli-rs/object", rev = "9271d2cd06d1fed11259225d915178fe3824a56d" }
|
2021-04-22 20:58:37 +03:00
|
|
|
prost = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
|
|
prost-derive = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
|
|
prost-types = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
|
|
rustfilt = { git = "https://github.com/jsgf/rustfilt.git", rev = "8141fa7f1caee562ee8daffb2ddeca3d1f0d36e5" }
|
2021-08-25 13:05:36 +03:00
|
|
|
shellexpand = { git = "https://github.com/fanzeyi/shellexpand.git", rev = "179447a3f8fccd765acfd2eed15a54c716c49cfe" }
|
2021-04-22 20:58:37 +03:00
|
|
|
tokio-core = { git = "https://github.com/bolinfest/tokio-core", rev = "5f37aa3c627d56ee49154bc851d6930f5ab4398f" }
|
|
|
|
toml = { git = "https://github.com/jsgf/toml-rs", branch = "dotted-table-0.5.7" }
|
2021-09-10 08:36:56 +03:00
|
|
|
tracing = { git = "https://github.com/tokio-rs/tracing.git", rev = "ac4a8dd27c0b28c36b9cf77cdc52b595168d1c5f" }
|
|
|
|
tracing-appender = { git = "https://github.com/tokio-rs/tracing.git", rev = "ac4a8dd27c0b28c36b9cf77cdc52b595168d1c5f" }
|
|
|
|
tracing-attributes = { git = "https://github.com/tokio-rs/tracing.git", rev = "ac4a8dd27c0b28c36b9cf77cdc52b595168d1c5f" }
|
|
|
|
tracing-core = { git = "https://github.com/tokio-rs/tracing.git", rev = "ac4a8dd27c0b28c36b9cf77cdc52b595168d1c5f" }
|
|
|
|
tracing-futures = { git = "https://github.com/tokio-rs/tracing.git", rev = "ac4a8dd27c0b28c36b9cf77cdc52b595168d1c5f" }
|
|
|
|
tracing-log = { git = "https://github.com/tokio-rs/tracing.git", rev = "ac4a8dd27c0b28c36b9cf77cdc52b595168d1c5f" }
|
|
|
|
tracing-serde = { git = "https://github.com/tokio-rs/tracing.git", rev = "ac4a8dd27c0b28c36b9cf77cdc52b595168d1c5f" }
|
|
|
|
tracing-subscriber = { git = "https://github.com/tokio-rs/tracing.git", rev = "ac4a8dd27c0b28c36b9cf77cdc52b595168d1c5f" }
|