-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add NetCoreAppCurrent configuration to libs (Phase 1) #54544
Add NetCoreAppCurrent configuration to libs (Phase 1) #54544
Conversation
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsContributes to #54012 Commit 1 is an infra change only to make it easier to bump the minimum supported version of .NETCoreApp
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
There was an error handling pipeline event 4f38cb9b-b770-4abb-b5c0-7bbb9145ef96. |
08c07ea
to
1983b22
Compare
1983b22
to
b5c575f
Compare
@@ -57,7 +57,7 @@ | |||
</ItemGroup> | |||
|
|||
<ItemGroup> | |||
<NETStandardCompatError Include="netcoreapp2.0" Supported="netcoreapp3.1" /> | |||
<NETStandardCompatError Include="netcoreapp2.0" Supported="$(NetCoreAppMinimum)" /> |
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.
Would it make sense to default NETStandardCompatError/@Supported
to $(NetCoreAppMinimum)
so that we don't need to duplicate that in all the projects?
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 do not know why I am here. But I love you.
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.
Even though we mostly care about .NETCoreApp, as .NETStandard has multiple compatible frameworks, I wouldn't want to default it to .NETCoreApp. As an example, for NET7 the min .NETFramework version will be net462 and we will make use of this infrastructure for .NETFramework as well.
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.
Defaulting could happen in Targets after the project sets the Include value. You could handle both cases based on TFI of the include. It's just a suggestion, but could avoid boilerplate if we think the boilerplate isn't adding value to the project. I guess from that perspective we could automatically calculate these entirely since we see what the project is targeting.
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 guess from that perspective we could automatically calculate these entirely since we see what the project is targeting.
Thanks for the suggestion. Tbh that's what I would prefer. When I added this infrastructure in a previous PR I considered automation but didn't do it for different reasons. That said, I definitely wouldn't want to clean this up as part of this PR. For now I'm fine with having these items in the project file.
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.
Yeah, also fine with it for now. Just had this gut-reaction when I saw this being treated like boilerplate. If we do end up keeping it in the project file then we should add it to the docs: https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/libraries-packaging.md
src/libraries/System.Composition.AttributedModel/src/System.Composition.AttributedModel.csproj
Show resolved
Hide resolved
src/libraries/System.Composition.Convention/src/System.Composition.Convention.csproj
Show resolved
Hide resolved
src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
Outdated
Show resolved
Hide resolved
@stephentoub thanks for the review. Can you please take another look? Addressed your feedback. |
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.
Other than a few more tweaks, the source changes LGTM.
@@ -715,7 +729,7 @@ private void RaiseDataReceivedEof() | |||
|
|||
private unsafe int ProcessRead(SerialStreamIORequest r) | |||
{ | |||
Span<byte> buff = r.Buffer.Span; | |||
ReadOnlySpan<byte> buff = r.Buffer.Span; |
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.
The only reason this is working is because we pass this to native code... This should remain Span
, same for Memory
change below.
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.
Spoke with @krwq offline and I decided to revert the changes in this file as a suitable implementation for the overloads without compromising the existing functionality requires more changes than I would want to make as part of this PR. Will file an issue to add the overloads.
Issues are:
|
Contributes to #54012
Fixes #54556
Fixes #54575