-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enable Microsoft.CodeAnalysis.Collections #6595
Conversation
75a485e
to
eaa984b
Compare
eaa984b
to
81f7d70
Compare
81f7d70
to
a66a243
Compare
<ClassName>Microsoft.CodeAnalysis.Collections.SR</ClassName> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
</Target> |
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 need to figure out why this is needed and add it to the documentation steps in dotnet/roslyn#49991
@@ -1,14 +1,27 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<PropertyGroup> | |||
<TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks> | |||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
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 need to add this to the documentation steps in dotnet/roslyn#49991
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.
Stupid question: If the code always requires this prop, can it be specified in the package (in Microsoft.CodeAnalysis.Collections.targets?)
an imported package. This suppression should be removed if/when the project is migrated to enable nullable | ||
reference types. | ||
--> | ||
<NoWarn>$(NoWarn),CS8632</NoWarn> |
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.
📝 This is certainly not the way I'd hope this would go. Once dotnet/roslyn#52893 is implemented we can quickly deal with this.
PR Triage: Because this is a new dependency from us on Roslyn, we need to make sure we have the right policies in place for keeping it up to date, especially around releases. |
I don't. Performance for these collections is much closer to Note that in an ideal world, #6598 would have directly converted from
I haven't done any profiling outside of some micro-benchmarking of the
This is strictly a source package, so the version of these collections shipping with Roslyn does not directly impact the code shipping in this project. |
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.
It'd be nice to see confirmation that this doesn't bring back AB#1344683, but ImmutableSegmentedList is fast, if I remember correctly.
This is strictly a source package, so the version of these collections shipping with Roslyn does not directly impact the code shipping in this project.
We would still need to ship a last-minute version bump if you found a major correctness issue, though, right?
@@ -104,6 +104,16 @@ | |||
Visible="false" Pack="false"/> | |||
</ItemGroup> | |||
|
|||
<Target Name="SetResourceProperties" BeforeTargets="_GetEmbeddedResourcesWithSourceGeneration"> | |||
<ItemGroup> | |||
<EmbeddedResource Update="@(EmbeddedResource)" Condition="'%(EmbeddedResource.NuGetPackageId)' == 'Microsoft.CodeAnalysis.Collections' AND '%(FileName)' == 'Strings'"> |
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.
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 don't believe Strings.shared.resx is part of this NuGet package.
an imported package. This suppression should be removed if/when the project is migrated to enable nullable | ||
reference types. | ||
--> | ||
<NoWarn>$(NoWarn),CS8632</NoWarn> |
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.
NoWarn
is a semicolon-delimited list.
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.
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.
but it's documented as comma-delimited
I had no idea 🤯 I judged based off of the value of NoWarn
in a random binlog (which looked to be entirely semicolon-delimited)
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.
Can you link an overview of the new collections, their intended use cases, perf characteristics? Genuinely interested, thank you!
@@ -1,14 +1,27 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<PropertyGroup> | |||
<TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks> | |||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
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.
Stupid question: If the code always requires this prop, can it be specified in the package (in Microsoft.CodeAnalysis.Collections.targets?)
Most of the documentation is included directly as documentation comments on the types themselves.
There are a few other subtleties, like the fact that the immutable wrappers are all value types which avoids allocations in a few edge cases. |
@ladipro I'll also answer a couple of questions you didn't specifically ask:
|
Closes #6601
Review commit-by-commit highly recommended. Please use a normal merge commit (no squash merge), as this pull request was carefully constructed and validated as distinct changes.