-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Files imported from F5 tests are loaded twice on Windows (once via 'C:\', once via 'c:\') #58388
Comments
@isidorn drive letter casing differences should never result in non-matching files! |
For a work around, if you pass the paths in your launch.json explicitly as absolute paths, and lower case the drive letter, you'll be able to execute the tests. |
Surprisingly, that doesn't work:
-> C: ended up as c:, so tried to load "c:/Repos/vscode-docker..." |
As I mentioned; lower case the drive letter in your launch.json; that's unblocked me. |
You're right, I misinterpreted which way to convert. That'll work as a temporary work-around, thanks. |
Setting |
I believe thie issue is because of microsoft/vscode#58388 and the previous workaround should fix this.
I believe thie issue is because of microsoft/vscode#58388 and the previous workaround should fix this.
Ok, after some analysis it seems the issue is that the We have not changed anything in how we handle source files in debug land which would break this. @StephenWeatherford following your steps I get a weird error. Are there some other prerequests that I should setup for this to work @DanTup your test from the other issue fail for me both on mac and windows. Shouldn't it work on mac? |
I'm not aware of "outFiles" changed in node-debug or node-debug2. |
I'd hope that the outcome of the move towards URIs is that URI comparisons are more lenient... |
Which test do you mean? I forced the drive letter to lowercase in my test script (see Dart-Code/Dart-Code@11a6f5e) and a bunch of my Windows issues linked here went away. What was the error you saw? |
@isidorn No, no other requirements. The tests won't fully pass without docker installed, but you should be able to get far enough to verify the problem (just tried this on my home machine without docker). Can you not open the test\test.code-workspace workspace in vscode? |
@DanTup I mean following your steps from here #58815 (comment) |
FYI, when I did my original investigation if I remember correctly I believe the earlier vscode ended up with paths where the casing matched, whereas with the newer vscode they didn't. I.e., I'm not sure that the comparison logic changed, but rather that the path casings being passed in to load module changed (the ones brought in by Mocha and the ones brought in by vscode). |
So you cloned that repro and ran the test on macOS but it failed? You didn't get the same result as my screenshot in that comment? 🤔 I can't explain that - it passes here on macOS, fails on Windows, but if I change Note: I'm testing with Stable, as Insiders seems broken (fails at startup complaining about merge-conflict extension not being found?). |
@StephenWeatherford @DanTup I pushed a potential fix for this. Can you please try with latest insiders and let me know if it still repros. The latest insiders should not fail at startup. |
Still repros on "1.28.0-insider (user setup), Commit: 2558a72" |
Weirdly, I have another machine where I am seeing this same issue from the command line (i.e. not F5), which runs tests like this (non-insiders 1.27.2): "scripts": { I don't know what the difference between the two machines is. On the other one, npm test from command line always succeeds. |
Given you have a relative path, may it depend on the casing of the drive letter in the current working directory when that command is executed? If you added |
Machine where it succeeds: C:\Repos\vscode-docker So how is this supposed to work? I'm assuming the module loading code of treating files including drive names as case-sensitive is the desired behavior and shouldn't be changed, right? Again, I'm pretty sure this was a change in behavior between vscode 1.26.1 and 1.27.x. I'm willing to go back to 1.26.1 to verify. |
@isidorn @bpasero we must fix this: the drive letter casing should not affect the path matching in VS Code. We need a way to avoid opening files twice if the drive letter case differs. This is not rocket science! @isidorn I suggest that you first verify that this happens when a DA returns stopped events with a "source" value that differs in drive letter casing. If you can verify this -- and only then -- you should fix this in VS Code (because drive letter casing consistency is not part of the DAP specification). |
The issue with showing multiple sources with different casing is already fixed via a commit I pusehd 7 days ago which stores sources independent on casing unless on linux The reason why tests were failing in this issue is that with the URI refactoring the extensionDevelopmentPath would be upper cased. Which @aeschli and me fixed via cec1733 As for comparing uris in workbench and case sensitivity here's the issue tracking that #12448 |
Sorry for the delay in responding, I've been OOO. I've testd both my simple logging sample from above and also #57513 and the issue is resolved for me, it's behaving as it used to 👍 |
@DanTup thanks for letting us know. |
Works for me, too. Thanks! |
Issue Type: Bug
NOTE: This did not repro in 1.26.1
This is causing issues because I end up with multiple versions of module variables.
console.error('ext loaded');
// tslint:disable-next-line:no-debugger
debugger;
!) the breakpoint is hit twice
!) If you let the test continue, it fails with "Extension not activated", which is a direct result of having two different version of 'extensionVariables.ts' loaded.
If you check the callstack from Module._compile on the breakpoint, you'll see that
First call:
id starts with "C:" (this is the path given to Mocha by the testrunner using glob
Second call:
id starts with "c:"
Therefore the cached version is not returned.
VS Code version: Code 1.27.1 (5944e81, 2018-09-06T09:21:18.328Z)
OS version: Windows_NT x64 10.0.17134
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (24)
The text was updated successfully, but these errors were encountered: