-
Notifications
You must be signed in to change notification settings - Fork 4.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
InMemoryDirectoryInfo is unexpectedly dependent on working directory due to its use of GetFullPath. #50648
Comments
Tagging subscribers to this area: @maryamariyan, @carlossanlop Issue DetailsFrom the This test fails all Windows arm64 runs (including JITMinOpts=1), with:
|
Marking codegen for now |
Tagging subscribers to this area: @maryamariyan, @carlossanlop Issue DetailsFrom the This test fails all Windows arm64 runs (including JITMinOpts=1), with:
|
|
Looks like @jozkee might be out, I can submit a fix. |
Here's the bug: runtime/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs Lines 54 to 57 in 82ca681
Here's the docs: runtime/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs Lines 21 to 26 in 82ca681
But that call to GetFullPath isn't prepending |
There are two other places where this is happening in the same type: runtime/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs Line 140 in aa235f8
runtime/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs Line 152 in aa235f8
It feels very wrong for these to be dependent upon the working directory, but we could be misunderstanding the purpose of this type... Maybe it's just that the comment was wrong. @BrennanConroy can you let us know what's expected here? Looks like its been this way since aspnet/FileSystem@767f07f |
This needs to stay open to track the actual failure. |
I don't really remember. I assume it should be checking if the file is absolute and if not adding |
Assuming that we could change InMemoryDirectoryInfo to no longer depend on I guess we could prefix a dummy/hardcoded root. e.g: var imdi = new InMemoryDirectoryInfo(@".", files: null);
Console.WriteLine(imdi.FullName); // Prints "C:\"
imdi = new InMemoryDirectoryInfo(@"myDirectory", files: null);
Console.WriteLine(imdi.FullName); // Prints "C:\myDirectory" |
What does existing usage expect? What if we didn’t remove usage of |
@jozkee @carlossanlop were you able to identify the source of the problem? Is this a product bug and we should fix it in 6.0? Or a flaky test and 7.0 should be fine? |
Will try to fix this in 6.0 |
We have moved it to 7.0 based on offline conversation |
Here are the symptoms of usage: basically because of runtime/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs Line 78 in 52806bc
it's empty |
From the
runtime-coreclr libraries-jitstress
pipeline:https://dev.azure.com/dnceng/public/_build/results?buildId=1069450&view=ms.vss-test-web.build-test-results-tab
This test fails all Windows arm64 runs (including JITMinOpts=1), with:
The text was updated successfully, but these errors were encountered: