(interpreter) Add infrastructure for compiler warnings#190
Merged
Conversation
perlun
commented
May 9, 2021
| dotnet publish Perlang.ConsoleApp/Perlang.ConsoleApp.csproj -c Release -r linux-x64 --self-contained true /p:PublishReadyToRun=true /p:SolutionDir=$(pwd)/ | ||
| cp -r Perlang.ConsoleApp/bin/Release/net5.0/linux-x64/publish/* $HOME/.perlang/nightly/bin | ||
| dotnet publish src/Perlang.ConsoleApp/Perlang.ConsoleApp.csproj -c Release -r linux-x64 --self-contained true /p:PublishReadyToRun=true /p:SolutionDir=$(pwd)/ | ||
| cp -r src/Perlang.ConsoleApp/bin/Release/net5.0/linux-x64/publish/* $HOME/.perlang/nightly/bin |
Collaborator
Author
There was a problem hiding this comment.
(Drive-by bug fix for something which was forgotten in #167. One new idea I had while reviewing this: it would perhaps be worth running this script in CI, to prevent bugs like this from slipping through.)
134652b to
4309b43
Compare
perlun
commented
May 9, 2021
| private readonly PerlangInterpreter interpreter; | ||
| private readonly Action<string> standardOutputHandler; | ||
| private readonly Action<string> standardErrorHandler; | ||
| private readonly HashSet<WarningType> disabledWarningsAsErrors = new(); |
Collaborator
Author
There was a problem hiding this comment.
Note: this MR does not include any mechanism for actually populating this field. Will be handled by #188.
perlun
commented
May 9, 2021
|
|
||
| namespace Perlang.ConsoleApp | ||
| { | ||
| // TODO: Remove this class if/when https://github.com/dotnet/command-line-api/pull/1272 gets merged. |
Collaborator
Author
There was a problem hiding this comment.
4309b43 to
64e2283
Compare
perlun
commented
May 9, 2021
64e2283 to
cb65401
Compare
cb65401 to
64f21e1
Compare
64f21e1 to
26e1af9
Compare
perlun
commented
May 12, 2021
|
|
||
| Assert.Single(result.Errors); | ||
| Assert.Matches("Cannot assign nil to an implicitly typed local variable", exception.Message); | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
This added test validates the new check in TypesResolvedValidator, added in this PR.
perlun
commented
May 12, 2021
|
|
||
| Assert.Single(result.Errors); | ||
| Assert.Matches("Cannot pass Perlang.NullObject argument as parameter 's: System.Int32'", exception.Message); | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
(AFAIK, the check that this test validates has been there previously already.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracting of most of the infrastructure code from #188, to make that PR clearer and more focused on the actual semantic changes.