Skip to content

Commit

Permalink
Merge pull request #2196 from JoeRobich/update-build-tools4
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeRobich authored Jul 27, 2021
2 parents cc651b2 + f4a6654 commit b5d9d7c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 34 deletions.
2 changes: 1 addition & 1 deletion build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<MicrosoftTestPackageVersion>16.9.4</MicrosoftTestPackageVersion>
<MSBuildPackageVersion>16.10.0</MSBuildPackageVersion>
<NuGetPackageVersion>5.2.0</NuGetPackageVersion>
<RoslynPackageVersion>4.0.0-2.21354.7</RoslynPackageVersion>
<RoslynPackageVersion>4.0.0-3.21373.8</RoslynPackageVersion>
<XunitPackageVersion>2.4.1</XunitPackageVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ internal static partial class CompletionListBuilder
{ WellKnownTags.Warning, CompletionItemKind.Text },
};

internal const string AwaitCompletionProvider = "Microsoft.CodeAnalysis.CSharp.Completion.Providers.AwaitCompletionProvider";
internal const string ObjectCreationCompletionProvider = "Microsoft.CodeAnalysis.CSharp.Completion.Providers.ObjectCreationCompletionProvider";
internal const string OverrideCompletionProvider = "Microsoft.CodeAnalysis.CSharp.Completion.Providers.OverrideCompletionProvider";
internal const string PartialMethodCompletionProvider = "Microsoft.CodeAnalysis.CSharp.Completion.Providers.PartialMethodCompletionProvider";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ internal static partial class CompletionListBuilder
var seenUnimportedCompletions = false;
var commitCharacterRuleCache = new Dictionary<ImmutableArray<CharacterSetModificationRule>, IReadOnlyList<char>>();
var commitCharacterRuleBuilder = new HashSet<char>();
var isOverrideOrPartialCompletion = completions.Items.Length > 0
&& completions.Items[0].GetProviderName() is OverrideCompletionProvider or PartialMethodCompletionProvider;

for (int i = 0; i < completions.Items.Length; i++)
{
Expand All @@ -51,23 +49,26 @@ internal static partial class CompletionListBuilder
// The completion is somehow expensive. Currently, this one of two categories: import completion, or override/partial
// completion.
Debug.Assert(completion.GetProviderName() is OverrideCompletionProvider or PartialMethodCompletionProvider
or TypeImportCompletionProvider or ExtensionMethodImportCompletionProvider);
or TypeImportCompletionProvider or ExtensionMethodImportCompletionProvider
or AwaitCompletionProvider);

changeSpan = typedSpan;

if (isOverrideOrPartialCompletion)
switch (completion.GetProviderName())
{
// For override and partial completion, we don't want to use the DisplayText as the insert text because they contain
// characters that will affect our ability to asynchronously resolve the change later.
insertText = completion.FilterText;
sortText = GetSortText(completion, labelText, expectingImportedItems);
hasAfterInsertStep = true;
}
else
{
insertText = completion.DisplayText;
sortText = '1' + completion.SortText;
seenUnimportedCompletions = true;
case OverrideCompletionProvider or PartialMethodCompletionProvider or AwaitCompletionProvider:
// For override and partial completion, we don't want to use the DisplayText as the insert text because they contain
// characters that will affect our ability to asynchronously resolve the change later.
insertText = completion.FilterText;
sortText = GetSortText(completion, labelText, expectingImportedItems);
hasAfterInsertStep = true;
break;

default: // case TypeImportCompletionProvider or ExtensionMethodImportCompletionProvider:
insertText = completion.DisplayText;
sortText = '1' + completion.SortText;
seenUnimportedCompletions = true;
break;
}
}
else
Expand Down
36 changes: 18 additions & 18 deletions tools/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
-->

<!-- These packages should match the "MicrosoftNETSdkPackageVersion" property-->
<package id="Microsoft.NET.Sdk" version="6.0.100-preview.6.21358.20" />
<package id="Microsoft.DotNet.MSBuildSdkResolver" version="6.0.100-preview.6.21358.20" />
<package id="Microsoft.NET.Sdk" version="6.0.100-preview.7.21376.11" />
<package id="Microsoft.DotNet.MSBuildSdkResolver" version="6.0.100-preview.7.21376.11" />

<!-- These packages should match the "MicrosoftNETCoreDotNetHostResolverPackageVersion" property -->
<package id="runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.6.21352.12" />
<package id="runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.6.21352.12" />
<package id="runtime.win-x64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.6.21352.12" />
<package id="runtime.win-x86.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.6.21352.12" />
<package id="runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.6.21352.12" />
<package id="runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.7.21373.17" />
<package id="runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.7.21373.17" />
<package id="runtime.win-x64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.7.21373.17" />
<package id="runtime.win-x86.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.7.21373.17" />
<package id="runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.7.21373.17" />

<!--
The version for these packages can be found in the dotnet/sdk eng/Versions.props file in
Expand All @@ -30,22 +30,22 @@
-->

<!-- These packages should match the "MicrosoftBuildPackageVersion" property -->
<package id="Microsoft.Build" version="17.0.0-preview-21359-01" />
<package id="Microsoft.Build.Framework" version="17.0.0-preview-21359-01" />
<package id="Microsoft.Build.Runtime" version="17.0.0-preview-21359-01" />
<package id="Microsoft.Build.Tasks.Core" version="17.0.0-preview-21359-01" />
<package id="Microsoft.Build.Utilities.Core" version="17.0.0-preview-21359-01" />
<package id="Microsoft.Build" version="17.0.0-preview-21376-04" />
<package id="Microsoft.Build.Framework" version="17.0.0-preview-21376-04" />
<package id="Microsoft.Build.Runtime" version="17.0.0-preview-21376-04" />
<package id="Microsoft.Build.Tasks.Core" version="17.0.0-preview-21376-04" />
<package id="Microsoft.Build.Utilities.Core" version="17.0.0-preview-21376-04" />
<!-- This package should match as well except the Major & Minor version are set to 1.0 -->
<package id="Microsoft.NET.StringTools" version="1.0.0-preview-21359-01" />
<package id="Microsoft.NET.StringTools" version="1.0.0-preview-21376-04" />

<!-- This package should match the "MicrosoftNetCompilersToolsetPackageVersion" property-->
<package id="Microsoft.Net.Compilers.Toolset" version="4.0.0-2.21358.2" />
<package id="Microsoft.Net.Compilers.Toolset" version="4.0.0-3.21373.8" />

<!-- These packages should match the "NuGetBuildTasksPackageVersion" property -->
<package id="Microsoft.Build.NuGetSdkResolver" version="6.0.0-preview.2.129" />
<package id="NuGet.Build.Tasks" version="6.0.0-preview.2.129" />
<package id="NuGet.Commands" version="6.0.0-preview.2.129" />
<package id="NuGet.Credentials" version="6.0.0-preview.2.129" />
<package id="Microsoft.Build.NuGetSdkResolver" version="6.0.0-preview.3.158" />
<package id="NuGet.Build.Tasks" version="6.0.0-preview.3.158" />
<package id="NuGet.Commands" version="6.0.0-preview.3.158" />
<package id="NuGet.Credentials" version="6.0.0-preview.3.158" />

<!-- This package should match the "NewtonsoftJsonPackageVersion" property-->
<package id="Newtonsoft.Json" version="12.0.3" />
Expand Down

0 comments on commit b5d9d7c

Please sign in to comment.