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] update incorrect references #108352

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
/src/mono/browser @lewing @pavelsavara
/src/mono/wasi @lewing @pavelsavara
/src/mono/wasm @lewing @pavelsavara
/src/mono/wasm/debugger @thaystg @ilonatommy
/src/mono/browser/debugger @thaystg @ilonatommy
/src/mono/wasm/build @maraf @akoeplinger
/src/mono/wasi/build @maraf @akoeplinger
Expand Down
4 changes: 2 additions & 2 deletions docs/coding-guidelines/mono-code-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ As a matter of courtesy, notify the .NET macios and .NET Android teams if changi

### WASM

The WASM and WASI runtimes in [`src/mono/wasm/runtime`](../../src/mono/wasm/runtime) and
The WASM and WASI runtimes in [`src/mono/browser/runtime`](../../src/mono/browser/runtime) and
`src/mono/wasi` are effectively external API clients. When possible they should use existing `MONO_API` functions.

As a matter of expedience, the wasm project has sometimes taken advantage of static linking by
adding declarations of internal Mono functions in `src/mono/wasm/runtime/driver.c` and directly
adding declarations of internal Mono functions in `src/mono/browser/runtime/driver.c` and directly
calling Mono internals.

In general new code should not do this. When modifying existing code, mysterious WASM failures may
Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/building/libraries/webassembly-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ If you haven't already done so, please read [this document](../../README.md#Buil

## Building

At this time no other build dependencies are necessary to start building for WebAssembly. Emscripten will be downloaded and installed automatically in the build process. To read how to build on specific platforms, see [Building](../../../../src/mono/wasm/README.md#building).
At this time no other build dependencies are necessary to start building for WebAssembly. Emscripten will be downloaded and installed automatically in the build process. To read how to build on specific platforms, see [Building](../../../../src/mono/browser/README.md#building).

This document explains how to work on the runtime or libraries. If you haven't already done so, please read [this document](../../README.md#Configurations) to understand configurations.

Expand Down Expand Up @@ -158,4 +158,4 @@ Open a PR request with the new image.

# Test libraries

You can read about running library tests in [Libraries tests](../../../../src/mono/wasm/README.md#libraries-tests).
You can read about running library tests in [Libraries tests](../../../../src/mono/browser/README.md#libraries-tests).
2 changes: 1 addition & 1 deletion docs/workflow/debugging/mono/wasm-debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ The name of the script and the location of the `<script>` tag depends on whether
Blazor WebAssembly project (template `blazorwasm`) or a Blazor project (template `blazor`).

See the runtime `DotnetHostBuilder` interface in
[dotnet.d.ts](../../../../src/mono/wasm/runtime/dotnet.d.ts) for additional configuration functions.
[dotnet.d.ts](../../../../src/mono/browser/runtime/dotnet.d.ts) for additional configuration functions.

## Blazor WebAssembly

Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/evaluate-default-paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ jobs:
- src/mono/tests/*
- src/mono/tools/*
- src/mono/wasi/*
- src/mono/wasm/debugger/*
- src/mono/browser/debugger/*
- src/mono/wasm/host/*
- src/mono/wasm/templates/*
- src/mono/wasm/testassets/*
Expand Down
8 changes: 4 additions & 4 deletions src/mono/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ There is also the [wa-edit](https://github.com/radekdoulik/wa-info#wa-edit) tool

Bumping Emscripten version involves these steps:

* update https://github.com/dotnet/runtime/blob/main/src/mono/wasm/emscripten-version.txt
* update https://github.com/dotnet/runtime/blob/main/src/mono/browser/emscripten-version.txt
* bump emscripten versions in docker images in https://github.com/dotnet/dotnet-buildtools-prereqs-docker
* bump emscripten in https://github.com/dotnet/emsdk
* bump docker images in https://github.com/dotnet/icu, update emscripten files in eng/patches/
Expand All @@ -244,7 +244,7 @@ Bumping Emscripten version involves these steps:

Two things to keep in mind:

1. We use the Azure DevOps NPM registry (configured in `src/mono/wasm/runtime/.npmrc`). When
1. We use the Azure DevOps NPM registry (configured in `src/mono/browser/runtime/.npmrc`). When
updating `package.json`, you will need to be logged in (see instructions for Windows and
mac/Linux, below) in order for the registry to populate with the correct package versions.
Otherwise, CI builds will fail.
Expand Down Expand Up @@ -275,7 +275,7 @@ npm update --lockfile-version=1
Go to https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-public-npm/connect/npm and log in and click on the "Other" tab.
Follow the instructions to set up your `~/.npmrc` with a personal authentication token.

In folder `src/mono/wasm/runtime/`
In folder `src/mono/browser/runtime/`

```sh
rm -rf node_modules
Expand All @@ -288,7 +288,7 @@ npm update --lockfile-version=1
## Code style

* Is enforced via [eslint](https://eslint.org/) and rules are in `./.eslintrc.js`
* You could check the style by running `npm run lint` in `src/mono/wasm/runtime` directory
* You could check the style by running `npm run lint` in `src/mono/browser/runtime` directory
* You can install [plugin into your VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) to show you the errors as you type

## Builds on CI
Expand Down
2 changes: 1 addition & 1 deletion src/mono/browser/runtime/diagnostics-mock.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Licensed to the .NET Foundation under one or more agreements.
//! The .NET Foundation licenses this file to you under the MIT license.
//!
//! This is generated file, see src/mono/wasm/runtime/rollup.config.js
//! This is generated file, see src/mono/browser/runtime/rollup.config.js

//! This is not considered public API with backward compatibility guarantees.

Expand Down
2 changes: 1 addition & 1 deletion src/mono/browser/runtime/dotnet.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Licensed to the .NET Foundation under one or more agreements.
//! The .NET Foundation licenses this file to you under the MIT license.
//!
//! This is generated file, see src/mono/wasm/runtime/rollup.config.js
//! This is generated file, see src/mono/browser/runtime/rollup.config.js

//! This is not considered public API with backward compatibility guarantees.

Expand Down
4 changes: 2 additions & 2 deletions src/mono/browser/runtime/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const wasmEnableSIMD = process.env.WASM_ENABLE_SIMD === "1" ? true : false;
const wasmEnableExceptionHandling = process.env.WASM_ENABLE_EH === "1" ? true : false;
const wasmEnableJsInteropByValue = process.env.ENABLE_JS_INTEROP_BY_VALUE == "1" ? true : false;
const monoDiagnosticsMock = process.env.MonoDiagnosticsMock === "true" ? true : false;
// because of stack walk at src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs
// because of stack walk at src/mono/browser/debugger/BrowserDebugProxy/MonoProxy.cs
// and unit test at with timers.mjs
const keep_fnames = /(mono_wasm_runtime_ready|mono_wasm_fire_debugger_agent_message_with_data|mono_wasm_fire_debugger_agent_message_with_data_to_pause|mono_wasm_schedule_timer_tick)/;
const keep_classnames = /(ManagedObject|ManagedError|Span|ArraySegment|WasmRootBuffer|SessionOptionsBuilder)/;
Expand All @@ -44,7 +44,7 @@ const terserConfig = {
};
const plugins = isDebug ? [writeOnChangePlugin()] : [terser(terserConfig), writeOnChangePlugin()];
const banner = "//! Licensed to the .NET Foundation under one or more agreements.\n//! The .NET Foundation licenses this file to you under the MIT license.\n";
const banner_dts = banner + "//!\n//! This is generated file, see src/mono/wasm/runtime/rollup.config.js\n\n//! This is not considered public API with backward compatibility guarantees. \n";
const banner_dts = banner + "//!\n//! This is generated file, see src/mono/browser/runtime/rollup.config.js\n\n//! This is not considered public API with backward compatibility guarantees. \n";
// emcc doesn't know how to load ES6 module, that's why we need the whole rollup.js
const inlineAssert = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/component/diagnostics_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ mono_wasm_diagnostic_server_post_resume_runtime (void)
#define QUEUE_CLOSE_SENTINEL ((uint8_t*)(intptr_t)-1)

/* single-reader single-writer one-element queue. See
* src/mono/wasm/runtime/diagnostics/server_pthread/stream-queue.ts
* src/mono/browser/runtime/diagnostics/server_pthread/stream-queue.ts
*/
typedef struct WasmIpcStreamQueue {
uint8_t *buf; /* or QUEUE_CLOSE_SENTINEL */
Expand Down
10 changes: 5 additions & 5 deletions src/mono/wasi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ run-build-tests:
build-debugger-tests-helix:
$(DOTNET) build -restore -bl:$(TOP)/artifacts/log/$(CONFIG)/Wasm.Debugger.Tests.binlog \
/p:ContinuousIntegrationBuild=true /p:ArchiveTests=true \
$(TOP)/src/mono/wasm/debugger/Wasm.Debugger.Tests/Wasm.Debugger.Tests.csproj \
$(TOP)/src/mono/browser/debugger/Wasm.Debugger.Tests/Wasm.Debugger.Tests.csproj \
$(_MSBUILD_WASM_BUILD_ARGS) $(MSBUILD_ARGS)

submit-debugger-tests-helix: build-debugger-tests-helix
Expand Down Expand Up @@ -108,14 +108,14 @@ submit-tests-helix:
run-debugger-tests:
rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \
if [ ! -z "$(TEST_FILTER)" ]; then \
$(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \
$(DOTNET) test $(TOP)/src/mono/browser/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \
else \
$(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing" $(TEST_ARGS); \
$(DOTNET) test $(TOP)/src/mono/browser/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing" $(TEST_ARGS); \
fi

build-dbg-proxy:
$(DOTNET) build $(TOP)/src/mono/wasm/debugger/wasiDebugHost $(MSBUILD_ARGS)
$(DOTNET) build $(TOP)/src/mono/browser/debugger/wasiDebugHost $(MSBUILD_ARGS)
build-dbg-testsuite:
$(DOTNET) build $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS)
$(DOTNET) build $(TOP)/src/mono/browser/debugger/DebuggerTestSuite $(MSBUILD_ARGS)
build-app-host:
$(DOTNET) build $(TOP)/src/mono/wasm/host $(_MSBUILD_WASM_BUILD_ARGS) $(MSBUILD_ARGS)
2 changes: 1 addition & 1 deletion src/mono/wasi/mono-include/wasm-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

#endif/*__MONO_WASM_CONFIG_H__*/

// TODOWASI deduplicate with src/mono/wasm/runtime/wasm-config.h.in
// TODOWASI deduplicate with src/mono/browser/runtime/wasm-config.h.in
2 changes: 1 addition & 1 deletion src/mono/wasm/threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ a worker thread will use `async_run_in_main_thread` to queue up work for the mai

To run the debugger tests in the runtime [built with enabled support for multi-threading](#building-the-runtime) we use:
```
dotnet test src/mono/wasm/debugger/DebuggerTestSuite -e RuntimeConfiguration=Debug -e Configuration=Debug -e DebuggerHost=chrome -e WasmEnableThreads=true
dotnet test src/mono/browser/debugger/DebuggerTestSuite -e RuntimeConfiguration=Debug -e Configuration=Debug -e DebuggerHost=chrome -e WasmEnableThreads=true
```

## JS interop on dedicated threads ##
Expand Down
Loading