Commit Graph

34 Commits

Author SHA1 Message Date
Thomas Orozco
8c83bd9a1c third-party/rust: update Tokio to 1.7.1
Summary: There is a regression in 1.7.0 (which we're on at the moment) so we might as well update.

Reviewed By: zertosh, farnz

Differential Revision: D29358047

fbshipit-source-id: 226393d79c165455d27f7a09b14b40c6a30d96d3
2021-06-25 06:17:41 -07:00
Andres Suarez
fc37fea20c Update itertools 0.8.2 to 0.10.1
Reviewed By: dtolnay

Differential Revision: D29286012

fbshipit-source-id: 6923c0b750692e6932e85fd539b076b172ff43b7
2021-06-22 04:09:00 -07:00
Thomas Orozco
97c598ac82 fixup build after os_info crate update
Summary:
This dep got updated in D29165283 (b82c5672fc) across a major version but the code depending
on it wasn't so now it's broken.

Reviewed By: mitrandir77

Differential Revision: D29229087

fbshipit-source-id: 5f2a14dd9f0447dd4578e8321991dfb3df32dcc2
2021-06-18 07:06:14 -07:00
Davide Cavalca
b82c5672fc Update several rust crate versions
Summary: Update versions for several of the crates we depend on.

Reviewed By: danobi

Differential Revision: D29165283

fbshipit-source-id: baaa9fa106b7dad000f93d2eefa95867ac46e5a1
2021-06-17 16:38:19 -07:00
Andres Suarez
0f273c5ded update globset from 0.4.5 to 0.4.7
Summary:
The only real change here is: https://github.com/BurntSushi/ripgrep/pull/1756
This is a patch release but fixes a very glaring bug that others have
depended on. This diff fixes the uses to match the old behavior.

Although it's billed as a "fix", it's actually a huge perf improvement
for Linttool, which uses predominantly recursive suffix globs. The fact
that we don't have to compile ~5,000 regexps at Linttool startup anymore
makes such a huge difference that I am going to do write up soon.

Reviewed By: ndmitchell

Differential Revision: D29085977

fbshipit-source-id: 304470e5fa8cb986738aa0d9dd941641684a9194
2021-06-15 15:47:49 -07:00
Pedro Rittner
b91da1d115 Bump crossbeam from 0.7 to 0.8, lsp from 0.3 to 0.5, lsp-types from 0.73 to 0.89
Summary: Bumping the crossbeam version so we can use `recv_deadline`. This also necessitates updating the lsp and lsp-types crates.

Reviewed By: alunyov, dtolnay

Differential Revision: D29056473

fbshipit-source-id: 9434e9e0895d82482f4c70afa01a2f77702b965f
2021-06-11 21:57:21 -07:00
Alex Hornby
4457092322 rust: revert zstd crates
Summary: revert the zstd crates back to previous version

Reviewed By: johansglock

Differential Revision: D29038514

fbshipit-source-id: 3cbc31203052034bca428441d5514557311b86ae
2021-06-11 04:39:54 -07:00
Alex Hornby
f89dbebae8 rust: update zstd bindings to 1.5.0
Summary: Update to latest version.  This includes a patch to async-compression crate from [my PR updating it](https://github.com/Nemo157/async-compression/pull/125), I will remove once the crate is released.

Reviewed By: mitrandir77

Differential Revision: D28897019

fbshipit-source-id: 07c72f2880e7f8b85097837d084178c6625e77be
2021-06-08 07:57:29 -07:00
Jeremy Fitzhardinge
c652f9a11f third-party/rust: update time to 0.2
Summary:
Time 0.2 is current, and 0.1 is long obsolete. Unfortunately there's a
large 0.1 -> 0.2 API change, so I preserved 0.1 and updated the targets of its
users. Also unfortunate that `chrono` has `oldtime` as a default feature, which
makes it use `time-0.1`'s `Duration` type. Excluding it from the features
doesn't help because every other user is specifying it by default.

Reviewed By: dtolnay

Differential Revision: D28854148

fbshipit-source-id: 0c41ac6b998dfbdcddc85a22178aadb05e2b2f2b
2021-06-03 13:52:54 -07:00
Thomas Orozco
846a983d67 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 09:44:41 -07:00
David Tolnay
d4f337c889 Resolve bare_trait_objects warnings in path components
Reviewed By: quark-zju

Differential Revision: D28558352

fbshipit-source-id: d4b85716096c43eed8e6172ade3dfe40e277e670
2021-05-19 22:03:56 -07:00
David Tolnay
cf6125221b Regenerate Rust thrift files
Reviewed By: quark-zju

Differential Revision: D28558333

fbshipit-source-id: a6ca6e6cb8b02849b27c53fcc1aa33f464aa0f84
2021-05-19 21:54:41 -07:00
David Tolnay
7354f2b557 Invoke thrift compiler using relative path from fbcode root
Reviewed By: quark-zju

Differential Revision: D28558767

fbshipit-source-id: a2299b374d714129fef7464f783c8cd1747bda68
2021-05-19 21:52:08 -07:00
Jan Mazur
effef3a2c3 removing revisionstore tests
Summary:
These tests were hitting prod LFS. I have fixed them in our post-fork codebase here:  D28093406 (490cbbf0c3)

We don't need them on hg servers so just delete them.

Reviewed By: krallin

Differential Revision: D28438295

fbshipit-source-id: 49961a4bb5965bd350d97b946c8c9fbeeefdebcc
2021-05-14 08:16:24 -07:00
Stanislau Hlebik
eab97b6123 mononoke: sync changeset implementation for megarepo
Summary: First stab at implementing sync changeset functionality for megarepo.

Reviewed By: ikostia

Differential Revision: D28357210

fbshipit-source-id: 660e3f9914737929391ab1b29f891b3b5dd47638
2021-05-13 10:04:21 -07:00
Ron Mordechai
77b7617d4b Add myparenttags
Summary: I use tags extensively and I love them to be supported as well.

Reviewed By: asm89

Differential Revision: D28348565

fbshipit-source-id: 7d94d048b734c91e7d74a1c3efeefc87943066ad
2021-05-12 08:20:53 -07:00
Stanislau Hlebik
4e232ea94d mononoke: add mapping for megarepo
Summary:
Adding mappng to keep track of two things:
1) keep track of the latest source commit that was synced into a given target - this will be used during sync_changeset() method to validate if a parent changeset of a given changeset was already synced
2) which source commit maps to what target commit

Reviewed By: ikostia

Differential Revision: D28319908

fbshipit-source-id: f776d294d779695e99d644bf5f0a5a331272cc14
2021-05-11 02:54:01 -07:00
CodemodService Bot
e2a64a3088 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D28319288

fbshipit-source-id: fc879fab6d7c2abd5184ccfbacf2aa2a8f3d8003
2021-05-10 05:06:45 -07:00
Digant Kasundra
be43635087 Update rust-ini to 0.17.0
Summary: Updated rust-ini from 0.13.0 to 0.17.0

Differential Revision: D28242794

fbshipit-source-id: 249fc7d2ffdc46c4bfb4b575fb7aa8f5858a6e12
2021-05-06 06:50:28 -07:00
CodemodService Bot
b4afda3890 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D28216338

fbshipit-source-id: 2384a332505881bbc8cd621694496cf9f37c3bea
2021-05-05 04:03:47 -07:00
John Reese
9fd86a4fae apply upgraded black 21.4b2 formatting to fbsource
Summary:
This applies the formatting changes from black v21.4b2 to all covered
projects in fbsource. Most changes are to single line docstrings, as black
will now remove leading and trailing whitespace to match PEP8. Any other
formatting changes are likely due to files that landed without formatting,
or files that previously triggered errors in black.

Any changes to code should be AST identical. Any test failures are likely
due to bad tests, or testing against the output of pyfmt.

Reviewed By: thatch

Differential Revision: D28204910

fbshipit-source-id: 804725bcd14f763e90c5ddff1d0418117c15809a
2021-05-04 22:16:51 -07:00
Mateusz Kwapich
43c2f9f88e error out when fetching NULL data from hgsql
Summary:
The original bug that resulted in empty revisions being pulled is long-fixed:
T28553115. I'm planning to make data1 nullable so I can reclaim space by removing older
revs.

Reviewed By: DurhamG

Differential Revision: D28096278

fbshipit-source-id: a57da458df115dcbdf544e2151aa327651190c1a
2021-04-29 14:45:12 -07:00
Mateusz Kwapich
d1064681ee bring back debugephemeralcommit.py
Summary: andll removed it (probably by accident) in D27722921 (80adbe385c)

Reviewed By: andll

Differential Revision: D28096279

fbshipit-source-id: 0d3e9aee4c22803680cee8d5e3a40d51d7f36b7b
2021-04-29 14:45:12 -07:00
Mateusz Kwapich
2a23089e9a hgsql: fix tests
Summary:
This enlists hgsql tests to the lists of tests using revision numbers and
marks some racy lines as optional

Reviewed By: quark-zju

Differential Revision: D28096282

fbshipit-source-id: eb8406cb74f3338d13d4109fce35f969ff9e3b79
2021-04-29 14:45:12 -07:00
Mateusz Kwapich
7a6c3e090f lib: remove unused C code
Summary:
This is a hg-sever backport of fix from D27659634 (8e8aaa61d6)

Those are not used. Recently we saw build issues like:

  lib/third-party/sha1dc/sha1.c:8:10: fatal error: string.h: No such file or directory
   #include <string.h>
            ^~~~~~~~~~

Possibly by some compiler flags disabling stdlib. Since we don't need
the C code let's just remove them.

Reviewed By: StanislavGlebik

Differential Revision: D28096283

fbshipit-source-id: 6c5390d26264e1e39f99b29dec8608d92e5ae572
2021-04-29 14:45:12 -07:00
Alex Hornby
a472800b2a hg-server: fix autocargo lints
Summary: Was getting orphan autocargo lints on these so add a config for them.

Reviewed By: krallin

Differential Revision: D27947231

fbshipit-source-id: 925fb78889d8f80f51145536a157fa0e63cc68d7
2021-04-23 01:58:57 -07:00
Alex Hornby
bc85aade21 rust: update to zstd to 0.7.0+zstd.1.4.9
Summary:
Update the zstd crates.

This also patches async-compression crate to point at my fork until upstream PR https://github.com/Nemo157/async-compression/pull/117 to update to zstd 1.4.9 can land.

Reviewed By: jsgf, dtolnay

Differential Revision: D27942174

fbshipit-source-id: 26e604d71417e6910a02ec27142c3a16ea516c2b
2021-04-22 14:34:06 -07:00
Skotch Vail
a3a02abd7a debug for merge picker
Summary:
I am debugging why some people get vim to pop up during a merge conflict and some do not.

also fixes a few lint issues

Reviewed By: DurhamG

Differential Revision: D27684419

fbshipit-source-id: f636d71c18353a3816d1e442c05790cf4fd7b90b
2021-04-19 12:22:27 -07:00
Thomas Orozco
aed52d2afc fix hg-server panic formatting
Summary:
This now warms as of Rust 1.51, but we turn it into an error:

https://www.internalfb.com/intern/sandcastle/log/?instance_id=18014398919947596&step_id=18014402571733773&step_index=5&name=Build

Context: https://fb.workplace.com/groups/rust.language/permalink/5558170997564803/

I think the diff that introduced this code raced with the one that updated the panic messages globally.

Reviewed By: HarveyHunt

Differential Revision: D27791846

fbshipit-source-id: d551768103a96ffcbe87770b0b79f92494f4fa87
2021-04-15 06:20:25 -07:00
CodemodService Bot
383d91a214 Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D27790050

fbshipit-source-id: 7c17ceb0f960610333cc72b66efd696ca30898ef
2021-04-15 04:28:09 -07:00
Maxime Arthaud
f2c0b69e6d suppress errors in fbcode/eden - batch 1
Reviewed By: MaggieMoss

Differential Revision: D27738056

fbshipit-source-id: 82957c165d968da999d021e9745b1bf967c615ea
2021-04-14 18:04:55 -07:00
Andrey Chursin
80adbe385c rename ephemeralcommit->hiddencommit
Summary: This name is more reasonable, since this commit is not actually ephemeral

Reviewed By: quark-zju

Differential Revision: D27722921

fbshipit-source-id: e2c0243d41a73341f9d0afdc79696ea37b34b8c7
2021-04-12 20:13:11 -07:00
Pyre Bot Jr
2b98b8c93c suppress errors in eden
Differential Revision: D27694246

fbshipit-source-id: c4364aee7fbc83d17c5e2ee3697bf2c29a194de3
2021-04-09 22:21:58 -07:00
Durham Goode
98d9269874 server: copy hg to a new hg-server directory
Summary:
Create a fork of the Mercurial code that we can use to build server
rpms. The hg servers will continue to exist for a few more months while we move
the darkstorm and ediscovery use cases off them. In the mean time, we want to
start making breaking changes to the client, so let's create a stable copy of
the hg code to produce rpms for the hg servers.

The fork is based off c7770c78d, the latest hg release.

This copies the files as is, then adds some minor tweaks to get it to build:
- Disables some lint checks that appear to be bypassed by path
- sed replace eden/scm with eden/hg-server
- Removed a dependency on scm/telemetry from the edenfs-client tests since
  scm/telemetry pulls in the original eden/scm/lib/configparser which conflicts
  with the hg-server conflict parser.

allow-large-files

Reviewed By: quark-zju

Differential Revision: D27632557

fbshipit-source-id: b2f442f4ec000ea08e4d62de068750832198e1f4
2021-04-09 10:09:06 -07:00