Commit Graph

29 Commits

Author SHA1 Message Date
Jeremy Fitzhardinge
95d1c813dd third-party/rust: bump tracing-subscriber and tracing-glog
Summary:
tracing-glog -> 0.2.1 with minor formatting bugfix
tracing-subscriber -> 0.3.16 mostly to keep it fresh and share dependencies

Reviewed By: davidbarsky

Differential Revision: D40350661

fbshipit-source-id: e62ec53747a194da0a9b0ca2b63bb16df2479a6f
2022-10-14 13:32:47 -07:00
Jun Wu
12d01d2519 lib: relicense 11 libraries from GPL2 to MIT (LICENSE)
Summary:
Add LICENSE to project roots of the libraries (atomicfile, dag
(excluding bindag, benches, fuzz), dag/dag-types, dev-logger, drawdag,
indexedlog, mincode, minibench, minibytes, nonblocking, vlqencoding).

dag/{bindag,benches,fuzz,gitdag} are marked GPL2 to distinguish from dag.

Differential Revision: D38079819

fbshipit-source-id: a65ee11ba416585b6eabc981f71ec0f433a71b3a
2022-07-22 13:01:44 -07:00
Jun Wu
7d59cf8d69 lib: relicense 11 libraries from GPL2 to MIT (Cargo.toml)
Summary:
Update Cargo.toml metadata for libraries being relicensed (atomicfile, dag
(excluding bindag, benches, fuzz), dag/dag-types, dev-logger, drawdag,
indexedlog, mincode, minibench, minibytes, nonblocking, vlqencoding).

dag/{bindag,benches,fuzz} are marked GPL2 to distinguish from dag.

Differential Revision: D38053008

fbshipit-source-id: 22c641c75030fede0384eecb726ff7e029c6b5ff
2022-07-22 13:01:44 -07:00
Jun Wu
c093f592e2 lib: relicense 11 libraries from GPL2 to MIT (headers)
Summary:
Update license headers for libraries being relicensed (atomicfile, dag
(excluding bindag, benches, fuzz), dag/dag-types, dev-logger, drawdag,
indexedlog, mincode, minibench, minibytes, nonblocking, vlqencoding).

Differential Revision: D38053010

fbshipit-source-id: f352e3cbc69c7e34d26e242485cdd2631b6f98e0
2022-07-22 13:01:44 -07:00
David Barsky
2fc16921f0 third-party: update tracing-core, tracing-subscriber, and tracing-appender
Summary:
This diff updates tracing. New features include:

## `tracing`
- New `Value` implementations for `String` and 128-bit integers. The `Value` implementation for `String` allows recording a `String` without needing to call `.as_str()` or similar. The `Value` implementation allows recording 128-bit integers, resolving this papercut: https://fb.workplace.com/groups/learningrust/permalink/3208916922712504/.
- There are additional methods on different trait objects of` Subscriber`s.

## `tracing-subscriber`

- Fixes multiple filtering bugs in the `Layer` implementations for `Option<impl Layer>` and `Vec<impl Layer>` (this is how folks are able to do arbitrary/dynamic numbers of loggers in `tracing`).
- Increases the minimum version of `tracing-core`.
- Adds a new `Layer::event_enabled` method, which allows Layers to filter events _after_ their field values are recorded. This is import for
- Some bug fixes in the `Filter` implementation for `EnvFilter`.

## `tracing-appender`

- Fixes bug in `RollingFileAppender` that could result in a failure to rotate the log file, or in panics in debug mode.

Notice to self: it seems like the filtering implementation in `tracing-subscriber` is kinda complex: it could make sense to fuzz it.

 ---

## Linked Change Logs
- `tracing-core`: https://github.com/tokio-rs/tracing/blob/v0.1.x/tracing-core/CHANGELOG.md#0128-june-23-2022
- `tracing-subscriber`: https://github.com/tokio-rs/tracing/blob/v0.1.x/tracing-subscriber/CHANGELOG.md#0314-jul-1-2022
- `tracing-appender`: https://github.com/tokio-rs/tracing/blob/v0.1.x/tracing-appender/CHANGELOG.md#022-march-17-2022

(Note: this ignores all push blocking failures!)

Reviewed By: jsgf

Differential Revision: D37932030

fbshipit-source-id: bee53e5ba219ffbcc9009781d347cd6b40f577ee
2022-07-21 11:36: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
CodemodService Bot
c8bc527030 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: Croohand

Differential Revision: D36239957

fbshipit-source-id: 3f4cb4b55927f437e95dfd2d2563fdbafbeb2988
2022-05-09 04:05:21 -07:00
Jason White
97d0409882 third-party/rust: Update tracing-subscriber from 0.3.10 to 0.3.11
Reviewed By: dtolnay

Differential Revision: D35956332

fbshipit-source-id: f92818417ec7ce6d655c171c180aac4696f84269
2022-04-27 19:09:17 -07:00
Andreas Backx
180ac8ecc6 upgrade tracing-subscriber from 0.3.9 to 0.3.10
Summary: 0.3.10 adds a new EnvFilter builder that I would like to use. :)

Reviewed By: wqfish

Differential Revision: D35473723

fbshipit-source-id: df31dad09c8f8fc9c27a43c85b5d6ac8f97d69a3
2022-04-08 04:00:03 -07:00
David Barsky
85b8783db2 third-party: update tracing and related crates
Summary:
This diff does the following:
- Updates the tracing crates to the latest versions available. Changes include:
    - Experimental support for [Valuable](https://tokio.rs/blog/2021-05-valuable), which makes recording values much more like how serde does. Valuable also makes it easier to write a tracing-slog crate due to some implementation details of slog where buffering of values is necessary.
    - Combinators for combining filters in tracing-subscriber.
    - A `MakeWriter` implementation for `RollingFileAppender` in `tracing_appender`, which allows the `RollingFileAppender` without a background thread to being spun up.
    - Reduced the disabled span drop overhead by 50-70%—this might be most apparent in tests that don't set a subscriber.
- Move the tokio-console off git dependencies and to published versions on crates.io.

This diff also updates the following, non-exhaustive list of crates:
- parking_lot
- prost
- thread_local
- tonic
- hyper
- httparse
- h2

allow-large-files

Reviewed By: jsgf, fanzeyi

Differential Revision: D34801437

fbshipit-source-id: 2409de9194c8e00647ac5e4c514325fd2e23d247
2022-03-16 15:36:55 -07:00
Alex Hornby
f628e4793f remove generated thrift code and fix external CI (#26)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/26

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/104

No need for the checked in generated code anymore

Successful external CI Linux run on Git Hub PR: https://github.com/facebookexperimental/eden/runs/5130405984?check_suite_focus=true

Mac PR run fails with a SSL cert issue, will look separately

Reviewed By: chadaustin, mitrandir77

Differential Revision: D33840545

fbshipit-source-id: eafc2a0e2191d438fd828adeebc2e318d319025f
2022-02-09 12:21:32 -08:00
Facebook Community Bot
20a78c4882 Re-sync with internal repository 2022-02-09 18:47:06 +00:00
Facebook Community Bot
9728bf52e9 Re-sync with internal repository 2022-02-07 12:59:09 +00:00
Facebook Community Bot
88edb37132 Re-sync with internal repository 2022-02-03 21:43:02 +00:00
Jun Wu
94eb4d41fa dev-loogger: make it easier to use
Summary:
dev-logger is used for tracing logs in tests. Make it easier to use
by reading the LOG env var, instead of RUST_LOG, and use a shorter
format without color for fast outputting, easier redirect and editing.

Reviewed By: DurhamG

Differential Revision: D33339411

fbshipit-source-id: a4a9e0336b17856c07076cf19f56bd99064d94e4
2022-01-19 17:39:10 -08:00
Jun Wu
2a99866d7b codemod: update license headers
Summary:
The "Portions" license cannot be updated automatically. So this is a manual
update using:

  sd -s 'Portions Copyright (c) Facebook, Inc. and its affiliates.' 'Portions Copyright (c) Meta Platforms, Inc. and affiliates.' `rg -l Facebook`
  sd -s 'Copyright (c) Facebook, Inc. and its affiliates.' 'Copyright (c) Meta Platforms, Inc. and affiliates.' `rg -l Facebook`

Differential Revision: D33420114

fbshipit-source-id: 49ae00a7b62e3b8cc6c5dd839b3c104a75e72a56
2022-01-05 14:43:32 -08:00
Jason White
aabc333e0f third-party/rust: Re-run autocargo after tracing update
Reviewed By: jsgf

Differential Revision: D32823732

fbshipit-source-id: 2fdbb36d7d973bc1765a2259be3823957c9a0e62
2021-12-03 13:06:53 -08:00
Robert Grosse
1e9b73cde4 Update tracing-subscriber crate to 0.3.1
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
2021-11-09 09:34:19 -08:00
David Tolnay
2ea696cb5a Regenerate Cargo.tomls to 2021 edition
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
2021-10-21 12:40:28 -07:00
Jun Wu
ae33ddb533 rustfmt: format codebase
Summary:
See previous diff for context. The reorders the `use` statements to make
things a bit more consistent.

Reviewed By: yancouto

Differential Revision: D31751166

fbshipit-source-id: 09c4ddba69ddeae1fc1b996d93fbfa6063e3407d
2021-10-19 11:07:24 -07:00
Jeremy Fitzhardinge
113060beb1 third-party/rust: bump all the tracing packages
Summary:
This includes recent changes:
- `skip_all` in #[instrument] https://github.com/tokio-rs/tracing/pull/1548
- NoSubscriber no-op Subscriber https://github.com/tokio-rs/tracing/pull/1549
- Box/Arc Layer (https://github.com/tokio-rs/tracing/pull/1536 +
  https://github.com/tokio-rs/tracing/pull/1547)
- log filtering fixes https://github.com/tokio-rs/tracing/pull/1543

Local: force `log` and `log-always` features off. This removes the
`enable-trace-logging` flag from smartplatform/reconciler.

Reviewed By: guswynn

Differential Revision: D30906032

fbshipit-source-id: fdc3e4e29a39e9e181d9f4ff017e6b3e16acdcd8
2021-09-15 16:52:25 -07:00
Jeremy Fitzhardinge
fd03bff2e2 third-party/rust: bump tracing versions in preparation for patching
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
2021-09-09 22:38:25 -07:00
Andres Suarez
6ccdc46775 third-party: update tracing-subscriber from 0.2.15 to 0.2.17
Reviewed By: dtolnay

Differential Revision: D27721151

fbshipit-source-id: 08a367662d506a48e0d639115c06cd4e714717b9
2021-04-12 19:24:10 -07:00
Jun Wu
2b5f78d0ac dag: add a test about sparse dag
Summary:
A sparse dag does not have full IdMap. Its IdMap only contains "universally known" entries.

Add a basic test about cloning from a sparse clone data and resolve vertex <-> id mapping
on the fly.

Reviewed By: sfilipco

Differential Revision: D27352018

fbshipit-source-id: 4a3f5f50be52e91bf7b2021cdc858bcab9c99e80
2021-04-05 12:55:39 -07:00
Lukas Piatkowski
ad106958f2 eden/scm/lib: autogenerate all Cargo.toml files with autocargo
Summary: This diff removes the split between manually managed and autocargo managed Cargo.toml files in `eden/scm/lib`, now all files are autogenerated.

Reviewed By: quark-zju

Differential Revision: D26830884

fbshipit-source-id: 3a5d8409a61347c7650cc7d8192fa426c03733dc
2021-03-05 04:29:49 -08:00
Jun Wu
92e1c70f2b dev-logger: traced(func) -> [log] for testing purpose
Summary:
Add a way to capture tracing output in tests to verify certain logs are
emitted.

Reviewed By: sfilipco

Differential Revision: D26142174

fbshipit-source-id: 9267ffbe413973b8c54c54db75fe037c05614b1a
2021-02-02 16:39:46 -08:00
Jun Wu
324f47b1f0 dev-logger: switch to tracing_subscriber
Summary:
`tracing_subscriber` has a fmt subscriber that satisfies the "log to stderr in
tests" need. It does not depend on `env_logger` or `TracingData` forwarding to
`env_logger`.

Reviewed By: sfilipco

Differential Revision: D26142175

fbshipit-source-id: 6e7dcd1585cb8431855322493d93bc49a8d57b76
2021-02-02 16:31:47 -08:00
Stefan Filip
a76dffcb83 tracing: update base collector to Registry + Subscriber list
Summary:
This setup is more extendable than the TracingData focused approach. We can
more easily add new functionality using the Subscriber list.

The approach taken here to introduce the new collector tries to maintain
existing functionality. We can then move various logic to their own
Subscribers.

Reviewed By: quark-zju

Differential Revision: D25988580

fbshipit-source-id: 045cd355dbd499109e554a29a1439c2d490b7c40
2021-01-21 11:35:08 -08:00
Jun Wu
7a12c33163 dev-logger: a simple library to enable env_logger for testing
Summary:
The tracing / env_logger integration works for hg as a binary. However I'd also
like to use it in library tests. This crate makes it easier to do so.

Reviewed By: xavierd

Differential Revision: D20286507

fbshipit-source-id: f5bf3288ce950591ddfe64b524ad51ce21ee4099
2020-03-10 14:16:38 -07:00