Skip to content

Commit

Permalink
Merge pull request #295 from UiPath/feat/sw-9526-provide-diagnostics-…
Browse files Browse the repository at this point in the history
…to-monaco

feat: provide diagnostics to StudioWeb
  • Loading branch information
liviu-seniuc authored Dec 19, 2023
2 parents c48bcd1 + a86ef41 commit f237224
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/UiPath.Workflow/Activities/ScriptingAotCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ private static void AddDiagnostics(TextExpressionCompilerResults results, IEnume
SourceLineNumber = diagnostic.Location.GetMappedLineSpan().StartLinePosition.Line,
Number = diagnostic.Id,
Message = diagnostic.ToString(),
IsWarning = diagnostic.Severity < DiagnosticSeverity.Error
IsWarning = diagnostic.Severity < DiagnosticSeverity.Error,
Diagnostic = diagnostic // used by Studio Web through reflection
}));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// This file is part of Core WF which is licensed under the MIT license.
// See LICENSE file in the project root for full license information.

using Microsoft.CodeAnalysis;

namespace System.Activities.XamlIntegration;

[Serializable]
Expand All @@ -16,6 +18,10 @@ internal TextExpressionCompilerError() { }

public string Number { get; internal set; }

// To be used with reflection in Studio Web
// marked as internal so it's not referenced in wrong places
internal Diagnostic Diagnostic { get; set; }

public override string ToString()
{
return Message;
Expand Down

0 comments on commit f237224

Please sign in to comment.