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

WebAssembly.Sdk - Unsuppressable warnings #78690

Closed
MizardX opened this issue Nov 22, 2022 · 3 comments · Fixed by #78755
Closed

WebAssembly.Sdk - Unsuppressable warnings #78690

MizardX opened this issue Nov 22, 2022 · 3 comments · Fixed by #78755
Assignees
Labels
arch-wasm WebAssembly architecture area-Interop-mono
Milestone

Comments

@MizardX
Copy link

MizardX commented Nov 22, 2022

Description

When building a Blazor WASM app with SQLite NuGet package, I get a warning about Found a native function (sqlite3_config) with varargs in e_sqlite3.

Reproduction Steps

  1. dotnet new blazorwasm-empty
  2. dotnet add package SQLitePCLRaw.bundle_e_sqlite3
  3. dotnet build

Expected behavior

No warnings about native libraries, or some way to suppress them.

Actual behavior

C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : Found a native function (sqlite3_config) with varargs in e_sqlite3. Calling such functions is not supported, and will fail at runtime. Managed DllImports:  [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_none(System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_int(System.Int32, System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3 Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_int_arm64cc(System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_log(System.Int32, System.IntPtr, SQLitePCL.hook_handle) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_log_arm64cc(System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, SQLitePCL.hook_handle) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : Found a native function (sqlite3_db_config) with varargs in e_sqlite3. Calling such functions is not supported, and will fail at runtime. Managed DllImports:  [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_charptr(SQLitePCL.sqlite3, System.Int32, System.Byte*) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_charptr_arm64cc(SQLitePCL.sqlite3, System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.Byte*) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_int_outint(SQLitePCL.sqlite3, System.Int32, System.Int32, System.Int32*) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_int_outint_arm64cc(SQLitePCL.sqlite3, System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.Int32, System.Int32*) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_intptr_int_int(SQLitePCL.sqlite3, System.Int32, System.IntPtr, System.Int32, System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_intptr_int_int_arm64cc(SQLitePCL.sqlite3, System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.Int32, System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]

Regression?

No response

Known Workarounds

No response

Configuration

.NET SDK:
 Version:   7.0.100
 Commit:    e12b7af219

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22623
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.100\

Host:
  Version:      7.0.0
  Architecture: x64
  Commit:       d099f075e4

.NET SDKs installed:
  3.1.425 [C:\Program Files\dotnet\sdk]
  5.0.405 [C:\Program Files\dotnet\sdk]
  5.0.406 [C:\Program Files\dotnet\sdk]
  7.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0-rc.2.22476.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0-rc.2.22472.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.0-rc.2.22472.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Other information

The warnings does not contain any message code that could be used for suppression (e.g. CS1234). The message also spans multiple lines, which each are counted as separate warnings.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 22, 2022
@lambdageek lambdageek added arch-wasm WebAssembly architecture area-Interop-mono labels Nov 22, 2022
@ghost
Copy link

ghost commented Nov 22, 2022

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

Issue Details

Description

When building a Blazor WASM app with SQLite NuGet package, I get a warning about Found a native function (sqlite3_config) with varargs in e_sqlite3.

Reproduction Steps

  1. dotnet new blazorwasm-empty
  2. dotnet add package SQLitePCLRaw.bundle_e_sqlite3
  3. dotnet build

Expected behavior

No warnings about native libraries, or some way to suppress them.

Actual behavior

C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : Found a native function (sqlite3_config) with varargs in e_sqlite3. Calling such functions is not supported, and will fail at runtime. Managed DllImports:  [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_none(System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_int(System.Int32, System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3 Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_int_arm64cc(System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_log(System.Int32, System.IntPtr, SQLitePCL.hook_handle) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_config_log_arm64cc(System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, SQLitePCL.hook_handle) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : Found a native function (sqlite3_db_config) with varargs in e_sqlite3. Calling such functions is not supported, and will fail at runtime. Managed DllImports:  [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_charptr(SQLitePCL.sqlite3, System.Int32, System.Byte*) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_charptr_arm64cc(SQLitePCL.sqlite3, System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.Byte*) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_int_outint(SQLitePCL.sqlite3, System.Int32, System.Int32, System.Int32*) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_int_outint_arm64cc(SQLitePCL.sqlite3, System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.Int32, System.Int32*) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_intptr_int_int(SQLitePCL.sqlite3, System.Int32, System.IntPtr, System.Int32, System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0\Sdk\WasmApp.Native.targets(292,5): warning : System.Int32 sqlite3_db_config_intptr_int_int_arm64cc(SQLitePCL.sqlite3, System.Int32, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr, System.Int32, System.Int32) (in [SQLitePCLRaw.provider.e_sqlite3] SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods) [...\MyProject.csproj]

Regression?

No response

Known Workarounds

No response

Configuration

.NET SDK:
 Version:   7.0.100
 Commit:    e12b7af219

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22623
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.100\

Host:
  Version:      7.0.0
  Architecture: x64
  Commit:       d099f075e4

.NET SDKs installed:
  3.1.425 [C:\Program Files\dotnet\sdk]
  5.0.405 [C:\Program Files\dotnet\sdk]
  5.0.406 [C:\Program Files\dotnet\sdk]
  7.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0-rc.2.22476.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0-rc.2.22472.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.0-rc.2.22472.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Other information

The warnings does not contain any message code that could be used for suppression (e.g. CS1234). The message also spans multiple lines, which each are counted as separate warnings.

Author: MizardX
Assignees: -
Labels:

arch-wasm, untriaged, area-VM-meta-mono, area-Interop-mono

Milestone: -

@radical
Copy link
Member

radical commented Nov 22, 2022

@maraf this needs warning numbers, same as what you added for

Log.LogWarning(null, "WASM0001", "", "", 0, 0, 0, 0, $"Could not get icall, or callbacks for method '{type.FullName}::{method.Name}' because '{ex.Message}'");
continue;

And we can add this for any other warnings that we generate from the task.

@radical radical added this to the 8.0.0 milestone Nov 22, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Nov 22, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 23, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 2, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jan 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Interop-mono
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants