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

[browser] new EmccEnableAssertions and EmccEnvironment MSBuild props #82954

Merged
merged 16 commits into from
Mar 15, 2023

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Mar 3, 2023

  • added EmccEnableAssertions boolean
    • makes it easier to debug issues with wasm/native code and posix emulation
    • removed _EmccAssertionLevelDefault
  • added EmccEnvironment comma separated list. Default web,webview,worker,node,shell.
    • allows to build slightly smaller dotnet.js without code for nodeJS
  • removes Module.FS_readFile
  • makes dotnet.js.symbols into non-VFS asset. Now it's loaded before mono starts.
  • added EmccExportedLibraryFunction for DEFAULT_LIBRARY_FUNCS_TO_INCLUDE

Usage:

    <EmccAssertions Condition="'$(Configuration)' == 'Debug'">true</EmccAssertions>
    <EmccEnvironment>web</EmccEnvironment>

Fixes #62708
Fixes #74346
Related dotnet/aspnetcore#13915

Tested with latest Blazor locally

image

@pavelsavara pavelsavara added this to the 8.0.0 milestone Mar 3, 2023
@pavelsavara pavelsavara self-assigned this Mar 3, 2023
@pavelsavara pavelsavara requested a review from maraf March 3, 2023 19:19
@ghost
Copy link

ghost commented Mar 3, 2023

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

Issue Details
  • added EmccAssertions boolean
    • makes it easier to debug issues with wasm/native code and posix emulation
  • added EmccEnvironment comma separated list. Default web,webview,worker,node,shell.
    • allows to build slightly smaller dotnet.js without code for nodeJS

Usage:

    <EmccAssertions Condition="'$(Configuration)' == 'Debug'">true</EmccAssertions>
    <EmccEnvironment>web</EmccEnvironment>

Fixes #62708
Fixes #74346
Related dotnet/aspnetcore#13915

Tested with latest Blazor locally

image

Author: pavelsavara
Assignees: pavelsavara
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 8.0.0

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara marked this pull request as ready for review March 3, 2023 23:27
@pavelsavara pavelsavara requested a review from kg as a code owner March 3, 2023 23:27
@pavelsavara pavelsavara requested a review from radical March 3, 2023 23:27
src/mono/wasm/runtime/types.ts Outdated Show resolved Hide resolved
src/mono/wasm/wasm.proj Outdated Show resolved Hide resolved
Copy link
Contributor

@kg kg 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 with the caveat that I'm not an expert on the debugging bits

Co-authored-by: Ankit Jain <radical@gmail.com>
# Conflicts:
#	src/mono/wasm/build/WasmApp.Native.targets
#	src/mono/wasm/runtime/dotnet.d.ts
#	src/mono/wasm/runtime/startup.ts
#	src/mono/wasm/runtime/types/emscripten.ts
@pavelsavara pavelsavara changed the title [browser] new EmccAssertions and EmccEnvironment MSBuild props [browser] new EmccEnableAssertions and EmccEnvironment MSBuild props Mar 14, 2023
src/mono/wasm/runtime/assets.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/assets.ts Outdated Show resolved Hide resolved
src/mono/wasm/build/WasmApp.Native.targets Outdated Show resolved Hide resolved
src/mono/wasm/wasm.proj Show resolved Hide resolved
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 👍

src/mono/wasm/runtime/assets.ts Outdated Show resolved Hide resolved
Co-authored-by: Marek Fišera <mara@neptuo.com>
@pavelsavara
Copy link
Member Author

pavelsavara commented Mar 15, 2023

There was probably unrelated DebuggerTests.BreakpointTests.StepThroughOrNonUserCodeAttributeWithUserBp on last CI run.

Edit: yes, flaky test

@pavelsavara
Copy link
Member Author

Failures are known 'NuGet-Migrations'

@pavelsavara pavelsavara merged commit cacf5ac into dotnet:main Mar 15, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 14, 2023
@pavelsavara pavelsavara deleted the browser_asserts branch September 2, 2024 15:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants