Commit graph

285 commits

Author SHA1 Message Date
Dimitris Iliopoulos
d2480c7e87 upgrade to 0.21.1
Summary:
NOTE: If your `hg bisect` brings you here & the error you are seeing looks like ` expected Result<&PyAny, PyErr>, found Result<Bound<'_, PyAny>, PyErr>` then see these  [migration notes](https://pyo3.rs/v0.21.0/migration.html#from-020-to-021) for the fix or click on `fbcode/security/ace/pyo3/authz.rs` or similar files from bellow to see what the fix is!

In order to upgrade `pyo3` to [`0.21.1`](https://github.com/PyO3/pyo3/releases/tag/v0.21.1), the following had to take place:

## [PyO3]
* Address [migration notes](https://pyo3.rs/v0.21.0/migration.html#from-020-to-021) for `Bound<'py, T>`
* Address [#3595](https://github.com/PyO3/pyo3/pull/3595) - this is done in a crude way for now since there are many call sites depending on `fbcode/dba/rust/common/service_address/py/pyo3_conversion_helper.rs` which would require a more thorough review.
* Address [#3821](https://github.com/PyO3/pyo3/pull/3821) - `pyo3-build-config` is now dependent on and used by PyO3 macros. Currently, the only thing that gets checked is `abi3` compatibility. To address that, we introduce a fixup for that automatically generate `pyo3-build-config*.txt` configuration files, given an `fbsource` Python version. We are tryin to stay as close to `pyo3-build-config*.txt` spec as possible even though only a single bool from that file is ever since there is validation for the other fields but also to future proof future changes. By also generating this file ourselves, we prevent PyO3 from attempting to locate a Python interpreter some other way which seems to start leaking into the PyO3 API as an implementation choice already.

## [PyPi + Rust]
* Upgrade `orjson` to [`3.10.1`](https://github.com/ijl/orjson/releases/tag/3.10.1)
  * Added `README.md` notes for future upgrades
* Upgrade `py-polars` to [`0.20.22`](https://github.com/pola-rs/polars/releases/tag/py-0.20.22)
  * Removed `py-polars` and `polars` from `target_os = "windows"`. The `third-party/pypi/polars` Python extension has only been supported for Mac and Linux for a while now so its only natural to do that on the Rust side as well. What is more, `polars-util` is bringing in `stacker = = "0.1.14"` which does not build on Windows mostly because its using a much more recent version of `libc` than we use in `third-party/rust` (see P1228807344)
* Upgrade `pydantic-core` to [`2.18.2`](https://github.com/pydantic/pydantic-core/releases/tag/v2.18.2)
  *  Removed old `third-party/pypi/pydantic-core` versions
* Upgrade `safetensors` to [`0.4.3`](https://github.com/huggingface/safetensors/releases/tag/v0.4.3)
* Patch `third-party/pypi/cryptography/41.0.7` to account for PyO3's [#2975](https://github.com/PyO3/pyo3/pull/2975) (`0.19.0`) where `pyo3::once_cell` was renamed to `pyo3::sync` (see D56826865)
* Upgrade `tokenizers` and `tokenizers-python` to [`0.19.1`](https://github.com/huggingface/tokenizers/releases/tag/v0.19.1)
  * Removed old `third-party/pypi/tokenizers` versions
  * Fixed `third-party/pypi/tokenizers/BUCK`
  * Migrated `third-party/pypi/tokenizers/0.19.1/BUCK` to mirror other Python packages that bind to Rust crates e.g. `libcst`, `polars` etc.
  * Removed Windows support from `third-party/pypi/tokenizers`

## [Rust]
* Upgrade `indexmap` to [`2.2.6`](https://github.com/indexmap-rs/indexmap/releases/tag/2.2.6)
  * Both latest `pydantic-core` and `c2pa` depend on `serde_json > 1.0.112` which brings in `indexmap = 2.2.1`. The latter has deprecated `.take` and `.remove` on both `IndexMap` and `IndexSet` leading to a bunch of errors (see bellow), all addressed:

```bash
error: use of deprecated method `indexmap::set::IndexSet::<T, S>::take`: `take` disrupts the set order -- use `swap_take` or `shift_take` for explicit behavior.
  --> fbcode/hphp/hack/src/package/types.rs:76:16
   |
76 |         self.0.take(value)
   |                ^^^^
   |
   = note: `-D deprecated` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(deprecated)]`
```

Reviewed By: capickett

Differential Revision: D56671179

fbshipit-source-id: 3ae69c069b7f005570c1a06d37194cf056282a18
2024-05-03 07:58:42 -07:00
Jason White
407899245d Delete experimental code
Summary: This reduces Reverie's maintenance burden going forward. This code isn't used and is in the commit history if it needs to be referenced.

Reviewed By: VladimirMakaev

Differential Revision: D56889383

fbshipit-source-id: 6fe2ca3a945a69a84624f545102283bda0285233
2024-05-03 04:36:51 -07:00
Henry Swanson
374247cc0a Update tokio: 1.36.0 -> 1.37.0
Summary: Followed the wiki page here: https://www.internalfb.com/intern/wiki/Rust/Third_Party_Libraries/Adding_or_Updating_Libraries/

Reviewed By: capickett

Differential Revision: D56484070

fbshipit-source-id: e1ed52d58f7db8ad32ce67b67df2e83a567db123
2024-04-24 09:47:11 -07:00
Shayne Fletcher
ef50616df9 ffi_returns_twice is removed
Summary: forward compat fix: feature ffi_returns_twice is removed in 1.78.0.

Reviewed By: dtolnay

Differential Revision: D56452209

fbshipit-source-id: f5d9f9dbd63c1213ef71d023f08e97a793f9e525
2024-04-23 14:42:40 -07:00
Kevin Hui
d296065b47 Bump SKID_MARGIN_RCBS from 60 to 70
Summary:
For AMD hosts I'm seeing issues with trying to run `mkfs.ext3` at large sizes using Antlir. We can raise it slightly to deal with this issue.

If it becomes too much of a problem for Intel hosts, we can always break out compilation for the two processor types

Reviewed By: jasonwhite

Differential Revision: D56271985

fbshipit-source-id: 1af3a007363a241cfa1c3e12585d6f837b274d19
2024-04-18 12:09:11 -07:00
Astrid Yu
9a1320bb46 third-party/rust: Bump bytes 1.1 -> 1.6.0
Summary:
As it says on the tin. There have been many new features added since the old version. [Staring at the changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md), I don't believe they added breaking changes.

Changes to other libraries:
- *common/rust/folly/iobuf* - the panic message changed so I changed the should_panic rule to match

Reviewed By: diliop

Differential Revision: D55807882

fbshipit-source-id: 8d70a8bae57509fdca82ab18770275111a1f1902
2024-04-05 23:49:22 -07:00
J.T. Conklin
1711463ce3 rust/third-party: update to futures-0.3.30
Summary:
Changelog since last import:

```
# 0.3.30 - 2023-12-24

* Add `{BiLock,SplitStream,SplitSink,ReadHalf,WriteHalf}::is_pair_of` (#2797)
* Fix panic in `FuturesUnordered::clear` (#2809)
* Fix panic in `AsyncBufReadExt::fill_buf` (#2801, #2812)
* Improve support for targets without atomic CAS (#2811)
* Remove build scripts (#2811)

# 0.3.29 - 2023-10-26

* Add `TryStreamExt::try_ready_chunks` (#2757)
* Add `TryStreamExt::{try_all,try_any}` (#2783)
* Add `UnboundedSender::{len,is_empty}` (#2750)
* Fix `Sync` impl of `FuturesUnordered` (#2788)
* Fix infinite loop caused by invalid UTF-8 bytes (#2785)
* Fix build error with -Z minimal-versions (#2761)
```

I'm updating this as I need `TryStreamExt::try_all()` for a Sandcastle Worker change.

Reviewed By: krallin

Differential Revision: D55318002

fbshipit-source-id: 0f64b13570cd1644000c3639bf16c0746266cb8e
2024-03-27 16:23:45 -07:00
Jeremy Fitzhardinge
b5ec95a82c third-party/rust: make tracing and tracing-subscriber available to no-std universe
Summary: They support no-std with a bunch of features turned off.

Reviewed By: dtolnay

Differential Revision: D55333115

fbshipit-source-id: e66ee699cb3bc3e74f6c7b4d9a81e488e9768e40
2024-03-25 21:40:59 -07:00
Stiopa Koltsov
91b8ebf0b6 Upgrade tokio
Summary:
Need to add some third-party, which is pulling newer tokio.

Land upgrade separately for visibility and for easier bisect and revert.

Reviewed By: Imxset21, JakobDegen

Differential Revision: D55030643

fbshipit-source-id: 47b509ce2103d1dd64c66aa250133eb25758a750
2024-03-18 16:57:05 -07:00
Jade Harley
29ce9faab8 Updated timer to add my processor (#31)
Summary:
A quick fix for https://github.com/facebookexperimental/reverie/issues/30. Have not verified timer functionality, but this prevents a crash.

Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/31

Reviewed By: VladimirMakaev

Differential Revision: D54647876

Pulled By: jasonwhite

fbshipit-source-id: e1b1f110e64f5a78589d0b165cb93578efbe3e66
2024-03-07 12:42:52 -08:00
Shayne Fletcher
8298a777ca bitflags: enable feature 'serde'
Summary:
building the "renderdag" package (fbcode/eden/scm/lib/renderdag/Cargo.toml) fails with
```lang=php,counterexample
error[E0277]: the trait bound `InternalBitFlags: Serialize` is not satisfied
   --> /data/users/shaynefletcher/fbsource/fbcode/eden/scm/lib/renderdag/src/render.rs:213:46
```
this diff resolves the issue by enabling the `serde` feature on the bitflags crate

Reviewed By: capickett

Differential Revision: D54067851

fbshipit-source-id: 2f6ababbae0c4667e4896f03a2fb39c973de535c
2024-02-22 09:13:20 -08:00
Dimitris Iliopoulos
4bf3d8d090 Update platform010 & platform010-aarch64 symlinks
Summary:
`1.76.0` release with fixes addressing the following:
* Release notes ([link](https://releases.rs/docs/1.76.0/))
  * Most notable is [#118054](https://github.com/rust-lang/rust/pull/118054/) manifesting as:
```
error: unused implementer of `futures::Future` that must be used
   --> fbcode/mlx/metalearner/housekeeper/housekeeper.rs:213:13
    |
213 |             self.ping_oncall(&oncall, usecases);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: futures do nothing unless you `.await` or poll them
    = note: requested on the command line with `-D unused-must-use`
```
* Changes in `search_index.js` spec for `rustdoc` ([link](https://github.com/rust-lang/rust/pull/118910/files#diff-3ac57789ddcd2856a3b4f0c444f2813315179bdbe55bb945fe64fcb27b53fee5L491))
* Split of `#![feature(exposed_provenance)]` ([link](https://github.com/rust-lang/rust/pull/118487)) from [#95228](https://github.com/rust-lang/rust/issues/95228)
* `buck2` OSS toolchain bump to `nightly-2023-12-11` just before [#11878](https://github.com/rust-lang/rust-clippy/pull/11878) and a bunch of other clippy lint renames.

Reviewed By: dtolnay

Differential Revision: D53776867

fbshipit-source-id: 78db83d8cdd6b0abae2b94ed1075e67b501fcd73
2024-02-20 10:31:00 -08:00
Zixian Cai
d3e069f0bb Add AMD Zen 2 Matisse support (#28)
Summary:
Checked the AMD PPR and confirmed the event encoding

<img width="1182" alt="image" src="https://github.com/facebookexperimental/reverie/assets/2891235/364b15f9-3af9-47a8-a0ac-c2d4cf6981d9">

Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/28

Reviewed By: asm89

Differential Revision: D53796098

Pulled By: jasonwhite

fbshipit-source-id: 9d7e8f29c5b7307819735034decfd2deba60ca3a
2024-02-15 10:30:52 -08:00
Jason White
9f52ff6126 ci: Make clippy less strict (#29)
Summary:
The clippy errors with `clippy::all` aren't too helpful. Plus, with building on nightly, new lints often break CI.

Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/29

Reviewed By: asm89

Differential Revision: D53796464

Pulled By: jasonwhite

fbshipit-source-id: d90323da824a97976c62f46c72aa7c611d31e359
2024-02-15 10:09:51 -08:00
Jason White
17e8f64e94 Fix broken test after toolchain update
Summary: These tests did unaligned reads/writes, which can produce a `SIGABRT` instead of a `SIGSEGV`. Simply align the reads/writes to 8 bytes to fix the tests.

Reviewed By: JakobDegen, dtolnay

Differential Revision: D53597637

fbshipit-source-id: e2ede420b6249223569af6d89d43a47438967ced
2024-02-08 20:02:47 -08:00
Cameron Pickett
06f05e10f4 Rustfix codemod
Summary:
Apply fixes from `./common/rust/tools/rustfix2/scripts/rustfix_codemod`

Then check any remaining lints highlighted and adjust code to correct them.

Reviewed By: zertosh

Differential Revision: D52975050

fbshipit-source-id: b52d4d84557c78110543d250a40173208fca17ca
2024-01-25 07:02:52 -08:00
Pierre Chevalier
b102b3bf49 Add support for Intel Icelake architecture
Reviewed By: jasonwhite

Differential Revision: D52832812

fbshipit-source-id: 6e388a179aea39cfb21197d895fbf5b14a1123b7
2024-01-17 04:35:38 -08:00
Pierre Chevalier
d7d1e7eec6 reverie-syscalls: Fix broken OSS CI
Summary:
My recent diff: D49742979 which upgraded `bitflags` to 2.4 seems to have broken the Open Source CI for a few crates under `hermetic_infra`.

That is because among other changes, `bitflags` 2.x requires the `serde` Cargo feature to `#[derive(Serialize, Deserialize)]` on generated flag types.

See [the release notes](https://github.com/bitflags/bitflags/releases/tag/2.0.0?fbclid=IwAR0BHMz6T_jmIkXaJmkdvc9LdDTW15G5SSU_A-cZvLxof0aGS0BA7Hqnme0)

This change should fix it.

Reviewed By: mitrandir77

Differential Revision: D52801745

fbshipit-source-id: 826c70e5a111ab1a1159cceab6fb40831f355287
2024-01-16 07:37:20 -08:00
Pierre Chevalier
b1516c3941 Update bitflags to 2.4
Summary:
## Motivation

Since the latest compiler update, we are getting `clippy::bad_bit_mask` errors at the callsites of `bitflags!` macros where one of the variant is zero.
[Upstream won't address it in the `1.x` branch](https://github.com/bitflags/bitflags/pull/373) and recommends upgrading to the `2.x` branch.

We are very close to reaching **zero clippy lints** in [Mononoke and other servers](https://fburl.com/code/pd76yn5e), which would feel nice.

## Specific categories of changes (in case it helps with the code review)

The change from `1.x` to `2.x` introduces a number  of backward compatibility breakages which I had to workaround in our codebase.
See [the release notes for 2.0](https://github.com/bitflags/bitflags/releases/tag/2.0.0) for the explanation for the manual fixes I had to perform at each call site.
 ---
**Adding traits to derive:**
```
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
```
> Generated flags types now derive fewer traits. If you need to maintain backwards compatibility, you can derive the following yourself:
 ---
**Replacing read uses of `.bits` with `.bits()`**
> You can now use the .bits() method instead of the old .bits.
> The representation of generated flags types has changed from a struct with the single field bits to a newtype.
 ---
**Replacing raw setting of `.bits` with `.from_bits_retain()`**
Due to the point above, the representation of the type is not exposed anymore. From [the documentation](https://docs.rs/bitflags/latest/bitflags/example_generated/struct.Flags.html#method.from_bits_retain), `from_bits_retain` "convert from a bits value exactly", which matches the old behaviour
 ---
**Replacing the unsafe `from_bits_unchecked` method with `from_bits_retain`**
> The unsafe from_bits_unchecked method is now a safe from_bits_retain method.
 ---
**Extracting some structs outside of the `bitflags!` macro**
Apart from the derives that `bitflags` knows about, such as `serde`, `bitflags` now can't deal with custom derives in macros with the previous syntax. I followed the recommendation from [their documentation](https://docs.rs/bitflags/latest/bitflags/index.html#custom-derives) to declare the `struct` ahead of of the macro call and only declare the `impl` block inside the macro.
 ---
**Changes to test output**
This does not stand out in the release notes, but as of [this upstream PR](https://github.com/bitflags/bitflags/pull/297), the `Debug` output of generated bitflags has changed. This means any tests that rely on this (and of course, there are a few) needed updating.
In particular, the `vespa` tests rely on that output in a non-obvious way. You might have to trust me (and CI) on these ones...

Reviewed By: dtolnay

Differential Revision: D49742979

fbshipit-source-id: c818c37af45f0964e8fdb7ec6173ad66bb982c00
2024-01-16 00:38:02 -08:00
Stiopa Koltsov
d3daaebfe1 format_code_in_doc_comments = true
Summary:
Another attempt to enable the option.

[We agreed](https://fb.workplace.com/groups/rust.language/posts/24184800024475285) we want it everywhere by default.

# Help us, help yourself

If you can help enabling this option, consider running this command ahead of time:

```
hg files . -I 'your_project/**/*.rs' | \
  xargs arc rustfmt --config format_code_in_doc_comments=true
```

Fix the which is not landed yet:

```
hg st --rev .~1 -n -ma -I '**/*.rs' | \
  xargs arc rustfmt --config format_code_in_doc_comments=true
```

Fix the stack of commits: checkout the top commit, and then:
```
# must include changes from D52632478
fbcode/scripts/nga/stack-rustfmt-new
```

# Previous attempt

D42766542

Reviewed By: zertosh, dtolnay

Differential Revision: D52632085

fbshipit-source-id: f45998c76076470d66339eb99f585856d2114999
2024-01-09 22:59:04 -08:00
Stiopa Koltsov
00a4d01ee2 format_code_in_doc_comments = true
Summary: D52632085

Reviewed By: zertosh

Differential Revision: D52640376

fbshipit-source-id: da918401a991b1f15dd84e1e9066cca1457afd28
2024-01-09 16:54:59 -08:00
Andreas Backx
9a92f2f4e9 colored 1.9 -> 2.1.0
Summary: A newer version of colored adds support for true color terminal text coloring. The changelog only indicates "Alter Color interface to return Cow<'static, str>" besides the true color support as a "change" in the changelog and I'm not expecting people to really use this. If they do, I'll see it in Sandcastle?

Reviewed By: dtolnay

Differential Revision: D52391497

fbshipit-source-id: c08fffc171f7d5f9b75f96617aa673867ab45312
2024-01-02 15:28:35 -08:00
Andres Suarez
9ce4ac6e2b Add default crate information
Summary: Adds basic info that every crate should have.

Reviewed By: dtolnay

Differential Revision: D52051107

fbshipit-source-id: 828ac6a752dbb4b419577fca08815014c8b96c42
2023-12-11 15:49:03 -08:00
Jake Bailey
7d08fc8085 Upgrade heapless 0.7.15 -> 0.8.0
Summary: Sync with fw-rust.

Reviewed By: zertosh

Differential Revision: D51963086

fbshipit-source-id: 22021abffef9d8815f98b0c6fc3c9d4e3971331f
2023-12-08 02:19:57 -08:00
David Tolnay
b5d1131efc Update gimli from 0.26.1 to 0.28.1
Summary:
This release includes https://github.com/gimli-rs/addr2line/pull/260 which unblocks supporting Split DWARF in reverie and cadaverdog.

Separately, ayermolo is looking into whether this gimli update fixes an issue with an iOS test that uses lionhead, and uses gimli to dump debuginfo, which is blocking the land of DWARF5.

Reviewed By: jasonwhite

Differential Revision: D51814926

fbshipit-source-id: ae0882432019250060c65792476a0f6e296daffb
2023-12-04 13:20:36 -08:00
David Tolnay
ccaa2e5f1d update platform010 & platform010-aarch64 symlinks
Summary:
Release notes: https://blog.rust-lang.org/2023/10/05/Rust-1.73.0.html

This release is coupled with an update of the `anyhow` and `thiserror` crates because the unstable standard library API for backtraces has changed.

Fbcode changes:

- `feature(default_free_fn)` deleted (D50300881)
- `noop_method_call` lint becomes warn-by-default (D50486032, D50516201)
- stronger `invalid_reference_casting` detection (D50488164)
- `feature(unix_chown)` has been stabilized
- `feature(provide_any)` and `std::provider` deleted
- `clippy::unwrap_or_else_default` renamed to `clippy::unwrap_or_default`
- type inference ambiguities (D51780425)
- `nu-command` build error (D51779062)

Reviewed By: AndreasBackx, shayne-fletcher

Differential Revision: D50294321

fbshipit-source-id: 0fac87f6ba072ad029f9ce41ce94ed813e855b20
2023-12-02 13:52:50 -08:00
Andres Suarez
d22b5fa9de Update autocargo component on FBS:master
Reviewed By: dtolnay

Differential Revision: D51692353

fbshipit-source-id: 44864a348711875983de81758bbe05b46ad4c604
2023-11-29 18:35:29 -08:00
David Tolnay
d744c1f65b Update proc-macro2 to 1.0.70
Summary:
This release includes a fix to `proc_macro2::Ident::new` to report invalid input at the call site using #[track_caller], instead of inside proc-macro2 code.

This affects LLVM staging (which is LLVM 18) because old bindgen (<0.62.0) is incompatible with Clang 16+, manifesting as panicks in `Ident::new`. See {D40685340}.

**Before:**

```
Action failed: fbsource//third-party/rust:loopdev-0.4.0-build-script-run (buildscript)
thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/loop_h_21_1)" is not a valid Ident', third-party/rust/vendor/proc-macro2-1.0.69/src/fallback.rs:817:9

Action failed: fbsource//third-party/rust:virt-sys-0.1.0-build-script-run (buildscript)
thread 'main' panicked at '"_virTypedParameter_union_(unnamed_at___/__/__/__/__/__/fbcode/ca3f1b68f56b9220/third-party-buck/platform010/build/libvirt/__include__/include/include/libvirt/libvirt-common_h_206_5)" is not a valid Ident', third-party/rust/vendor/proc-macro2-1.0.69/src/fallback.rs:817:9
```

**After:**

```
Action failed: fbsource//third-party/rust:loopdev-0.4.0-build-script-run (buildscript)
thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/loop_h_21_1)" is not a valid Ident', third-party/rust/vendor/bindgen-0.59.2/src/ir/context.rs:878:9

Action failed: fbsource//third-party/rust:virt-sys-0.1.0-build-script-run (buildscript)
thread 'main' panicked at '"_virTypedParameter_union_(unnamed_at___/__/__/__/__/__/fbcode/ca3f1b68f56b9220/third-party-buck/platform010/build/libvirt/__include__/include/include/libvirt/libvirt-common_h_206_5)" is not a valid Ident', third-party/rust/vendor/bindgen-0.59.2/src/ir/context.rs:878:9
```

Of course, that panic still needs to be fixed properly. I will pursue that next. But at least the location of the faulty code is reported correctly.

Reviewed By: zertosh

Differential Revision: D51633230

fbshipit-source-id: db9794ed4ea70f773925bdaf9a11de289d2aa25c
2023-11-28 15:53:02 -08:00
Facebook Community Bot
3db2bda062
Re-sync with internal repository (#26)
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging.
2023-11-22 07:54:51 -08:00
Jason White
b7647f1572 Add support for Intel Sapphire Rapids
Reviewed By: VladimirMakaev

Differential Revision: D51477614

fbshipit-source-id: 244ad482dc4758b410b5262f2c477af9e70b1e05
2023-11-20 13:46:37 -08:00
David Barsky
7be2fd4ca9 clippy: prevent holding a span guard over an .await
Summary:
X-link: https://github.com/facebookresearch/Private-ID/pull/119

We should probably lint against using an `.enter()` guard over `.await` points for the reasons outlined in https://docs.rs/tracing/latest/tracing/struct.Span.html#in-asynchronous-code.

Reviewed By: zertosh

Differential Revision: D50528695

fbshipit-source-id: 82fcc97a83b5d820c8673e6f56794dc47fd4d77f
2023-11-16 07:31:54 -08:00
Andres Suarez
25dd528f72 Update (and unfork) tracing from 0.1.37 to 0.1.40
Summary:
Replaces the various `tracing` forks for [tokio-rs/tracing#2407] with
crates-io releases containing those changes.

[tokio-rs/tracing#2407]: https://github.com/tokio-rs/tracing/pull/2407

Reviewed By: capickett, davidbarsky

Differential Revision: D51266382

fbshipit-source-id: 5ad0b7b9477e5fa450e52c639357fe485e0e89ff
2023-11-13 18:18:35 -08:00
Sebastian Messmer
dd1490f9f3 Update paste to 1.0.14
Summary: This is needed for D50668794, which is updating webauthn-rs

Reviewed By: zertosh

Differential Revision: D50678571

fbshipit-source-id: b7aadd10b7c44377bd04363cf6105c93ecebd302
2023-10-26 00:06:40 -07:00
Andres Suarez
730e0d23e6 Require at least tempfile-0.3.8
Reviewed By: shayne-fletcher

Differential Revision: D50529920

fbshipit-source-id: 444774ef543c2d0b4cd8e3d82cf4addf1435e6ca
2023-10-21 12:15:21 -07:00
David Tolnay
ce2758b437 Deny stable_features lint
Summary:
Let's get these cleaned up. Some of these features have been stable (and therefore warning) for 2 years.

Codebases that need to support a compiler out of sync with the fbcode compiler can use `#![allow(stable_features)]`.

https://www.internalfb.com/code/fbsource/[cbb2d272daffb00e4b04465978a4fcfbf4beb204]/fbcode/buck2/starlark-rust/starlark/src/lib.rs?lines=353

Reviewed By: shayne-fletcher

Differential Revision: D50487806

fbshipit-source-id: a5e6ede09b815faa0a64cbd5fac606b89821edb3
2023-10-20 10:29:23 -07:00
David Tolnay
613bea7f70 Eliminate cast from &T to &mut T
Summary:
This code is 100% UB and no longer compiles in Rust 1.73.

```
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
   --> fbcode/hermetic_infra/reverie/experimental/reverie-sabre/src/thread.rs:652:32
    |
652 |             let slot_map_mut = &mut *((&*SLOT_MAP as *const _) as *mut _);
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[deny(invalid_reference_casting)]` on by default
```

Reviewed By: JakobDegen

Differential Revision: D50488164

fbshipit-source-id: ea649d97f47ccc329a44650aff5dc467ed12b48c
2023-10-20 00:57:17 -07:00
Andres Suarez
890bb937a0 Update and pin anyhow to 1.0.72
Summary:
anyhow-1.0.73 [uses][1] the new `Error::provide` API. This API is
available starting in Rust 1.73. This means that if you want backtraces,
you need one:

- anyhow-1.0.72 & Rust 1.72
- anyhow-1.0.73 & Rust 1.73

Since we're still on 1.72, pin the version to avoid accidentally losing
backtraces.

There are no real changes between anyhow-1.0.71 and anyhow-1.0.72. But
update to anyhow-1.0.72 so that we're right up until the point where we
get backtrace support.

[1]: https://github.com/dtolnay/anyhow/pull/319

Reviewed By: shayne-fletcher

Differential Revision: D49970958

fbshipit-source-id: 1193611e6d16bc840e63b689e932ea3d33562152
2023-10-05 15:20:03 -07:00
Cooper Lees
74d164283b Fix fbcode TARGETS for compiling with procfs 0.15.1
Summary:
- Fix top level dirs:
  - frl_ee_infra
  - fbcode_devx
  - hermetic_infra
  - hphp/hack
  - remote_execution
  - service_capacity/projection_framework

Going to need to lean on people to help test here once CI passes ...

Reviewed By: aijayadams

Differential Revision: D49899458

fbshipit-source-id: 4eaa7c3b07bfcf5d23c4ed71a9050ffa2b9ac777
2023-10-04 14:10:11 -07:00
Cooper Lees
bda439e5e0 Update procfs to 0.15.1
Summary:
- Want to update to use with monitord >= 0.7.0
- Had to add fixup to ignore build file
  - All it did was make sure we're Linux ... we already do that elsewhere ...
- Will add monitord in a stacked diff (trying to make this as small as possible - Although - Not that small)

Reviewed By: aijayadams

Differential Revision: D49848114

fbshipit-source-id: d95f0784b284ad7915fc948b827531e0a1652a61
2023-10-04 14:10:11 -07:00
Bjoern Doebel
626198d26f Fix vdso_get_symbols_info() assertion for ARM64 (#24)
Summary:
On ARM64 I have been seeing test failures:

```
test vdso::tests::vdso_can_find_symbols_info ... FAILED
test vdso::tests::vdso_patch_info_is_valid ... FAILED
```

Looking closer, this was caused by the debug assertion in vdso_get_symbols_info() which asserts that all symbols found in the VDSO are ELF STT_FUNC symbols. Unfortunately, this is not the case on ARM64, because the VDSO's `__kernel_rt_sigreturn` is special and does appear as STT_NONE symbol.

Fixup the debug assertion by special-casing for this special function.

Note: I shortly considered adding an expected symbol type to the `VDSO_SYMBOLS` hashes, but that didn't seem to make sense just to fix this one special case.

Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/24

Reviewed By: VladimirMakaev

Differential Revision: D49291487

Pulled By: jasonwhite

fbshipit-source-id: 87bf810f590238493603ad9d62421b330bfe0f9d
2023-09-14 14:26:41 -07:00
Jason White
cc6d88bfd3 ci: Fix clippy warnings (#23)
Summary:
Fixes all current clippy warnings[1] so CI is green again.

Fixing the warning `clippy::needless_pass_by_ref_mut` became a little involved. The internal version of clippy isn't recent enough to have this warning and so just doing `#[allow(clippy::needless_pass_by_ref_mut)]` leads to another error. The resulting change fixes the clippy warning and gets rid of some of the shenanigans I was doing to avoid allocating path buffers within the child process.

[1]: https://github.com/facebookexperimental/reverie/actions/runs/6164196219/job/16729396694

Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/23

Reviewed By: VladimirMakaev

Differential Revision: D49209202

Pulled By: jasonwhite

fbshipit-source-id: b03ff432783910bef11fc239d146659dc2c0db30
2023-09-13 15:01:16 -07:00
Bjoern Doebel
9b5480352e Make sure that VDSO patch code is properly aligned (#22)
Summary:
The code that is injected into the tracee processes' VDSO needs to be 8 byte aligned in order to satisfy conditions imposed by the ptrace interface on 64 bit architectures. There have been reproducible reports of that not always being the case:
https://github.com/facebookexperimental/hermit/issues/41. Use an explicitly aligned data structure to enforce this.

Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/22

Reviewed By: VladimirMakaev

Differential Revision: D49195126

Pulled By: jasonwhite

fbshipit-source-id: 8e21cd4306ee2bf75ec321b21e40137be5292f9f
2023-09-12 12:48:51 -07:00
Andres Suarez
e3c97826ef Update serde from 1.0.176 to 1.0.185
Summary:
This release most notably removes the precompiled serde_derive:
https://github.com/serde-rs/serde/releases/tag/v1.0.184

Reviewed By: shayne-fletcher

Differential Revision: D48516549

fbshipit-source-id: 077f650094f9424982de9283d04ede59306947b0
2023-08-21 06:07:02 -07:00
Dimitris Iliopoulos
bec52bdd29 migrate affected rust-toolchain.toml files to rust/llvm-fb-15
Summary:
* Looking at `fbcode/PLATFORM.bzl` and per-directory `PACKAGE` files, from the `rust-toolchain.toml` files touched in D47672894, migrate ones that can be migrated to `rust/llvm-fb-15`
* Fix 1 `platform009` strangler (lol) and remove 1 that does not have a `Cargo.toml` file since D46411801

Reviewed By: zertosh

Differential Revision: D47930524

fbshipit-source-id: 52f0a8ba5c42dc2d8541ad57a2c043bdcbf19a30
2023-07-31 19:46:59 -07:00
Jason White
7d704c86c6 Fix timer_semantics tests
Summary: The default opt-level was recently lowered from 1 to 0. `syscalls::syscall!(...)` has one branch to check the error code while `syscalls::raw_syscall!()` does not. Presumably, this branch was getting optimized out when opt-level=1, but not when opt-level=0 and thus started causing the highly-sensitive timer tests to start failing.

Reviewed By: VladimirMakaev

Differential Revision: D47892355

fbshipit-source-id: 9d19d4a1a1e0521650ffcb46a93f4a61a07bcae1
2023-07-29 03:49:57 -07:00
Facebook Community Bot
22fa391dda
Re-sync with internal repository (#21)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2023-07-28 18:53:42 -07:00
David Tolnay
033ce7edf7 Update serde from 1.0.167 to 1.0.176
Reviewed By: quark-zju

Differential Revision: D47811862

fbshipit-source-id: 03cefc52f3d024a2d0fb5580bed079ff2b4651e0
2023-07-26 21:23:58 -07:00
Dimitris Iliopoulos
5cbb863072 add platform010 & platform010-aarch64 symlinks - NO ACTIVATION
Summary: Adding support for `llvm-fb-12`

Reviewed By: zertosh

Differential Revision: D47672894

fbshipit-source-id: 7d78ae318b507543f45873e89b7fb3aeda0d1276
2023-07-26 14:39:20 -07:00
Daniel Mueller
f5831c73d5 Update num_cpus to 1.16.0
Summary:
Update num_cpus to version 1.16.0. We need this version as it is a requirement
of libbpf-sys v1.2.1+v1.2.0, which is to be imported subsequently.

Reviewed By: zertosh

Differential Revision: D47380958

fbshipit-source-id: d1fa12a1c8a974686d70d47876e990da4a73b839
2023-07-13 19:19:42 -07:00
Astrid Yu
460387b9c8 third-party/rust: bump tokio v1.25.0 -> v1.29.1
Summary: Needed for reqwest QUIC support (requirement of ^1.28)

Reviewed By: zertosh

Differential Revision: D47304356

fbshipit-source-id: d39999373ae51f79123927a073f3073e21a10078
2023-07-12 15:32:56 -07:00