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

Document breaking change for #46044 #51070

Merged
merged 3 commits into from
Mar 9, 2021
Merged

Document breaking change for #46044 #51070

merged 3 commits into from
Mar 9, 2021

Conversation

cston
Copy link
Member

@cston cston commented Feb 8, 2021

Fixes #51050

@@ -0,0 +1,13 @@
## This document lists known breaking changes in Roslyn in C# 9.0 introduced with .NET 6.
Copy link
Member

@Youssef1313 Youssef1313 Feb 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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 `?`.
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

@Youssef1313 Youssef1313 left a 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 `?`.
Copy link
Member

@jcouv jcouv Feb 9, 2021

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

Copy link
Member Author

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)

Copy link
Member

@jcouv jcouv left a 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)

@jcouv jcouv self-assigned this Feb 9, 2021
@jcouv jcouv marked this pull request as draft February 16, 2021 18:25
@jcouv
Copy link
Member

jcouv commented Feb 16, 2021

Marked as draft to make room in review queue.

Base automatically changed from master to main March 3, 2021 23:53
@cston cston marked this pull request as ready for review March 8, 2021 17:40
Copy link
Member

@jcouv jcouv left a 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)

@cston cston merged commit 9e43067 into dotnet:main Mar 9, 2021
@cston cston deleted the 51050 branch March 9, 2021 00:21
@allisonchou allisonchou added this to the Next milestone Mar 12, 2021
@allisonchou allisonchou modified the milestones: Next, 16.10.P2 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[.NET 6] [Source Compat Failure] DiscordChatExporter app doesn't build with default target 3.1 with .net6 SDK
4 participants