Repository navigation
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.
💭 I need to figure out why this is needed and add it to the documentation steps in dotnet/roslyn#49991
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks> | ||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
There was a problem hiding this comment.
📝 I need to add this to the documentation steps in dotnet/roslyn#49991
There was a problem hiding this comment.
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.
📝 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. |
Forgind
left a comment
There was a problem hiding this comment.
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?
|
|
||
| <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.
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.
NoWarn is a semicolon-delimited list.
There was a problem hiding this comment.
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)
ladipro
left a comment
There was a problem hiding this comment.
Can you link an overview of the new collections, their intended use cases, perf characteristics? Genuinely interested, thank you!
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks> | ||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
There was a problem hiding this comment.
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:
|
src/Build/Resources/xlf/Strings.en.xlf is the last surviving *.en.xlf file, an orphan left over from a change to the localized languages list. History: - The repo once overrode XlfLanguages to force English satellite assemblies: "en;cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant". - a66a243 "Use default XlfLanguages" (2021-06-18, merged via PR dotnet#6595) removed that override, reverting to the XliffTasks default, which excludes 'en' (English is the source language). That commit deleted all *.en.xlf files across the repo. - 864047d "Fail Builds Fast When SDKResolvers Throw Exceptions (dotnet#6763)" then accidentally re-added src/Build/Resources/xlf/Strings.en.xlf via a stale branch/merge; the PR itself was unrelated to localization. Because 'en' is no longer in XlfLanguages, UpdateXlf never regenerates or validates this file, and no other project has an *.en.xlf counterpart. A full build.cmd with it removed succeeds with 0 warnings/0 errors and does not regenerate it.


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.