-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Document breaking change for #46044 #51070
Conversation
@@ -0,0 +1,13 @@ | |||
## This document lists known breaking changes in Roslyn in C# 9.0 introduced with .NET 6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a link for this document in https://github.com/dotnet/docs/blob/main/docs/csharp/whats-new/breaking-changes.md.
@@ -142,3 +142,15 @@ class C | |||
|
|||
22. https://github.com/dotnet/roslyn/issues/49596 In *Visual Studio 2019 version 16.9* and greater, conversions from `sbyte` or `short` to `nuint` require explicit casts, | |||
and binary operations with `sbyte` or `short` and `nuint` arguments require explicit casts for one or both operands for `+`, `-`, `*`, `/`, `%`, `<`, `>`, `<=`, `>=`, `==`, `!=`, `|`, `&`, and `^`. | |||
|
|||
23. https://github.com/dotnet/roslyn/issues/46044 In *Visual Studio 2019 version 16.9* and greater, a warning is reported when assigning `default` to, or when casting a possibly `null` value to a type parameter type that is not constrained to value types or reference types. To avoid the warning, the type can be annotated with `?`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little bit lost here. The title of this document is:
This document lists known breaking changes in Roslyn in Visual Studio 2019 Update 1 and beyond compared to Visual Studio 2019.
I'm expecting this to be documented in the new file only. Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it looks like we messed up with some recent breaking changes.
The latest file is https://github.com/dotnet/roslyn/blob/master/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20DotNet%205.md and corresponds to VS 16.8 / .NET 5.
We should probably start a new file for post-.NET 5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A general question: From a time to time, there are PRs that introduces extra nullable warnings in specific contexts. But these were never documented as breaking changes. Why is this specific one special?
@@ -0,0 +1,13 @@ | |||
## This document lists known breaking changes in Roslyn in C# 9.0 introduced with .NET 6. | |||
|
|||
1. https://github.com/dotnet/roslyn/issues/46044 In C# 9.0 (Visual Studio 16.9), a warning is reported when assigning `default` to, or when casting a possibly `null` value to a type parameter type that is not constrained to value types or reference types. To avoid the warning, the type can be annotated with `?`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In C# 9.0 [](start = 49, length = 9)
I think this warning is now produced even for LangVer=8, right? If so we should just say "In Visual Studio 16.9, ..."
I didn't understand why start a new document. There is no .NET 6 yet (we just shipped .NET 5).
Our file structure got a bit confused. The latest file is DotNet 5 (for 16.8). So we could start a new document for post-DotNet 5. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this warning is now produced even for LangVer=8, right?
No, the warnings are not reported with /langversion:8
.
So we could start a new document for post-DotNet 5.
I've renamed the document to "Compiler Breaking Changes - post DotNet 5.md" based on our discussion.
In reply to: 572483433 [](ancestors = 572483433)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (iteration 1)
Marked as draft to make room in review queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 3)
Fixes #51050