You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Roslyn uses Humanizer to pluralize and convert to/from CamelCase for human-friendly automatic variable names and debug output. This was removed in #1766 to remove the prebuilt. We should either work with Roslyn to eliminate this dependency or add the Humanizer repo to source-build.
For 5.0 GA, #1845 removes the patch that had removed the Humanizer prebuilt. Humanizer got a lot more usage in GA and it wasn't reasonable to try to reapply it all while trying to get GA through. We'll either need to recreate the patch or add the repo. /cc @dseefeld
The repo looks like a normal-enough csproj... I think we should try that. I'm wondering if some of the new usages might be more impactful than the old ones, and would make more of a feature gap if we tried to patch them out manually.
@omajid@tmds I think adding this repo might be a reasonable thing for one of you to pick up if you can. (Shouldn't involve as much delving into binlogs and such.)
Huh... maybe none of the projects (as in csproj) that build using Humanizer actually ship in the .NET SDK? Considering we had to actually patch .cs files that contain using Humanizer; that's the only thing that makes sense to me right now.
If we can disable unused projects, that'd be ideal. If for some reason that doesn't work yet we do know the projects aren't used, we could put Humanizer in SBRP.
@crummel, do you know more about this, since you implemented the first patch? @dseefeld, any insight on how this has potentially changed in GA?
The last possibility I can think of is Humanizer being used at build-time but not in the SDK, somehow. I don't have any evidence pointing to it. If we disable the projects or put Humanizer as a ref package, it seems more likely that we'll see a build break rather than something subtle (a string breaking somewhere in the SDK), so I don't think this is a big concern.
I tried building roslyn after removing the using Humanizer references and get:
/home/omajid/devel/dotnet/roslyn/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/SemanticModelExtensions.cs(236,80): error CS1061: 'string' does not contain a definition for 'Pluralize' and no accessible extension method 'Pluralize' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) [/home/omajid/devel/dotnet/roslyn/src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj]
/home/omajid/devel/dotnet/roslyn/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/SemanticModelExtensions.cs(262,46): error CS1061: 'string' does not contain a definition for 'Pluralize' and no accessible extension method 'Pluralize' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) [/home/omajid/devel/dotnet/roslyn/src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj]
/home/omajid/devel/dotnet/roslyn/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/SemanticModelExtensions.cs(236,80): error CS1061: 'string' does not contain a definition for 'Pluralize' and no accessible extension method 'Pluralize' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) [/home/omajid/devel/dotnet/roslyn/src/CodeStyle/CSharp/Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj]
/home/omajid/devel/dotnet/roslyn/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/SemanticModelExtensions.cs(262,46): error CS1061: 'string' does not contain a definition for 'Pluralize' and no accessible extension method 'Pluralize' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) [/home/omajid/devel/dotnet/roslyn/src/CodeStyle/CSharp/Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj]
/home/omajid/devel/dotnet/roslyn/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/SemanticModelExtensions.cs(236,80): error CS1061: 'string' does not contain a definition for 'Pluralize' and no accessible extension method 'Pluralize' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) [/home/omajid/devel/dotnet/roslyn/src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj]
/home/omajid/devel/dotnet/roslyn/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/SemanticModelExtensions.cs(262,46): error CS1061: 'string' does not contain a definition for 'Pluralize' and no accessible extension method 'Pluralize' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) [/home/omajid/devel/dotnet/roslyn/src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj]
0 Warning(s)
The RC2 SDK includes Microsoft.CodeAnalysis.CSharp.CodeStyle.dll, one of the projects that are erroring out:
$ tar tf dotnet-sdk-5.0.100-rc.2.20479.15-linux-x64.tar.gz | grep -i Microsoft.CodeAnalysis.CSharp.CodeStyle.dll
./sdk/5.0.100-rc.2.20479.15/Sdks/Microsoft.NET.Sdk/codestyle/cs/Microsoft.CodeAnalysis.CSharp.CodeStyle.dll
It looks like Roslyn removed the references from a lot of projects except Microsoft.CodeAnalysis.CSharp.Workspaces: dotnet/roslyn#47297, and there are some (unfulfilled?) plans to add a Humanizer reference to dotnet/sdk. Our dotnet/roslyn commit seems to be in a weird spot: after Humanizer refs were added, but in the wrong places.
Microsoft.CodeAnalysis.CSharp.Workspaces should at least be shipping, the other code style projects maybe not.
I'm seeing kind of the opposite in terms of the DLLs being in the SDK. Nothing for find . -iname '*workspaces*' in the SDK, but Microsoft.CodeAnalysis.CSharp.CodeStyle.dll is where @omajid found it.
Which would be a good thing for us. Maybe Microsoft.CodeAnalysis.CSharp.Workspaces is VS-specific and we don't care about all this?
When/where do you expect Humanizer.dll to show up in the .NET SDK?
Well, I'm surprised Workspaces isn't showing up in the SDK. And I'm therefore surprised that the dependencies of Workspaces aren't showing up in the SDK.
Activity
Reconcile patches
dagood commentedon Oct 30, 2020
For 5.0 GA, #1845 removes the patch that had removed the Humanizer prebuilt. Humanizer got a lot more usage in GA and it wasn't reasonable to try to reapply it all while trying to get GA through. We'll either need to recreate the patch or add the repo. /cc @dseefeld
The repo looks like a normal-enough
csproj... I think we should try that. I'm wondering if some of the new usages might be more impactful than the old ones, and would make more of a feature gap if we tried to patch them out manually.dagood commentedon Oct 30, 2020
@omajid @tmds I think adding this repo might be a reasonable thing for one of you to pick up if you can. (Shouldn't involve as much delving into binlogs and such.)
Reconcile patches
omajid commentedon Nov 2, 2020
Humanizer is also used by roslyn-analyzers
omajid commentedon Nov 2, 2020
The Microsoft SDK doesn't include Humanzier, does it?
Is this shipped with the SDK?
dagood commentedon Nov 2, 2020
Huh... maybe none of the projects (as in csproj) that build using Humanizer actually ship in the .NET SDK? Considering we had to actually patch
.csfiles that containusing Humanizer;that's the only thing that makes sense to me right now.If we can disable unused projects, that'd be ideal. If for some reason that doesn't work yet we do know the projects aren't used, we could put Humanizer in SBRP.
@crummel, do you know more about this, since you implemented the first patch?
@dseefeld, any insight on how this has potentially changed in GA?
The last possibility I can think of is Humanizer being used at build-time but not in the SDK, somehow. I don't have any evidence pointing to it. If we disable the projects or put Humanizer as a ref package, it seems more likely that we'll see a build break rather than something subtle (a string breaking somewhere in the SDK), so I don't think this is a big concern.
crummel commentedon Nov 2, 2020
I'm pretty sure Microsoft.CodeAnalysis.CSharp.Workspaces should at least be shipping, the other code style projects maybe not. I'm taking a look now.
omajid commentedon Nov 2, 2020
I tried building roslyn after removing the
using Humanizerreferences and get:The RC2 SDK includes
Microsoft.CodeAnalysis.CSharp.CodeStyle.dll, one of the projects that are erroring out:dagood commentedon Nov 2, 2020
It looks like Roslyn removed the references from a lot of projects except
Microsoft.CodeAnalysis.CSharp.Workspaces: dotnet/roslyn#47297, and there are some (unfulfilled?) plans to add a Humanizer reference to dotnet/sdk. Our dotnet/roslyn commit seems to be in a weird spot: after Humanizer refs were added, but in the wrong places.I'm seeing kind of the opposite in terms of the DLLs being in the SDK. Nothing for
find . -iname '*workspaces*'in the SDK, butMicrosoft.CodeAnalysis.CSharp.CodeStyle.dllis where @omajid found it.Which would be a good thing for us. Maybe
Microsoft.CodeAnalysis.CSharp.Workspacesis VS-specific and we don't care about all this?14 remaining items
dagood commentedon Nov 16, 2020
We still need it for Roslyn though, right? @omajid are you still planning to work on this?
omajid commentedon Nov 16, 2020
I am still a little confused as to why it's not shipped as part of the Microsoft SDK ...
If we (still) need it in source-build, sure, I can look into this.
dagood commentedon Nov 17, 2020
@333fred have you looked into this?
We could throw it in SBRP if it's only compiled against and never executed, I guess. Since it's not shipping in the SDK that seems possible.
We weren't able to patch out usages in the 5.0.0 GA PR (#1767 (comment)) so it doesn't seem worthwhile to try that approach again.
Add Humanizer.Core
Add Humanizer.Core
Add Humanizer.Core
Add Humanizer.Core
Add Humanizer.Core
Add Humanizer.Core
Add Humanizer.Core
Add Humanizer.Core
Add Humanizer.Core (#1895)
omajid commentedon Nov 20, 2020
Fixed with #1895
Update to 5.0 GA (#1845)