Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add WASM000x warning code to all warning produced in WasmAppBuilder.
  • Loading branch information
maraf committed Nov 23, 2022
commit b7d4a0c9d3ad7f5774c2de00130579d196ba50f4
2 changes: 1 addition & 1 deletion src/tasks/WasmAppBuilder/IcallTableGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void ProcessType(Type type)
}
catch (NotImplementedException nie)
{
Log.LogWarning($"Failed to generate icall function for method '[{method.DeclaringType!.Assembly.GetName().Name}] {className}::{method.Name}'" +
Log.LogWarning(null, "WASM0001", "", "", 0, 0, 0, 0, $"Failed to generate icall function for method '[{method.DeclaringType!.Assembly.GetName().Name}] {className}::{method.Name}'" +
$" because type '{nie.Message}' is not supported for parameter named '{par.Name}'. Ignoring.");
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private void EmitPInvokeTable(StreamWriter w, Dictionary<string, string> modules
string imports = string.Join(Environment.NewLine,
candidates.Select(
p => $" {p.Method} (in [{p.Method.DeclaringType?.Assembly.GetName().Name}] {p.Method.DeclaringType})"));
Log.LogWarning($"Found a native function ({first.EntryPoint}) with varargs in {first.Module}." +
Log.LogWarning(null, "WASM0001", "", "", 0, 0, 0, 0, $"Found a native function ({first.EntryPoint}) with varargs in {first.Module}." +
" Calling such functions is not supported, and will fail at runtime." +
$" Managed DllImports: {Environment.NewLine}{imports}");

Expand Down
4 changes: 2 additions & 2 deletions src/tasks/WasmAppBuilder/WasmAppBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private bool ExecuteInternal ()
string fullPath = assembly.GetMetadata("Identity");
if (string.IsNullOrEmpty(culture))
{
Log.LogWarning($"Missing CultureName metadata for satellite assembly {fullPath}");
Log.LogWarning(null, "WASM0002", "", "", 0, 0, 0, 0, $"Missing CultureName metadata for satellite assembly {fullPath}");
continue;
}
// FIXME: validate the culture?
Expand Down Expand Up @@ -290,7 +290,7 @@ private bool ExecuteInternal ()

if (firstPath == secondPath)
{
Log.LogWarning($"Found identical vfs mappings for target path: {targetPath}, source file: {firstPath}. Ignoring.");
Log.LogWarning(null, "WASM0003", "", "", 0, 0, 0, 0, $"Found identical vfs mappings for target path: {targetPath}, source file: {firstPath}. Ignoring.");
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private bool AddAssemblyAndReferences(MetadataLoadContext mlc, Assembly assembly
{
if (SkipMissingAssemblies)
{
Log.LogWarning($"Loading assembly reference '{aname}' for '{assembly.GetName()}' failed: {ex.Message} Skipping.");
Log.LogWarning(null, "WASM0004", "", "", 0, 0, 0, 0, $"Loading assembly reference '{aname}' for '{assembly.GetName()}' failed: {ex.Message} Skipping.");
}
else
{
Expand Down