Skip to content
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

Support relative paths in output and repl #6217

Closed
joebehymer opened this issue May 9, 2016 · 11 comments
Closed

Support relative paths in output and repl #6217

joebehymer opened this issue May 9, 2016 · 11 comments
Assignees
Labels
tasks Task system issues
Milestone

Comments

@joebehymer
Copy link

  • VSCode Version: 1.0
  • OS Version: OSX Yosemite

Steps to Reproduce:

  1. Setup project with task runner that outputs tsc output to Output window with TSC 1.6. Notice it uses full path names and you can click on a path to go to the file.
  2. Upgrade project to TSC 1.8. It now uses relative file paths and you can't click on them anymore.

with TypeScript 1.6 (working):http://imgur.com/sIQLu8I
with TypeScript 1.8 (broken): http://imgur.com/qePitPw

I have a pretty vanilla tasks.json that calls grunt (which uses grunt-ts). The output seems to match line 80 here, yet I can't click the lines to navigate. I believe this is because of a recent tsc version update to 1.8, and I downgraded back to 1.6 to verify.

@isidorn
Copy link
Contributor

isidorn commented May 9, 2016

I think this is just how our path detection works, and the new paths are not detected. @bpasero ?

@bpasero
Copy link
Member

bpasero commented May 10, 2016

Yes, for output and repl we only detect absolute paths as links:

https://github.com/Microsoft/vscode/blob/ben/stacks/src/vs/workbench/parts/output/common/outputWorker.ts#L73
https://github.com/Microsoft/vscode/blob/ben/stacks/src/vs/workbench/parts/debug/browser/replViewer.ts#L97

Maybe we should revisit this though. The reason we pick absolute paths is to have less false positives but maybe when we include the full error pattern (line:column) we will not get false positives even if we support relative paths.

The downside is that we always need to root relative paths to the workspace path and that might be a wrong assumption.

@bpasero bpasero added the feature-request Request for new features or functionality label May 10, 2016
@bpasero bpasero added this to the Backlog milestone May 10, 2016
@bpasero bpasero changed the title Clicking file path in Output window to navigate to file broken with TSC 1.8 Support relative paths in output and repl May 10, 2016
@jhasse
Copy link
Contributor

jhasse commented May 10, 2016

Wouldn't it be possible to use the problemMatcher also for the clickable links?

@bpasero
Copy link
Member

bpasero commented May 10, 2016

Yes, I think bringing in support for using problem matcher patterns is a good idea.

@joebehymer
Copy link
Author

I appreciate the general fix to this is to support relative paths, and additional support for problem matchers would be awesome (I did try it!).

I hope that the fact that this is not a general language problem but a TypeScript problem should influence it's priority. Heck, you guys are using TS 1.8 in vscode itself, do you not miss these? Or maybe you never have any errors :)

@bpasero bpasero removed their assignment Aug 17, 2016
@joebehymer
Copy link
Author

With the release of VSC 1.6, that ships with TS 2.0, a lot of people are going to run into this more often now, trying to hook up things to work with strictNullChecks. I know I am.

How I wish I could click on these...

test/spec/core/util/testUtils.ts(95,50): error TS2345: Argument of type 'null' is not assignable to parameter of type 'NotificationInteropProvider'.
test/spec/core/util/testUtils.ts(96,51): error TS2345: Argument of type 'null' is not assignable to parameter of type 'FeatureToggleInteropProvider'.
>> 309 non-emit-preventing type warnings  

@ramya-rao-a
Copy link
Contributor

@joebehymer You can now configure your tasks to send output to the integrated terminal which supports links on relative paths.

https://code.visualstudio.com/updates/v1_9#_task-execution-in-terminal

@jhasse
Copy link
Contributor

jhasse commented Mar 29, 2017

The problem is, that this ignores the the directory specified in the problemMatcher:

"fileLocation": ["relative", "${workspaceRoot}/build/"],

So all of my links which are starting with ../ don't work.

@ramya-rao-a
Copy link
Contributor

cc @Tyriar our terminal expert

@Tyriar Tyriar added the tasks Task system issues label Mar 29, 2017
@dbaeumer
Copy link
Member

We are working on supporting problem matchers in the terminal which then will take the fileLocation into consideration.

@dbaeumer
Copy link
Member

Marking as dup of #21928 since there is no link matching planned in the old output runner.

@dbaeumer dbaeumer removed the feature-request Request for new features or functionality label Nov 10, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tasks Task system issues
Projects
None yet
Development

No branches or pull requests

7 participants