Commit Graph

7 Commits

Author SHA1 Message Date
Lukas Piatkowski
cd0b6d50e2 autocargo v1: changes to match autocargo v2 generation results.
Summary:
The changes (and fixes) needed were:
- Ignore rules that are not rust_library or thrift_library (previously only ignore rust_bindgen_library, so that binary and test dependencies were incorrectly added to Cargo.toml)
- Thrift package name to match escaping logic of `tools/build_defs/fbcode_macros/build_defs/lib/thrift/rust.bzl`
- Rearrange some attributes, like features, authors, edition etc.
- Authors to use " instead of '
- Features to be sorted
- Sort all dependencies as one instead of grouping third party and fbcode dependencies together
- Manually format certain entries from third-party/rust/Cargo.toml, since V2 formats third party dependency entries and V1 just takes them as is.

Reviewed By: zertosh

Differential Revision: D26544150

fbshipit-source-id: 19d98985bd6c3ac901ad40cff38ee1ced547e8eb
2021-02-19 11:03:55 -08:00
Lukas Piatkowski
87ddbe2f74 autocargo v1: update autocargo field format to allow transition to autocargo v2
Summary:
Autocargo V2 will use a more structured format for autocargo field
with the help of `cargo_toml` crate it will be easy to deserialize and handle
it.

Also the "include" field is apparently obsolete as it is used for cargo-publish (see https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields). From what I know this might be often wrong, especially if someone tries to publish a package from fbcode, then the private facebook folders might be shipped. Lets just not set it and in the new system one will be able to set it explicitly via autocargo parameter on a rule.

Reviewed By: ahornby

Differential Revision: D26339606

fbshipit-source-id: 510a01a4dd80b3efe58a14553b752009d516d651
2021-02-12 23:28:25 -08:00
Stefan Filip
f8461b8989 metrics: use dot . as metric separator
Summary:
Dot `.` is the common separator for the metrics aggregator that we use.
This adds some form of consistency.

Reviewed By: DurhamG

Differential Revision: D25968398

fbshipit-source-id: 194d2f33fe477fe5d768a9cd8f9f46f56445e3e8
2021-01-21 11:29:42 -08:00
Arun Kulshreshtha
f1aeffd67a hg-http: remove stats logging
Summary: Now that stats are logged to `tracing` by the `HttpClient` directly, we no longer need to log them here. This commit backs out D23858077 (613fbc858f) which added the logging.

Reviewed By: quark-zju

Differential Revision: D23919308

fbshipit-source-id: 23d3a12c5307bc4b84dd9ffd25bd376718e3cc91
2020-09-24 21:05:20 -07:00
Arun Kulshreshtha
613fbc858f hg-http: optionally print stats
Summary: Log HTTP stats to stderr to assist with ad-hoc debugging. Will not be printed unless `RUST_LOG` is set appropriately.

Reviewed By: quark-zju

Differential Revision: D23858077

fbshipit-source-id: 39acf3de3fd0ca4403a986eb5373a6a79f1d004a
2020-09-23 17:19:28 -07:00
Arun Kulshreshtha
31ceb7f0d1 hg-http: use autocargo
Summary: Onboard the crate onto autocargo.

Reviewed By: quark-zju

Differential Revision: D23858075

fbshipit-source-id: 7179ae0f9ca8a1d4e664d7eb5cb614940e2b2c30
2020-09-23 16:40:49 -07:00
Stefan Filip
c1ab6a4e92 http-client: add stats reporting hook
Summary:
Add `with_stats_reporting` to HttpClient. It takes a closure that will be
called with all `Stats` objects generated. We then use this function in
the hg-http crate to integrate with the metrics backend used in Mercurial.

Reviewed By: kulshrax

Differential Revision: D23577869

fbshipit-source-id: 5ac23f00183f3c3d956627a869393cd4b27610d4
2020-09-09 17:35:48 -07:00