Skip to content

Conversation

@thaystg
Copy link
Member

@thaystg thaystg commented Aug 24, 2022

The test case does not simulate the real case from blazor, but I added it anyway.

From blaze we receive from the loaded_files variable file names like this:
http://localhost:5168/_framework/%E3%84%A8U1U2U3.Shared.dll
Then we need to convert to: http://localhost:5168/_framework/ㄨU1U2U3.Shared.dll to find it in our assemblies by name.

In the debugger-tests in the mono-config.json, the file name is like this, we add and search with this name, so we don't need the UnescapeDataString.

{
      "behavior": "assembly",
      "name": "debugger-test-chinese-char-in-path-\u3128.dll"
}

@thaystg thaystg requested a review from radical as a code owner August 24, 2022 18:26
@ghost ghost added the area-Debugger-mono label Aug 24, 2022
@ghost ghost assigned thaystg Aug 24, 2022
@ghost
Copy link

ghost commented Aug 24, 2022

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details

The test case does not simulate the real case from blazor, but I added it anyway.

From blaze we receive from the loaded_files variable file names like this:
http://localhost:5168/_framework/%E3%84%A8U1U2U3.Shared.dll
Then we need to convert to: http://localhost:5168/_framework/ㄨU1U2U3.Shared.dll to find it in our assemblies by name.

In the debugger-tests in the mono-config.json, the file name is like this, we add and search with this name, so we don't need the UnescapeDataString.

{
      "behavior": "assembly",
      "name": "debugger-test-chinese-char-in-path-\u3128.dll"
}
Author: thaystg
Assignees: -
Labels:

area-Debugger-mono

Milestone: -

@thaystg thaystg requested a review from lewing August 24, 2022 18:29
continue;
try
{
string decodedFileName = Uri.UnescapeDataString(file_name);
Copy link
Member

Choose a reason for hiding this comment

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

nit: unescapedFileName

Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Without this we get an error on CI:

The command ""C:\Users\itomkowicz\source\repos\runtime-fork\.packages\microsoft.diasymreader.pdb2pdb\1.1.0-beta2-19575-01\tools\Pdb2Pdb.exe" "C:\Users\itomkowicz\source\repos\runtime-fork\artifacts\bin\debugger-test\Debug\wasm\debugger-test-special-char-in-path.dll" /out "C:\Users\itomkowicz\source\repos\runtime-fork\artifacts\SymStore\Debug\debugger-test-special-char-in-path\net6.0\x64\debugger-test-special-char-in-path.pdb" /srcsvrvar SRC_INDEX=public" exited with code -1.

Copy link
Member

Choose a reason for hiding this comment

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

Any idea what would cause this? And details before that line?

Copy link
Member Author

Choose a reason for hiding this comment

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

Pdb2Pdb.exe does not support special characteres in path, as far as I remember.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, we can add a comment for that here. And if there is any supporting link with more info, then add that.

@radical
Copy link
Member

radical commented Aug 24, 2022

Can we test this case against other ways of loading assemblies?

  • lazy loading
  • hot reload

Renaming variable as suggested by @radical
…h-ㄨ/debugger-test-chinese-char-in-path-ㄨ.csproj
@radical radical merged commit df45afd into dotnet:main Aug 29, 2022
@thaystg
Copy link
Member Author

thaystg commented Aug 29, 2022

@lewing Can I backport?

@thaystg
Copy link
Member Author

thaystg commented Aug 30, 2022

/backport to release/7.0

@github-actions
Copy link
Contributor

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2957101497

@ghost ghost locked as resolved and limited conversation to collaborators Sep 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants