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

Wrong Path of Files Listed Under "Problems" Tab #156720

Open
mavigozler opened this issue Jul 30, 2022 · 3 comments
Open

Wrong Path of Files Listed Under "Problems" Tab #156720

mavigozler opened this issue Jul 30, 2022 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues terminal Integrated terminal issues
Milestone

Comments

@mavigozler
Copy link

mavigozler commented Jul 30, 2022

Issue Type: Bug

All extensions temporarily disabled.

I have .ts files in two locations of project. Relative to tsconfig.json file, one folder is "./src", the other is "./SPREST/src". The root path is "d:\dev\SharePoint\SPTools" (this fact is important in the issue). The latter folder was created with 'git submodule add '. I do a build with the default task, created with Configure Default Build Task. The tsc runs correctly, pointing to the tsconfig.json file. The compiler finds the errors and lists them under "Problems" as expected.

When I try to click open the file that has the errors, the path is all wrong. Suppose the actual path to the source file is "d:\dev\SharePoint\SPTools\SPREST\src\SPListREST.ts". Hovering over the file name under Problems tab brings up the tool tip: "d:\dev\SharePoint\SPTools\SharePoint\SPTools\SPREST\src\SPListREST.ts" and clicking on it says brings up a "File is not found. Create the file?" Note that part of the path is duplicated "\SharePoint\SPTools" and I have not observed this before in working with VSCode ever.

VS Code version: Code 1.69.2 (3b889b0, 2022-07-18T16:12:52.460Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 x 1190)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 11.82GB (2.88GB free)
Process Argv --crash-reporter-id 72770bc9-9704-4ad5-8690-6709345d0a89
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
pylanb8912:30529769
vsclangdf:30486550
c4g48928:30535728

@mavigozler
Copy link
Author

mavigozler commented Jul 31, 2022

More useful information

  1. Closing and re-opening the workspace several times does not resolve the issue.
  2. Closing and re-opening VSC several times does not resolve the issue.
  3. I checked other workspaces (projects), and same thing is happening.

Here is what is happening.

  • I can introduce a syntax/coding error purposely a ts file
  • This immediately is identified under "Problems". This error can be clicked, and it moves editor in view to line in open source file.
  • If the error is corrected immediately, the error under "Problems" goes away
    All the above is expected behavior

Now for the unexpected behavior:

  • I put in the error again in the source file and save and close the ts file

  • I then perform a tsconfig build (task created by VSC in tasks.json using Configure Default Build Task)

  • The error is in the tsc terminal output, identifying line and showing the customary. An error appears under "Problems" tab. Clicking on that error leads to the report that the file is not found. The file is there and can be opened from Explorer panel. Even with the file opened from Explorer, the link to the "Problems" remains: the path has a duplicated partial string inserted in the path that would open the file.

  • At a single place in the ts source, a random typing of characters is inserted in a parameter of a function (Line 2071): this creates 5 errors immediately under "Problems" panel

  • Without closing the ts file, the Default Build Task above is run. The "Problems" panel not only has the 5 original errors, with clickable links that go directly to line in the open source file, It has added after the build a file entry which is the same file, a single error pointing to Line 2071, and the link is not clickable because it has an errant path in the link. This is circled in yellow in the image.

  • When the random string is removed to correct the error at Line 2071, the 5 errors under "Problems" disappear. The 1 error that was produced by the Build Task remains. It does not disappear until the Build Task is run again, and that build is error free. I am unaware if this is documented behavior.

image

@mavigozler
Copy link
Author

Additional follow-up

It occurs to me that I made a change recently. I am trying to use PowerShell at the default terminal for several reasons, especially to run builds to immediate testing, which means I switch from using the cmd shell

When I switched back to cmd as the default terminal, all the problems with Problem panel went away. Errors were correctly identified and their links clickable because the path was not in error.

Thus this seems to be an issue related to use of PowerShell (7.2). (I have not tested an earlier version 5.x)

I am returning to use of cmd as the default.

@sandy081
Copy link
Member

sandy081 commented Aug 3, 2022

@meganrogge / @mjbvz Problems tab just shows the problems generated by the extension or task. Source of these errors could be typescript extension or task. I think this is an issue in the source of generation that the paths are not set correctly. Hence moving it back to you.

@sandy081 sandy081 assigned mjbvz and meganrogge and unassigned sandy081 Aug 3, 2022
@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug tasks Task system issues terminal Integrated terminal issues confirmation-pending labels Aug 3, 2022
@meganrogge meganrogge added this to the Backlog milestone Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

4 participants