Skip to content

Make error lines match the original file #9984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 7, 2020
Merged

Conversation

rchiodo
Copy link

@rchiodo rchiodo commented Feb 7, 2020

For #6370

Also made the error lines clickable so the user could just jump to the file. Only works on the original file though.

@codecov-io
Copy link

codecov-io commented Feb 7, 2020

Codecov Report

Merging #9984 into master will decrease coverage by 0.01%.
The diff coverage is 84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9984      +/-   ##
==========================================
- Coverage    61.2%   61.18%   -0.02%     
==========================================
  Files         564      564              
  Lines       30078    30133      +55     
  Branches     4550     4558       +8     
==========================================
+ Hits        18408    18436      +28     
- Misses      10640    10666      +26     
- Partials     1030     1031       +1
Impacted Files Coverage Δ
src/client/common/platform/types.ts 100% <ø> (ø) ⬆️
src/client/common/platform/fileSystem.ts 75.43% <0%> (-0.66%) ⬇️
src/client/datascience/jupyter/jupyterNotebook.ts 4.56% <100%> (ø) ⬆️
src/client/datascience/jupyter/jupyterUtils.ts 77.5% <90.9%> (+16.38%) ⬆️
src/client/common/contextKey.ts 77.77% <0%> (-22.23%) ⬇️
.../client/datascience/context/activeEditorContext.ts 19.04% <0%> (-10.12%) ⬇️
src/client/interpreter/activation/service.ts 84.93% <0%> (-1.84%) ⬇️
src/client/datascience/webViewHost.ts 60.83% <0%> (-0.87%) ⬇️
...ient/datascience/interactive-ipynb/nativeEditor.ts 56.98% <0%> (ø) ⬆️
.../datascience/interactive-common/interactiveBase.ts 16.96% <0%> (ø) ⬆️
... and 4 more

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 185d9e2...6ce12c1. Read the comment docs.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 1 Security Hotspot to review)
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rchiodo rchiodo merged commit 7c40f2c into master Feb 7, 2020
@rchiodo rchiodo deleted the rchiodo/error_lines branch February 7, 2020 21:57
// Special case file URIs
const href = payload.toString();
if (href.startsWith('file')) {
this.openFile(href);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path is all links from interactive window output I believe. Any possible reason why a notebook would want to be using a file:/// link? Like a notebook that builds a local html file that you then want to view in the browser?

Like someone trying to do this:
https://stackoverflow.com/questions/51851217/how-to-create-a-table-with-clickable-hyperlink-to-a-local-file-in-pandas-jupyt
Seems like it's maybe not a thing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you're asking? file: links worked before, I just intercepted them to handle the line number stuff (oh and make sure the reuse the open editor)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I was trying to check was something like this in a cell:
from IPython.display import display, HTML
display(HTML('test'))
This used to route to applicationShell.openUrl

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry wrong paste:

from IPython.display import display, HTML
display(HTML('<a href="file://D/test.txt">test</a>'))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently with file:///D:/test.text this will open the file up. Now it will try to find a vs code editor

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah and if that editor doesn't exist, it will behave like it did before? Still not sure what the concern is?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That users want to open a new file instead of the existing one?

@lock lock bot locked as resolved and limited conversation to collaborators Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants