Skip to content

[wasm] WBT - add some debug bits to collect information on a rare failure - #89584

Merged
radical merged 1 commit into
dotnet:mainfrom
radical:wbt-blazor-err
Jul 27, 2023
Merged

radical merged 1 commit into
dotnet:mainfrom
radical:wbt-blazor-err

Conversation

@radical

@radical radical commented Jul 27, 2023 •

Copy link
Copy Markdown
Member

.., where Program.cs fails to compile. In such a case make the
project contents available in the logs.

Issue: #86533

@radical radical added the arch-wasm WebAssembly architecture label Jul 27, 2023
@ghost ghost added the area-VM-meta-mono label Jul 27, 2023
@radical radical changed the title wbt blazor err [wasm] WBT - add some debug bits to collect information on a rare failure Jul 27, 2023
@ghost ghost assigned radical Jul 27, 2023
@ghost

ghost commented Jul 27, 2023

Copy link
Copy Markdown

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

Issue Details
  • [wasm] WBT - add some debug bits to collect information on a rare
  • wip
Author: radical
Assignees: -
Labels:

arch-wasm

Milestone: -

@radical
radical force-pushed the wbt-blazor-err branch 2 times, most recently from 9520ee9 to 3c09b78 Compare July 27, 2023 18:43
.. failure, where `Program.cs` fails to compile. In such a case make the
project contents available in the logs.

Issue: dotnet#86533
@radical
radical marked this pull request as ready for review July 27, 2023 18:44
@radical
radical requested review from lewing, maraf and pavelsavara July 27, 2023 18:44
}
catch (XunitException xe)
{
if (xe.Message.Contains("error CS1001: Identifier expected"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we do some regex to capture all C# compiler errors?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do we need that? This is for a very specific failure, see #86533 .

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In this case we generate a project with dotnet new blazorwasm but then it fails to compile. But that doesn't happen for all the times we do that in the tests, just sometimes with some random test. So, I want to find out what that Program.cs has. I suspect it might be some error message, or output of something.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

guess: do we need to flush some file before we start compilation process ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nope. This is a exec of "dotnet new" and that should return only once the write is "effectively" done. And the failure is during a subsequent build.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

compiler or msbuild service sticking around?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dotnet new blazorwasm followed by regex hacking the Program.cs ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

compiler or msbuild service sticking around?

I doubt it. But will know more in the next few days/weeks when this is hit again.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dotnet new blazorwasm followed by regex hacking the Program.cs ?

Hm I hadn't considered this. I will keep this in mind. 👍

@radical
radical merged commit afed0a9 into dotnet:main Jul 27, 2023
@radical
radical deleted the wbt-blazor-err branch July 27, 2023 21:58
@ghost ghost locked as resolved and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-VM-meta-mono

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants