Commit Graph

88135 Commits

Author SHA1 Message Date
Open Source Bot
092c3a47f5 Updating submodules
Summary:
GitHub commits:

50da3609a1
0994824480
d010d83518
080d2a3b82
5bdd3f33a9
919f98bba7
6393c2daf3
f1b340f60c
9c38fb4a58
7c733b2925
3b45d38dc1
69337e58fe
4f155be5b5
dbeed9724b
ee8b2facbc

Reviewed By: bigfootjon

fbshipit-source-id: 45f8431eb0459dc34d66fbec7c5cff918486d336
2024-03-04 09:46:12 -08:00
Carlos Fernandez
3b05801a73 WIP: Eden cli: log details of file handle release
Summary:
We have the ability to (attempt to) kill processes preventing eden rm to succeed, but we don't have logging to estimate who often that happens and what the success rate is.

This diff introduces such logging.

Reviewed By: kmancini

Differential Revision: D54380383

fbshipit-source-id: 255f5f80b8df83c5db89086414cbe725f62d4fe3
2024-03-04 09:12:10 -08:00
Carlos Fernandez
d1c05c5623 Eden cli: Return correct code (failure) if we couldn't release file handles
Summary:
eden rm now has the ability to try to kill processes holding on to files we want to delete.

If the user rejects the offer and prefers to solve things manually, we're showing "success" even though the rm wasn't successful.

This just returns the right code so we don't display that message.

Differential Revision: D54379250

fbshipit-source-id: 8f75a827f2d2c563aecfe29bb8e56dfdbea950d9
2024-03-04 09:12:10 -08:00
generatedunixname89002005287564
6216b83d43 Pyre Configurationless migration for] [batch:13/244]
Reviewed By: connernilsen

Differential Revision: D54470890

fbshipit-source-id: 1778b533643b6f0ac94af1ef1801707ca97fefa6
2024-03-04 08:24:00 -08:00
Mark Juggurnauth-Thomas
4c6ebca9ae mononoke_api_hg: increase concurrency of hgid lookups
Summary: Add or increase the level of concurrency to hgid lookups for the various commit graph methods.

Reviewed By: YousefSalama

Differential Revision: D54482103

fbshipit-source-id: 0d5ba6cd28f54f2018930aba6a8a3d1d046171a0
2024-03-04 05:56:56 -08:00
Mark Juggurnauth-Thomas
b07878c292 hg_mutation_store: simplify fetching of all predecessors
Summary: Currently we fetch the target mutation entries and then expand them out to their predecessors.  This is left over from the method that used primordial lookups, but is no longer necessary as the recursive CTE can return all that we need.

Reviewed By: mitrandir77

Differential Revision: D54375207

fbshipit-source-id: d7da1f48ac5a3545ba192c171b513bad338b2cf6
2024-03-04 02:48:42 -08:00
Liubov Dmitrieva
b79e0f6e0c add a getter to CoreContext object itself
Summary:
add a getter to CoreContext object itself

I think it is reasonable due to amount of usage in the codebase.

Reviewed By: mzr

Differential Revision: D54416763

fbshipit-source-id: 9b5971ba7367f8518265b6c3bb1bd21fb7a6d7f0
2024-03-04 01:55:20 -08:00
Liubov Dmitrieva
e6c0ee9877 annotate bonsai globalrev mapping queries with e2e telemetry
Summary: annotate bonsai globalrev mapping queries with e2e telemetry

Reviewed By: mzr

Differential Revision: D54416053

fbshipit-source-id: c00352df36d379e5bd78e1a709bd2002198e5ce9
2024-03-04 01:55:20 -08:00
Liubov Dmitrieva
63c4861182 annotate bonsai git mapping queries with e2e telemetry
Summary: annotate bonsai git mapping queries with e2e telemetry

Reviewed By: mzr

Differential Revision: D54415943

fbshipit-source-id: 892e129111079f1af9814671f4e33892a6d49e2b
2024-03-04 01:55:20 -08:00
David Tolnay
d2dde1dcb5 Client&server traits from sub-crate (E-F)
Summary:
This diff is part of the codemod for https://fb.workplace.com/groups/rust.language/posts/25780668961555042.

Generated using the code in P1191436630 and the procedure from D54430332.

Reviewed By: zertosh

Differential Revision: D54465853

fbshipit-source-id: 40af6353a0c616dfdfe647ccd3eaaaaddad81389
2024-03-03 11:54:29 -08:00
Amethyst Reese
13dc119cf7 apply Black 2024 style in fbcode (9/16)
Summary:
Formats the covered files with pyfmt.

paintitblack

Reviewed By: aleivag

Differential Revision: D54447729

fbshipit-source-id: fc781322b254f7027c24888cdadd5f1e90325ba8
2024-03-02 17:31:19 -08:00
Amethyst Reese
fc4479ec2a apply Black 2024 style in fbcode (5/16)
Summary:
Formats the covered files with pyfmt.

paintitblack

Reviewed By: aleivag

Differential Revision: D54447730

fbshipit-source-id: 85ed104b2f8f5e26ae0dea9ee17392ecad8b9407
2024-03-02 17:31:19 -08:00
Dimitris Iliopoulos
5d0a374c7c upgrade 0.19.2 to 0.20.0
Summary: Upgrade `pyo3` to [`0.20.0`](https://github.com/PyO3/pyo3/releases/tag/v0.20.0)

Reviewed By: srinivasmohan, dtolnay

Differential Revision: D54291148

fbshipit-source-id: db63b1e94f2c333d9d9b4e23984874744d717843
2024-03-02 15:54:01 -08:00
John Elliott
108b57fc36 Move FileUtils and PathFuncs from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves FileUtils and PathFuncs from eden to edencommon.

NOTE: FileUtils and PathFuncs are mutally dependent so they were migrated togehter. Most of the files touched, however, was due to PathFuncs.

Reviewed By: genevievehelsel

Differential Revision: D54393041

fbshipit-source-id: 6dc404b1b1066704584da512220475e9ee486247
2024-03-01 18:09:03 -08:00
Pranjal Raihan
a03d82d685 Remove @cpp.GenerateTypedInterceptor and associated codegen
Summary: Typed interceptors (aka `ServiceMethodDecorator`) is taking a backseat while we revisit the approach. Let's clean up this unused code.

Reviewed By: thedavekwon

Differential Revision: D54316280

fbshipit-source-id: 49c5a0e93216e1b267ce743fd760741a0123e481
2024-03-01 17:47:02 -08:00
Zeyi (Rice) Fan
02f5ef1c3f modernize Python packaging for pywatchman
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/721

Mostly following practice in: https://packaging.python.org/en/latest/tutorials/packaging-projects/

Switching pywatchman to be built with PEP517. After this we can publish new pywatchman packages to PyPI continuously.

Reviewed By: jdelliot

Differential Revision: D54343676

fbshipit-source-id: 48a4538db4176662b8af189538dae32b9289d712
2024-03-01 16:13:47 -08:00
John Elliott
9bde7896c7 Forward fix github build break due to D54280190
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/720

When running getdeps as part of Github CI, the toolchains employed are found in "C:\Program Files" or "C:\Program Files(x86)" - both requiring quoting to execute.

Lets add quotes and fix tha.

Reviewed By: vitaut

Differential Revision: D54433098

fbshipit-source-id: d3570486a2a2b12f4649becc987f9da1ca65c796
2024-03-01 15:34:10 -08:00
John Elliott
0dbbe9f6f6 Move Try from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves Try from eden to edencommon.

Reviewed By: genevievehelsel

Differential Revision: D54379294

fbshipit-source-id: 9fdc8c896a6a09f959a25d0bee82a623650ced32
2024-03-01 15:23:56 -08:00
John Elliott
0d09b33ee9 Move Match from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves Match from eden to edencommon.

Reviewed By: genevievehelsel

Differential Revision: D54378643

fbshipit-source-id: f291126d2455cc2fdddffa4914be0c9d3f44f634
2024-03-01 15:23:56 -08:00
John Elliott
59221fc39f Move TempFile from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves TempFile from eden to edencommon.

Reviewed By: genevievehelsel

Differential Revision: D54372850

fbshipit-source-id: 681f00c2b8b2c353b802c680fe62382d86ee7c8d
2024-03-01 15:23:56 -08:00
Open Source Bot
1f78cd9c85 Updating submodules
Summary:
GitHub commits:

5f022c1894
62e748d95a
c7d462f1dc
9a4ece8899
27f4d40154
13271fcc0a
0c1125274a
eb633b93c4
aa708f2db9
a6d5a033eb
54ec4e4db7
aa445f0e5a
30e0b2ab29

Reviewed By: jurajh-fb

fbshipit-source-id: 5e54b7519ced523950540c4d2b03cc824e57252b
2024-03-01 14:20:56 -08:00
Genevieve (Genna) Helsel
aad551c6b8 fix repo name bug in predictive prefetch endpoint
Summary:
Used [here](https://fburl.com/code/wlpa65ui) by the Predictive Prefetch Profile endpoint, there are a couple of issues:

a) `repoName_` looks to never be populated
b) the `datapackStore_` has this information via `SaplingNativeBackingStore`, so it makes sense to plug this function in here

it can be seen to be unpopulated here:
```
I0227 15:17:11.005260 1248935 EdenFSSmartPlatformServiceEndpoint.cpp:97] Getting 1500 top used directories from the edenfs/edenfs_service smartservice for user 'helsel' in repo '' for OS Linux
```

corresponding to this message in the smartplatform service:

```
E0227 15:17:11.484886   266 EdenFSServiceHandler.cpp:84 req:00400000000000ad] Required parameters are not all specified, throwing a thrift exception
```

Reviewed By: MichaelCuevas

Differential Revision: D54282302

fbshipit-source-id: e8f42ea15ef58096bc50ad20ec7e09ac6505b5b8
2024-03-01 14:00:46 -08:00
Saul Gutierrez
e090ceed9e tests: use fbpython on Windows
Reviewed By: quark-zju

Differential Revision: D54427872

fbshipit-source-id: 349a28418a6b5cdea74d36f9544eaf74619cb42f
2024-03-01 13:03:46 -08:00
Evan Krause
4ec19c5f6b Make <Tag> accept div props
Summary: Allow <Tag> to take in other props, and use that to add a `title` for bookmarks. This way, long bookmark names that get truncated can be hovered to see the full name.

Reviewed By: quark-zju

Differential Revision: D54426513

fbshipit-source-id: 23162d13e3453153dded74b48161b780b4ba63d0
2024-03-01 12:40:21 -08:00
Evan Krause
d4a11bfb84 Add ReactProps type util
Summary: Add a util so you don't have to type "React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>" all over the place, since almost always you just use HTMLDivElement or whatever twice.

Reviewed By: quark-zju

Differential Revision: D54426514

fbshipit-source-id: 8c3ab9555534a03809e7b102107e4ad538918a0a
2024-03-01 12:40:21 -08:00
Evan Krause
d0d1db7c60 Remove stylex errors in test output
Summary:
jest test output had a lot of lines like:
```
ts-jest[ts-compiler] (WARN) src/TopLevelAlert.tsx:89:30 - error TS2554: Expected 0 arguments, but got 1.

 89 const styles = stylex.create({
                                 ~
 90   alertContainer: {
    ~~~~~~~~~~~~~~~~~~~
...
122   UBN: {backgroundColor: colors.purple},
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123 });
    ~
```

This is because our mock for stylex had no types for the parameters. Just updating our mock with unused arg defs fixes this.

Reviewed By: quark-zju

Differential Revision: D54424188

fbshipit-source-id: 179ff36db7e6f2f563cdbd0bcf248db79126e86c
2024-03-01 12:40:21 -08:00
Evan Krause
7faf3e77e4 Show submit selected button next to selected commits
Summary:
If you multi-select commits, we show a submit button in the sidebar. But that's kind of out of the way, making submitting a partial selection kind of slow.

Instead, let's add the submit selected button next to the bottommost selected commit when you have multiple selected.

We already had this submit selected in the sidebar, so we can refactor it slightly to be reusable.

While doing this, I also fixed a couple of other issues:
- the sidebar multi-select buttons were kind of badly laid out and didn't wrap well. This is fixed by two lines of CSS.
- the update message when multi-selecting was extra fragile because it was selection order-dependent. We can sort the hashes to be resilient to selection order

Reviewed By: quark-zju

Differential Revision: D54397854

fbshipit-source-id: 3afde8e2750d7648172b8d21e8d41a751fafa9e6
2024-03-01 11:50:14 -08:00
Evan Krause
a9415ea28a <Bookmark> component
Summary: Wrap <Tag> in <Bookmark>, for slightly more declarative and reusable bookmarks. We also have one set of special styles for some bookmarks (arc pulled etc). We'll want to reuse that in the bookmarks manager.

Reviewed By: quark-zju

Differential Revision: D54391159

fbshipit-source-id: 99ae04e5627e1113639db6821ad6eae84c9cb0ff
2024-03-01 11:50:14 -08:00
Evan Krause
1508dd91e8 Tag component
Summary: Add a new <Tag> component, which is styled the same as the <VSCodeTag>, but without the capitlzation and with our own implementation. See also D54317950

Reviewed By: quark-zju

Differential Revision: D54391158

fbshipit-source-id: a1b3c0c018491853f37674e1973b8801f83975c3
2024-03-01 11:50:14 -08:00
Evan Krause
1e49f1336e Clean up Component Utils, use stylex
Summary:
I noticed we had both <Row> and <FlexRow>, ostensibly doing the same thing...?

Here I combine these, and rewrite the API to allow passing xstyle with stylex styles. This makes it easier to use these components when using stylex.

Reviewed By: quark-zju

Differential Revision: D54391157

fbshipit-source-id: e4f88aaac2d8564967b27b904f23b0b9b308ee00
2024-03-01 11:50:14 -08:00
Pierre Chevalier
05c8e3fa70 scs: support any derived data types
Summary:
Use the new thrift `DerivedDataType` enum which is tied to derived_data_manager to ensure it stays in sync.

It is forward compatible with the old type (only adding enum variants), so it is safe to do.

Reviewed By: markbt

Differential Revision: D54311642

fbshipit-source-id: 2900f9045e8d1c1992be4fd299f540a434bb21d0
2024-03-01 10:22:55 -08:00
Pierre Chevalier
f7c17b4643 derived data: Add canonical thrift struct for DerivedDataType
Summary:
This thrift enum will be used to interact with derived data over services boundaries.

It can be used in SCS, replacing [this partial one](https://www.internalfb.com/code/fbsource/[71db333aa4d373073b3c7592cb272c1215b8edd1]/fbcode/eden/mononoke/scs/if/source_control.thrift?lines=1069).

It can also be used in the derived data service, replacing [this "stringly typed" one](https://www.internalfb.com/code/fbsource/[71db333aa4d373073b3c7592cb272c1215b8edd1]/fbcode/eden/mononoke/derived_data/remote/if/derived_data_service.thrift?lines=17)

These changes will come if future diffs to safely respect thrift backward compatibility needs.

Reviewed By: markbt

Differential Revision: D54304252

fbshipit-source-id: 0e0b754773fac680726eb21ef29a86120cf4b166
2024-03-01 10:22:55 -08:00
Saul Gutierrez
2ed99f4958 tests: add make opt-non-debugruntest tests properly read from features
Summary: Various tests were failing when running them wiht `opt` mode on Buck since the `features.py` file was not properly read, which in turn caused various kinds of errors including allowing using rev numbers as valid revsets

Reviewed By: muirdm

Differential Revision: D54392948

fbshipit-source-id: 1008fc258a662791bb753371f6119bf27cd9f68f
2024-03-01 08:16:45 -08:00
Zhaolong Zhu
75186245ca mdiff: remove experimental.xdiff config and related code
Summary:
we have enabled xdiff for 5+ years, let's remove the experimental.xdiff
config

Reviewed By: quark-zju

Differential Revision: D54324349

fbshipit-source-id: e058bd77c8c48c2e809a4ea4649d1a3ccb2d53e7
2024-03-01 07:04:40 -08:00
Liubov Dmitrieva
9b5289c0fd annotate bookmarks queries with e2e telemetry
Summary:
annotate bookmarks queries with e2e telemetry

**e2e telemetry: after this change annotation coverage will be:**

repo_attributes/commit_graph: **100%**
mercurial/mutation:  **100%**
bonsai_hg_mapping:  **100%**
phases/sqlphases:  **100%**
bookmarks/dbbookmarks: **(store.rs only at 100%)**
changesets/changesets_impl (partial)

Reviewed By: mzr

Differential Revision: D54414445

fbshipit-source-id: 26f11bf9a740c131be1e45a683d3e3f0b75169a5
2024-03-01 06:55:56 -08:00
Liubov Dmitrieva
e5ef787385 introduce "maybe_traced_query" and "traced_query_with_transaction" variants to avoid code duplication in our crates into the mononoke_queries
Summary:
introduce **maybe_traced_query** and **traced_query_with_transaction** variants to avoid code duplication in our crates

remove **ALL** the occurrences of the code duplication created to facilitate the traced queries

added a few missing annotations for commit graph related queries

the remaining uncovered queries are now limited to the following list of files:

```
liubovd ️  ~/fbsource/fbcode/eden/mononoke
 [26] → rg "::query" | grep -v sql_ext | grep -v maybe_traced |awk '{print $1}' | uniq
segmented_changelog/src/version_store.rs:
segmented_changelog/src/clone_hints.rs:
segmented_changelog/src/idmap/sql.rs:
walker/src/detail/checkpoint.rs:
newfilenodes/src/writer.rs:
newfilenodes/src/reader.rs:
git_symbolic_refs/src/sql.rs:
newfilenodes/src/test/test_reader.rs:
blobstore_sync_queue/src/write_ahead_log.rs:
repo_client/streaming_clone/src/lib.rs:
repo_client/repo_read_write_status/src/lib.rs:
repo_attributes/deletion_log/src/lib.rs:
commit_rewriting/synced_commit_mapping/src/lib.rs:
repo_attributes/bonsai_blob_mapping/src/lib.rs:
repo_attributes/repo_sparse_profiles/src/lib.rs:
repo_attributes/repo_lock/src/lib.rs:
tools/admin/src/commands/commit_graph/checkpoints.rs:
pushrebase_mutation_mapping/src/sql_queries.rs:
mutable_counters/src/lib.rs:
mutable_renames/src/lib.rs:
megarepo_api/requests_table/src/store.rs:
changesets/changesets_impl/src/sql.rs:
bookmarks/dbbookmarks/src/transaction.rs:
blobstore/ephemeral_blobstore/src/store.rs:
bookmarks/dbbookmarks/src/subscription.rs:
bookmarks/dbbookmarks/src/store.rs:
blobstore/ephemeral_blobstore/src/changesets.rs:
blobstore/sqlblob/src/store.rs:
bonsai_globalrev_mapping/src/sql.rs:
bookmarks/warm_bookmarks_cache/lib.rs:
bonsai_svnrev_mapping/src/sql.rs:
megarepo_api/mapping/src/lib.rs:
bonsai_tag_mapping/src/sql.rs:
bonsai_git_mapping/src/sql.rs:
```

while the following crates have annotated queries

* repo_attributes/commit_graph: **100%**
* mercurial/mutation:  **100%**
* bonsai_hg_mapping:  **100%**
* phases/sqlphases:  **100%**
* changesets/changesets_impl (partial)

Reviewed By: mzr

Differential Revision: D54413980

fbshipit-source-id: 2109d43e7768c9f4ee233d20cbe60684a563bd7e
2024-03-01 06:55:56 -08:00
Liubov Dmitrieva
3436793a37 complete annotation for bonsai <=> hg mapping queries with e2e
Summary:
complete annotation for bonsai <=> hg mapping queries with e2e
telemetry

we have already covered queries to translate from bonsai to hg, here we are
covering the opposite queries

Reviewed By: mzr

Differential Revision: D54412246

fbshipit-source-id: 3de3bccce9c203facf131fdbe0dedc8a3731c893
2024-03-01 06:55:56 -08:00
Liubov Dmitrieva
724c1421c4 instrument mutation queries with SQL perf counters
Summary:
instrument mutation queries with SQL perf counters

this will give us correct scuba logging

increment counters before sql queries

==== this is a sev follow up task ====

Reviewed By: markbt

Differential Revision: D54362984

fbshipit-source-id: 898df4b53faec650385e0b20b045023f087186cd
2024-03-01 03:16:12 -08:00
John Elliott
bb37cf9419 Move SystemError from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves SystemError from eden to edencommon.

Reviewed By: MichaelCuevas

Differential Revision: D54343729

fbshipit-source-id: 7861e3effc9d242fbeda34333078c14c4d021a80
2024-02-29 21:00:21 -08:00
John Elliott
daad993aaa Move Utf8 from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves Utf8 from eden to edencommon.

Reviewed By: fanzeyi

Differential Revision: D54341648

fbshipit-source-id: b1461a7f92963100914733d69de6eb574af3e1f9
2024-02-29 21:00:21 -08:00
John Elliott
48927b980c Move String from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves String from eden to edencommon.

Reviewed By: fanzeyi

Differential Revision: D54341192

fbshipit-source-id: 8f0763313e5585efeb336038f41c646d84986ec3
2024-02-29 21:00:21 -08:00
Jun Wu
13a0b1a8e4 identity: move "SL_GIT" ident to outside "all()"
Summary:
The "SL_GIT" ident is only used by "sniff_dir". Other references of "all()"
expect different user identities. Move it to only affect "sniff_dir" to
reduce overhead.

Reviewed By: muirdm

Differential Revision: D54218753

fbshipit-source-id: dddc796e46738839fb2c6c17051c7a082fe7d6cc
2024-02-29 18:46:19 -08:00
Jun Wu
c483f72f85 identity: require sl identity for .git/sl compatibility
Summary:
Forbid `hg` from working in `.git`. This avoids breaking potential automation
expectations that `hg root` will fail in a Git repo.

Reviewed By: muirdm

Differential Revision: D54218731

fbshipit-source-id: f289611bd3170cec84991de1691e819f61f9f6da
2024-02-29 18:46:19 -08:00
Jun Wu
90f6468dd2 identity: add SL_GIT identity
Summary: This is similar to `SL` but the dot dir is "git/sl".

Reviewed By: muirdm

Differential Revision: D54218769

fbshipit-source-id: 8ef76a46dbb6c5a180b1d0f3550e7aac81f987cc
2024-02-29 18:46:19 -08:00
Jun Wu
d294a7070a identity: use references to reduce struct size
Summary:
Reduces size of `Identity` from 216 bytes to 16 bytes so copy is more
efficient.

Reviewed By: muirdm

Differential Revision: D54218748

fbshipit-source-id: 73be754c4bd5002e6f63c5e2628c370a6c0e388f
2024-02-29 18:46:19 -08:00
Jun Wu
5e9582a609 identity: add sniff_root priority and alternative sniff_dot_dir
Summary:
To prepare `.git/sl` setup:
- Sniff uses `.git/` but the "dot dir" is `.git/sl`.
- When both `a/b/.git` and `a/.sl` exist, pick `a/.sl`.

Reviewed By: muirdm

Differential Revision: D54218758

fbshipit-source-id: dd7da42b492557bfa1117013ce197401e4272cfb
2024-02-29 18:46:19 -08:00
Jun Wu
0b1d51b250 metalog: add "parent" API
Summary: Provide the "parent" which can be useful to detect changes.

Reviewed By: muirdm

Differential Revision: D54201002

fbshipit-source-id: c0139cca29a2cd683d273423fdd6d0d0b3aec35d
2024-02-29 18:46:19 -08:00
Jun Wu
f69a6ef2de TypedEventEmitter: update emit fuction signature
Summary:
Somehow I cannot typecheck progress data with the union type:

    const onProgress = (progress: OperationProgress) => {
      // progressEmitter is TypedEventEmitter<'progress', OperationProgress>
      this.progressEmitter.emit('progress', progress);
                                ^^^^^^^^^^^^^^^^^^^^
    };

Error:

    Argument of type '["progress", OperationProgress]' is not assignable to parameter of type '[event: "error", data: Error] | [event: "progress", data: { id: string; kind: "queue"; queue: string[]; }] | [event: "progress", data: { id: string; kind: "spawn"; queue: string[]; }] | [event: "progress", data: { id: string; kind: "stderr"; message: string; }] | ... 5 more ... | [event: ...]'.
    Type '["progress", OperationProgress]' is not assignable to type '[event: "progress", data: { id: string; kind: "queue"; queue: string[]; }] | [event: "progress", data: { id: string; kind: "spawn"; queue: string[]; }] | [event: "progress", data: { id: string; kind: "stderr"; message: string; }] | [event: "progress", data: { ...; }] | ... 4 more ... | [event: ...]'.
    Type '["progress", OperationProgress]' is not assignable to type '[event: "progress", data: { id: string; kind: "forgot"; }]'.
      Type at position 1 in source is not compatible with type at position 1 in target.
        Type 'OperationProgress' is not assignable to type '{ id: string; kind: "forgot"; }'.
          Type '{ id: string; kind: "queue"; queue: string[]; }' is not assignable to type '{ id: string; kind: "forgot"; }'.
            Types of property 'kind' are incompatible.
              Type '"queue"' is not assignable to type '"forgot"'.ts(2345)

This diff changes the signature to make it easier for tsc to understand.

Reviewed By: evangrayk

Differential Revision: D54364589

fbshipit-source-id: 841dd82449d1b21a2287b3a36b755b081094280d
2024-02-29 18:26:28 -08:00
John Elliott
06758c87fb Move Memory from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves Memory from eden to edencommon.

Reviewed By: fanzeyi

Differential Revision: D54340336

fbshipit-source-id: cd209be7f39452123ffc41312cf370a48e4923bc
2024-02-29 16:32:49 -08:00
John Elliott
dcb1388959 Move CaseSenstivity from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves CaseSensitvity from eden to edencommon.

Reviewed By: fanzeyi

Differential Revision: D54339283

fbshipit-source-id: f96a421f4390578e5d2281b307532c62e22935d3
2024-02-29 16:32:49 -08:00