-
Notifications
You must be signed in to change notification settings - Fork 106
Fix emitting hidden warnings #940
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,7 @@ public class CompilationContext | |
| private readonly Dictionary<ITypeSymbol, byte> vtables = new(SymbolEqualityComparer.Default); | ||
| private byte[]? script; | ||
|
|
||
| public bool Success => diagnostics.All(p => p.Severity != DiagnosticSeverity.Error); | ||
| public bool Success => !diagnostics.Any(p => p.Severity == DiagnosticSeverity.Error); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey, why this change? aren't them exactly the same?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes xD
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the change makes more readable I think |
||
| public IReadOnlyList<Diagnostic> Diagnostics => diagnostics; | ||
| public string? ContractName => displayName ?? Options.BaseName ?? className; | ||
| private string? Source { get; set; } | ||
|
|
@@ -124,7 +124,7 @@ private void Compile() | |
| foreach (SyntaxTree tree in compilation.SyntaxTrees) | ||
| { | ||
| SemanticModel model = compilation.GetSemanticModel(tree); | ||
| diagnostics.AddRange(model.GetDiagnostics()); | ||
| diagnostics.AddRange(model.GetDiagnostics().Where(u => u.Severity != DiagnosticSeverity.Hidden)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what this Hidden means?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something that we don't need to show to the user :)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "These are typically used to provide suggestions or insights that could improve the code's quality, readability, or performance but are not critical errors or warnings that must be addressed for the code to run correctly." In this case we are not talking about users, @shargon
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In think the success change is good
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, devs hahah, but we don't need to show them these notifications #751 |
||
| if (!Success) continue; | ||
| try | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.