-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow][refactor] Separate out export_search_types from export_search
Summary: The goal is to make autocomplete work in try-flow. Auto imports search, which depends on some C++ code, absolutely won't work in browser, so in this diff we did some work to separate that out. We split export search into the search parts and the types of the results. Later, we can make autocompleteService with configuration auto-import behavior only depend on export_search_types Changelog: [internal] Reviewed By: panagosg7 Differential Revision: D55548909 fbshipit-source-id: c4f1f950ef5c06d30f47ea6d5442b321876e577d
- Loading branch information
1 parent
a195349
commit 9f3a9de
Showing
8 changed files
with
45 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
open OUnit2 | ||
open Export_search | ||
open Export_search_types | ||
|
||
let default_type = Export_index.DefaultType | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(library | ||
(name flow_search_types) | ||
(wrapped false) | ||
(libraries | ||
flow_index) | ||
(preprocess | ||
(pps ppx_deriving.std))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*) | ||
|
||
type search_result = { | ||
name: string; | ||
source: Export_index.source; | ||
kind: Export_index.kind; | ||
} | ||
[@@deriving show] | ||
|
||
type search_result_scored = { | ||
search_result: search_result; | ||
score: int; | ||
weight: int; | ||
} | ||
[@@deriving show] | ||
|
||
type search_results = { | ||
results: search_result_scored list; | ||
is_incomplete: bool; | ||
} | ||
[@@deriving show] |