Skip to content
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

AllowUnsafeBlocks=true makes all warning to error from v1.33.0 #1565

Closed
fatfatson opened this issue Jul 21, 2019 · 3 comments · Fixed by #1567
Closed

AllowUnsafeBlocks=true makes all warning to error from v1.33.0 #1565

fatfatson opened this issue Jul 21, 2019 · 3 comments · Fixed by #1567
Labels

Comments

@fatfatson
Copy link

too many fake errors make real error hardly found -_-!
the earlier version doesn't have the problem.

@filipw
Copy link
Member

filipw commented Jul 21, 2019

can you please provide a repro example of what is not working?
Since 1.32.20 OmniSharp correctly respects TreatWarningsAsErrors so perhaps you are seeing that?

@fatfatson
Copy link
Author

the example repo: https://github.com/fatfatson/test-omnisharp

with the code:

        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            return;
            Console.WriteLine("Hello Again!");
        }

a warning is reported as:

image

that's normal!

but if the AllowUnsafeBlocks build option is setting to true (which is neccesary for my project)
image

the above warning will reported as error:
image

I have found that from v1.33, all warnings are reported as error if AllowUnsafeBlocks=true, no matter what TreatWarningsAsErrors is set.

@filipw
Copy link
Member

filipw commented Jul 22, 2019

thanks a lot for the repro. I see the problem now - this is indeed a regression. Will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants