Skip to content

Commit

Permalink
Merge branch 'bugfix/msbuild-task-message-null' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AliveDevil committed Nov 27, 2024
2 parents a76579e + 9179ddb commit 024d11d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/IKVM.MSBuild.Tasks/IkvmToolTaskDiagnosticWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public async ValueTask ReceiveAsync(IkvmToolDiagnosticEvent @event, Cancellation
logger.LogWarning(null, $"{@event.Id:D4}", null, null, @event.Location.StartLine, @event.Location.StartColumn, @event.Location.EndLine, @event.Location.EndColumn, @event.Message, @event.Args);
break;
case IkvmToolDiagnosticEventLevel.Error:
logger.LogError(null, $"{@event.Id:D4}", null, null, @event.Location.StartLine, @event.Location.StartColumn, @event.Location.EndLine, @event.Location.EndColumn, MessageImportance.Normal, @event.Message, @event.Args);
logger.LogError(null, $"{@event.Id:D4}", null, null, @event.Location.StartLine, @event.Location.StartColumn, @event.Location.EndLine, @event.Location.EndColumn, @event.Message, @event.Args);
break;
case IkvmToolDiagnosticEventLevel.Fatal:
logger.LogError(null, $"{@event.Id:D4}", null, null, @event.Location.StartLine, @event.Location.StartColumn, @event.Location.EndLine, @event.Location.EndColumn, MessageImportance.High, @event.Message, @event.Args);
logger.LogError(null, $"{@event.Id:D4}", null, null, @event.Location.StartLine, @event.Location.StartColumn, @event.Location.EndLine, @event.Location.EndColumn, @event.Message, @event.Args);
break;
}

Expand Down
4 changes: 2 additions & 2 deletions src/IKVM.Tools.Importer/ImportContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ void ContinueParseCommandLine(RuntimeContext context, StaticCompiler compiler, I

if (options.NoWarn != null)
foreach (var diagnostic in options.NoWarn)
compilerOptions.suppressWarnings.Add($"IKVM{diagnostic.Id:D4}");
compilerOptions.suppressWarnings.Add(diagnostic.Id.ToString());

// TODO handle specific diagnostic IDs
if (options.WarnAsError != null)
Expand All @@ -578,7 +578,7 @@ void ContinueParseCommandLine(RuntimeContext context, StaticCompiler compiler, I
compilerOptions.warnaserror = true;
else
foreach (var i in options.WarnAsError)
compilerOptions.errorWarnings.Add($"IKVM{i.Id:D4}");
compilerOptions.errorWarnings.Add(i.Id.ToString());
}

if (options.Runtime != null)
Expand Down

0 comments on commit 024d11d

Please sign in to comment.