From 415cc4f51fb71df067e2ec3497b20df858e9bd37 Mon Sep 17 00:00:00 2001 From: ahall Date: Sat, 11 Jul 2026 11:57:47 +0100 Subject: [PATCH] fix: suppress WASM0001 sqlite3_config/db_config varargs warnings on TodoApp.Uno browserwasm The browserwasm head emits a WASM0001 warning for every fixed-arity P/Invoke overload SQLitePCLRaw.provider.e_sqlite3 ships to work around sqlite3_config/sqlite3_db_config being variadic (varargs) native functions. This sample's actual SQLite usage (in-memory EF Core CRUD via AppDbContext) never calls those functions directly, so the warning is diagnostic-only noise from the WebAssembly SDK's build-time native-interop check. WASM0001 is a standard MSBuild task warning code (emitted via TaskLoggingHelper.LogWarning in dotnet/runtime's WasmAppBuilder), so it honors NoWarn like any other build warning - the same suppression already documented for Blazor WASM in docs/in-depth/client/advanced/blazor-wasm.md. Suppress it, scoped to the browserwasm TFM only, following the existing GetTargetPlatformIdentifier-conditional pattern used for SuppressTrimAnalysisWarnings in the same file (see #521/#534). Also add a short note to the Uno Platform sample docs pointing at the Blazor WASM page for more detail on the warning and how to suppress it in a consumer's own project. Closes #543 --- docs/samples/todoapp/unoplatform.md | 8 ++++++++ .../TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/samples/todoapp/unoplatform.md b/docs/samples/todoapp/unoplatform.md index 77fda1bf..e39e485f 100644 --- a/docs/samples/todoapp/unoplatform.md +++ b/docs/samples/todoapp/unoplatform.md @@ -18,6 +18,14 @@ If you bump into issues at this point, ensure you can properly develop and run U !!! info Tested platforms The TodoApp.Uno sample is known to work on Android and Desktop. We have not tested on other platforms. +!!! info WASM0001 warning on the browserwasm head + When building the `browserwasm` head, you may see a `WASM0001` warning about native varargs + functions (`sqlite3_config`/`sqlite3_db_config`) in the bundled SQLite provider. This is + harmless diagnostic noise from the WebAssembly SDK's native-interop check - the sample's + actual SQLite usage never calls those functions directly - and is already suppressed for + this sample's `.csproj`. See the [Blazor WASM support](../../in-depth/client/advanced/blazor-wasm.md#suppress-the-wasm0001-warning) + page for more detail on why this warning occurs and how to suppress it in your own project. + ## Deploy a datasync server to Azure Before you begin adjusting the application for offline usage, you must [deploy a datasync service](./server.md). Make a note of the URI of the service before continuing. diff --git a/samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj b/samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj index aa6b4f97..4719f195 100644 --- a/samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj +++ b/samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj @@ -66,6 +66,20 @@ $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' ">$(MSBuildWarningsAsMessages);MT7156 + + $(NoWarn);WASM0001 +