Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Handle Diagnostics without file #243

Merged
merged 3 commits into from
May 9, 2017
Merged

Conversation

felixfbecker
Copy link
Contributor

@felixfbecker felixfbecker commented May 8, 2017

Closes #239

@tomv564 does this fix it?

@codecov
Copy link

codecov bot commented May 8, 2017

Codecov Report

Merging #243 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #243      +/-   ##
==========================================
+ Coverage    58.4%   58.42%   +0.02%     
==========================================
  Files          13       13              
  Lines        1986     1987       +1     
  Branches      321      321              
==========================================
+ Hits         1160     1161       +1     
  Misses        699      699              
  Partials      127      127
Impacted Files Coverage Δ
src/typescript-service.ts 76.21% <100%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a590aa1...c415085. Read the comment docs.

@tomv564
Copy link
Contributor

tomv564 commented May 8, 2017

This looks correct, but I am not able to do the branch gymnastics to test it for you :)
Could consider adding a reference to the GH issue so a future developer may remove the comment if the type is fixed.

@felixfbecker
Copy link
Contributor Author

Okay, will merge in once you give green light this fixes your issue (I don't have a way to repro)

@tomv564
Copy link
Contributor

tomv564 commented May 9, 2017

The issue occurs for me as soon as I call didOpen on typescript-service.ts in this project:

ERROR Handle textDocumentDidOpen: TypeError: Cannot read property 'getLineAndCharacterOfPosition' of undefined
   at convertTsDiagnostic (/Users/tomv/Projects/sourcegraph/javascript-typescript-langserver/lib/diagnostics.js:12:35)
  ...

I can confirm your code fixes it! :shipit:

@felixfbecker felixfbecker merged commit 3b771c1 into master May 9, 2017
@felixfbecker felixfbecker deleted the handle-project-diagnostics branch May 9, 2017 07:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to handle diagnostics without file field
2 participants