-
Notifications
You must be signed in to change notification settings - Fork 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
Remove dependency on all Roslyn assemblies from build host #73497
Conversation
@@ -1034,8 +1021,8 @@ public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selecto | |||
where TNamedTypeSymbol : class, TNamespaceOrTypeSymbol | |||
where TNamespaceSymbol : class, TNamespaceOrTypeSymbol | |||
{ | |||
foreach (var (name, value) in dictionary) | |||
result.Add(name, createMembers(value)); | |||
foreach (var entry in dictionary) |
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.
Avoid dependency on KeyValuePair deconstructor extension
@jasonmalinowski @dibarbet @dotnet/roslyn-ide @dotnet/roslyn-compiler ptal |
@@ -11,45 +11,6 @@ namespace Roslyn.Utilities | |||
{ | |||
internal static class EnumUtilities | |||
{ | |||
/// <summary> |
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.
Moved, renamed and simplified
using System.Text; | ||
|
||
namespace Microsoft.CodeAnalysis | ||
{ | ||
internal static partial class EncodingExtensions | ||
{ | ||
/// <summary> |
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.
Moved and simplified
@@ -764,19 +764,6 @@ public static ImmutableArray<T> Distinct<T>(this ImmutableArray<T> array, IEqual | |||
return result; | |||
} | |||
|
|||
internal static bool HasAnyErrors<T>(this ImmutableArray<T> diagnostics) where T : Diagnostic |
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.
Moved
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.
seems reasonable
Implements #70945
Reduces size of the Workspace.MSBuild package from 33.5MB down to 4.3MB.
This in turn reduces the size of the .NET SDK and the VS Code Extension by the same amount.
net472:
netcore:
As noted in #70945, the build host only used a handful of compiler types. These types can be easily avoided. The build host also uses quite a few extensions and utilities, which can be linked instead of referenced. To make the linking cleaner this change moves a few types defined in the compiler
InternalUtilities
that had dependencies on non-utility Roslyn types elsewhere. This allows the host to simply link to all internal utilities.As a follow up, I believe it would be useful to rename
InternalUtilities
toFrameworkUtilities
and treat this code as a layer below the compiler (on the same level as PooledObjects and Collections).