Skip to content

Commit

Permalink
Merge pull request #791 from tweag/fix/lsp-freeze
Browse files Browse the repository at this point in the history
[Fix] LSP freezing on some commands
  • Loading branch information
yannham committed Aug 4, 2022
1 parent ae2f443 commit c10794c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions lsp/nls/src/linearization/completed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ impl Completed {
) -> Vec<&LinearizationItem<Resolved>> {
let empty = Vec::with_capacity(0);
(0..scope.len())
.flat_map(|end| {
eprintln!("in scope {:?}: {:?}", scope, self.scope.get(scope));
self.scope.get(&scope[..=end]).unwrap_or(&empty)
})
.flat_map(|end| self.scope.get(&scope[..=end]).unwrap_or(&empty))
.map(|id| self.get_item(*id))
.flatten()
.collect()
Expand Down
2 changes: 0 additions & 2 deletions lsp/nls/src/linearization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,6 @@ impl Linearizer for AnalysisHost {
)
.collect();

eprintln!("Linearized {:#?}", &lin_);

Linearization::new(Completed::new(lin_, scope, id_mapping))
}

Expand Down

0 comments on commit c10794c

Please sign in to comment.