Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

itertools = 0.9, fst = 0.4 #1729

Merged
merged 1 commit into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 26 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ test = false
path = "rls/src/main.rs"

[dependencies]
rls-analysis = "0.18.1"
# FIXME: Release rls-analysis 0.18.2 to crates.io
rls-analysis = { version = "0.18.2", path = "rls-analysis" }
rls-data = "0.19"
# FIXME: Release rls-rustc 0.6.0 to crates.io
rls-rustc = { version = "0.6.0", path = "rls-rustc" }
Expand All @@ -36,7 +37,7 @@ cargo_metadata = "0.8"
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "7ea7cd165ad6705603852771bf82cc2fd6560db5", optional = true }
env_logger = "0.7"
home = "0.5.1"
itertools = "0.8"
itertools = "0.9"
jsonrpc-core = "17"
lsp-types = { version = "0.60", features = ["proposed"] }
lazy_static = "1"
Expand Down
6 changes: 3 additions & 3 deletions rls-analysis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rls-analysis"
version = "0.18.1"
version = "0.18.2"
edition = "2018"
authors = ["Nick Cameron <ncameron@mozilla.com>"]
description = "Library for processing rustc's save-analysis data for the RLS"
Expand All @@ -21,8 +21,8 @@ log = "0.4"
rls-data = "= 0.19"
rls-span = "0.5.2"
derive-new = "0.5"
fst = { version = "0.3", default-features = false }
itertools = "0.8"
fst = { version = "0.4", default-features = false }
itertools = "0.9"
json = "0.12"
serde = "1.0"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion rls-analysis/src/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub struct PerCrateAnalysis {

// Index of all symbols that powers the search.
// See `SymbolQuery`.
pub def_fst: fst::Map,
pub def_fst: fst::Map<Vec<u8>>,
pub def_fst_values: Vec<Vec<Id>>,

pub ref_spans: HashMap<Id, Vec<Span>>,
Expand Down
2 changes: 1 addition & 1 deletion rls-analysis/src/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ fn abs_ref_id<L: AnalysisLoader>(
None
}

fn build_index(mut defs: Vec<(String, Id)>) -> (fst::Map, Vec<Vec<Id>>) {
fn build_index(mut defs: Vec<(String, Id)>) -> (fst::Map<Vec<u8>>, Vec<Vec<Id>>) {
defs.sort_by(|(n1, _), (n2, _)| n1.cmp(n2));
let by_name = defs.into_iter().group_by(|(n, _)| n.clone());

Expand Down
2 changes: 1 addition & 1 deletion rls-analysis/src/symbol_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl SymbolQuery {

pub(crate) fn build_stream<'a, I>(&'a self, fsts: I) -> fst::map::Union<'a>
where
I: Iterator<Item = &'a fst::Map>,
I: Iterator<Item = &'a fst::Map<Vec<u8>>>,
{
let mut stream = fst::map::OpBuilder::new();
let automaton = QueryAutomaton { query: &self.query_string, mode: self.mode };
Expand Down