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

[wasm] Fix AOT publish in paths with space on Windows #94166

Merged
merged 7 commits into from
Nov 1, 2023

Conversation

ilonatommy
Copy link
Member

@ilonatommy ilonatommy commented Oct 30, 2023

Connected to investigation: #92399.

This is only fix for Windows, so we could not change the TmpPath for other platforms yet.

  1. When WasmDedup=true we had error : Can not open image C:\repos\wbt because the path C:\repos\wbt artifacts was not put into quotations. This was a problem for all platforms and is fixed everywhere.
  2. _AOTObjectFile items should not only be separated by space but also put into quotations, otherwise a spaced path will be treated as 2 separate items.
  3. Tests that are using the path to the wbt test project were edited.

@ilonatommy ilonatommy added arch-wasm WebAssembly architecture area-Build-mono labels Oct 30, 2023
@ilonatommy ilonatommy self-assigned this Oct 30, 2023
@ghost
Copy link

ghost commented Oct 30, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Connected to investigation: #92399.

This is only fix for Windows, so we could not change the TmpPath for other platforms yet.

  1. When WasmDedup=true we had error : Can not open image C:\repos\wbt because the path C:\repos\wbt artifacts was not put into quotations. This was a problem for all platforms and is fixed everywhere.
  2. _AOTObjectFile items should not only be separated by space but also put into quotations, otherwise a spaced path will be treated as 2 separate items.
Author: ilonatommy
Assignees: ilonatommy
Labels:

arch-wasm, area-Build-mono

Milestone: -

Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@@ -951,7 +951,7 @@ private PrecompileArguments GetPrecompileArgumentsFor(ITaskItem assemblyItem, st
if (isDedup)
{
foreach (var aItem in _assembliesToCompile!)
processArgs.Add(aItem.ItemSpec);
processArgs.Add('"' + aItem.ItemSpec + '"');
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
processArgs.Add('"' + aItem.ItemSpec + '"');
processArgs.Add($"'{aItem.ItemSpec}'");

@radical
Copy link
Member

radical commented Oct 31, 2023

What is the remaining issue on linux/macos?

@ilonatommy
Copy link
Member Author

ilonatommy commented Oct 31, 2023

What is the remaining issue on linux/macos?

That while a sample repro for them work, when the fix is applied to the repo, it fails. Please, see #92399 (comment) and the investigation PR for reference.

Shortly: in Linux you can escape space either by putting the string into quotation OR by using backslash. If we try on a sample .c file both methods work. However, applying it in the code, that produces .rsp file as expected + command as expected, the command fails.

Co-authored-by: Ankit Jain <radical@gmail.com>
@radical
Copy link
Member

radical commented Oct 31, 2023

What is the remaining issue on linux/macos?

That while a sample repro for them work, when the fix is applied to the repo, it fails. Please, see #92399 (comment) and the investigation PR for reference.

Shortly: in Linux you can escape space either by putting the string into quotation OR by using backslash. If we try on a sample .c file both methods work. However, applying it in the code, that produces .rsp file as expected + command as expected, the command fails.

Can you please add this to the issue tracking the linux case of this problem?

@ilonatommy ilonatommy merged commit 7e316e2 into dotnet:main Nov 1, 2023
166 of 168 checks passed
@ghost ghost locked as resolved and limited conversation to collaborators Dec 1, 2023
@ilonatommy
Copy link
Member Author

/backport to release/8.0-staging

@github-actions github-actions bot unlocked this conversation Apr 16, 2024
Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/8702511263

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants