diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 5e9856ef8a557..0d026f18ccbe8 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -32,12 +32,12 @@ variables: - group: DotNet-Roslyn-SDLValidation-Params - group: DotNet-Roslyn-Insertion-Variables - # To retrieve OptProf data we need to authenticate to the VS drop storage. - # If the pipeline is running in DevDiv, the account has access to the VS drop storage. # Get $AccessToken-dotnet-build-bot-public-repo from DotNet-GitHub-Versions-Repo-Write - group: DotNet-GitHub-Versions-Repo-Write + # To retrieve OptProf data we need to authenticate to the VS drop storage. + # If the pipeline is running in DevDiv, the account has access to the VS drop storage. - name: _DevDivDropAccessToken - value: $(System.AccessToken) + value: '' stages: - stage: build diff --git a/eng/Signing.props b/eng/Signing.props index 44c1e813c69ef..a3b096a15d715 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -42,5 +42,13 @@ + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0eb399d7ab8c7..120d54df68bd1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -6,9 +6,9 @@ 7e80445ee82adbf9a8e6ae601ac5e239d982afaa - + https://github.com/dotnet/source-build-externals - abff160e44e7b81ade066d176639fc6d78527478 + 3a88d1dbd4557702aa2cb89d5f8bf927bb263a3b diff --git a/eng/Versions.props b/eng/Versions.props index 5f13be7efce24..35ff9797cc2af 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -39,7 +39,7 @@ repository. This must be lower than MicrosoftNetCompilersToolsetVersion, but not higher than our minimum dogfoodable Visual Studio version, or else the generators we build would load on the command line but not load in IDEs. --> - 3.8.0 + 4.1.0 7.0.0-alpha.1.22060.1 3.1.4097 17.2.32 diff --git a/eng/pipelines/build-windows-job.yml b/eng/pipelines/build-windows-job.yml index 0948f70550426..4b27cddfc9529 100644 --- a/eng/pipelines/build-windows-job.yml +++ b/eng/pipelines/build-windows-job.yml @@ -37,13 +37,13 @@ jobs: displayName: Restore inputs: filePath: eng/build.ps1 - arguments: -configuration ${{ parameters.configuration }} -prepareMachine -ci -restore -binaryLog + arguments: -configuration ${{ parameters.configuration }} -prepareMachine -ci -restore -binaryLog /p:UsingToolPdbConverter=false /p:UsingToolVSSDK=false /p:GenerateSatelliteAssemblies=false - task: PowerShell@2 displayName: Build inputs: filePath: eng/build.ps1 - arguments: -configuration ${{ parameters.configuration }} -prepareMachine -ci -build -publish -binaryLog -skipDocumentation ${{ parameters.buildArguments }} + arguments: -configuration ${{ parameters.configuration }} -prepareMachine -ci -build -binaryLog -skipDocumentation /p:UsingToolPdbConverter=false /p:UsingToolVSSDK=false /p:GenerateSatelliteAssemblies=false /p:PublishReadyToRun=false ${{ parameters.buildArguments }} - task: PowerShell@2 displayName: Prepare Unit Tests diff --git a/eng/targets/DoNotDeployToSymStore_Workaround.targets b/eng/targets/DoNotDeployToSymStore_Workaround.targets new file mode 100644 index 0000000000000..42d9c7317db84 --- /dev/null +++ b/eng/targets/DoNotDeployToSymStore_Workaround.targets @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/eng/targets/DoNotGenerateSatelliteAssemblies_Workaround.targets b/eng/targets/DoNotGenerateSatelliteAssemblies_Workaround.targets new file mode 100644 index 0000000000000..97b1f4b3dfb7b --- /dev/null +++ b/eng/targets/DoNotGenerateSatelliteAssemblies_Workaround.targets @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/eng/targets/Imports.targets b/eng/targets/Imports.targets index 9645e7e596491..1f4ad40af1007 100644 --- a/eng/targets/Imports.targets +++ b/eng/targets/Imports.targets @@ -1,7 +1,7 @@  - + false + + true + false enable @@ -53,6 +56,13 @@ false false + + + + false + @@ -20,27 +22,129 @@ - + + - + + + + <_R2RAssemblies Include="@(ReferencePath->'%(FileName)%(Extension)')" Condition="'%(ReferenceSourceTarget)' == 'ProjectReference'" /> + + + <_R2RAssemblies Include="Microsoft.CodeAnalysis.Elfie.dll" /> + <_R2RAssemblies Include="Microsoft.ServiceHub.Framework.dll" /> + <_R2RAssemblies Include="Microsoft.VisualStudio.Composition.dll" /> + <_R2RAssemblies Include="Microsoft.VisualStudio.Telemetry.dll" /> + <_R2RAssemblies Include="Microsoft.VisualStudio.Threading.dll" /> + <_R2RAssemblies Include="MessagePack.dll" /> + <_R2RAssemblies Include="Nerdback.Streams.dll" /> + <_R2RAssemblies Include="Newtonsoft.Json.dll" /> + <_R2RAssemblies Include="SQLitePCLRaw.batteries_v2.dll" /> + <_R2RAssemblies Include="StreamJsonRpc.dll" /> + <_R2RAssemblies Include="System.IO.Pipelines.dll" /> + + + <_AllPublishedAssemblyPaths Include="$(PublishDir)**\*.dll" Exclude="$(PublishDir)**\*.resources.dll" /> + <_AllPublishedAssemblies Include="@(_AllPublishedAssemblyPaths->'%(FileName)%(Extension)')" > + <_FullFilePath>%(FullPath) + + + + <_NoR2RAssemblies Include="@(_AllPublishedAssemblies)" Exclude="@(_R2RAssemblies)" > + <_FullFilePath>%(_AllPublishedAssemblies._FullFilePath) + + <_NoR2RAssemblyPaths Include="@(_NoR2RAssemblies->'%(_FullFilePath)')" /> + + + <_R2RAssemblyPaths Include="@(_AllPublishedAssemblyPaths)" Exclude="@(_NoR2RAssemblyPaths)" /> + + + + $(PublishDir)CrossGen\ + $(CrossgenWorkDir)OriginalAssemblies\ + + + + + + + + + <_CrossgenTargetsAsDependencies Include="$(OriginalAssemblyDir)*.dll" /> + <_NonCrossgenTargetsAsDependencies Include="@(_NonRuntimeAssembliesInPublishDir)" Exclude="@(_R2RAssemblyPaths)" /> + <_CrossgenTargetPaths Include="@(_CrossgenTargetsAsDependencies)"> + $(PublishDir)%(_CrossgenTargetsAsDependencies.Filename)%(_CrossgenTargetsAsDependencies.Extension) + + + + + + + <_Crossgen2Path>$(PkgMicrosoft_NETCore_App_crossgen2_win-x64)\tools\crossgen2.dll + <_R2ROptimizeAssemblyPath>%(_CrossgenTargetPaths.FullPath) + <_R2ROptimizeAssemblyOutputPath>$(PublishDir)%(_CrossgenTargetPaths.Filename)%(_CrossgenTargetPaths.Extension) + <_RspFilePath>$(CrossgenWorkDir)%(_CrossgenTargetPaths.Filename).CrossgenArgs.rsp + + + <_RspFileLines Include="$(_R2ROptimizeAssemblyPath)" /> + <_RspFileLines Include="--out:$(_R2ROptimizeAssemblyOutputPath)" /> + <_RspFileLines Include="--targetarch:x64" /> + <_RspFileLines Include="--optimize" /> + <_RspFileLines Include="@(_RuntimeLibraries->'--reference:%(FullPath)')" /> + <_RspFileLines Include="@(_CrossgenTargetsAsDependencies->'--reference:%(FullPath)')" /> + <_RspFileLines Include="@(_NonCrossgenTargetsAsDependencies->'--reference:%(FullPath)')" /> + + + + + + + + + + + + + + <_RuntimeLibraries Include="$(PkgMicrosoft_NETCore_App_Runtime_win-x64)\runtimes\win-x64\**\*.dll" /> - <_RuntimeLibraries Include="$(PkgMicrosoft_WindowsDesktop_App_Runtime_win-x64)\runtimes\win-x64\**\*.dll" /> + <_WinRuntimeLibraries Include="$(PkgMicrosoft_WindowsDesktop_App_Runtime_win-x64)\runtimes\win-x64\**\*.dll" /> + + <_RuntimeLibrariesInPublishDir Include="@(_RuntimeLibraries->'$(PublishDir)%(FileName)%(Extension)')" /> + <_RuntimeLibrariesInPublishDir Include="@(_WinRuntimeLibraries->'$(PublishDir)%(FileName)%(Extension)')" /> + + <_NonRuntimeAssembliesInPublishDir Include="$(PublishDir)*.dll" Exclude="@(_RuntimeLibrariesInPublishDir)" /> + + + + + <_ExcludedFiles Include="$(PublishDir)**\Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.*" /> <_ExcludedFiles Include="$(PublishDir)**\*.pdb" /> + <_ExcludedFiles Include="$(CrossgenWorkDir)**\*" /> + - <_ExcludedFiles Include="$(PublishDir)\runtimes\**\*.*" /> + <_ExcludedFiles Include="$(PublishDir)runtimes\**\*.*" /> - <_ExcludedFiles Include="@(_RuntimeLibraries->'$(PublishDir)\%(FileName)%(Extension)')" /> + <_ExcludedFiles Include="@(_RuntimeLibrariesInPublishDir)" /> diff --git a/src/Workspaces/Remote/ServiceHub/Services/Renamer/RemoteRenamerService.cs b/src/Workspaces/Remote/ServiceHub/Services/Renamer/RemoteRenamerService.cs index e1b0bcfeac5c4..37bccd4d54aa5 100644 --- a/src/Workspaces/Remote/ServiceHub/Services/Renamer/RemoteRenamerService.cs +++ b/src/Workspaces/Remote/ServiceHub/Services/Renamer/RemoteRenamerService.cs @@ -93,6 +93,7 @@ private CodeCleanupOptionsProvider GetClientOptionsProvider(RemoteServiceCallbac public ValueTask ResolveConflictsAsync( Checksum solutionChecksum, RemoteServiceCallbackId callbackId, + SerializableSymbolAndProjectId symbolAndProjectId, SerializableRenameLocations renameLocationSet, string replacementText, ImmutableArray nonConflictSymbolIds, @@ -100,11 +101,16 @@ private CodeCleanupOptionsProvider GetClientOptionsProvider(RemoteServiceCallbac { return RunServiceAsync(solutionChecksum, async solution => { + var symbol = await symbolAndProjectId.TryRehydrateAsync(solution, cancellationToken).ConfigureAwait(false); + if (symbol is null) + return null; + var nonConflictSymbols = await GetNonConflictSymbolsAsync(solution, nonConflictSymbolIds, cancellationToken).ConfigureAwait(false); var fallbackOptions = GetClientOptionsProvider(callbackId); - var rehydratedSet = await RenameLocations.TryRehydrateAsync(solution, fallbackOptions, renameLocationSet, cancellationToken).ConfigureAwait(false); + var rehydratedSet = await RenameLocations.TryRehydrateAsync( + solution, symbol, fallbackOptions, renameLocationSet, cancellationToken).ConfigureAwait(false); if (rehydratedSet == null) return null; diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/ICollectionExtensions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/ICollectionExtensions.cs index a2b71c59a2705..0573f341259b3 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/ICollectionExtensions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/ICollectionExtensions.cs @@ -4,11 +4,26 @@ using System; using System.Collections.Generic; +using System.Collections.Immutable; +using Microsoft.CodeAnalysis.PooledObjects; namespace Microsoft.CodeAnalysis.Shared.Extensions { internal static class ICollectionExtensions { + public static ImmutableArray WhereAsArray(this IEnumerable values, Func predicate, TState state) + { + using var _ = ArrayBuilder.GetInstance(out var result); + + foreach (var value in values) + { + if (predicate(value, state)) + result.Add(value); + } + + return result.ToImmutable(); + } + public static void RemoveRange(this ICollection collection, IEnumerable? items) { if (collection == null) diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Log/FunctionId.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Log/FunctionId.cs index b488968f7bbe9..ffe3ce4f8dd9e 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Log/FunctionId.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Log/FunctionId.cs @@ -548,5 +548,19 @@ internal enum FunctionId Refactoring_FixAllOccurrencesPreviewChanges = 563, LSP_UsedForkedSolution = 571, + + ApplyChangesOperation_WorkspaceVersionMatch_ApplicationSucceeded = 580, + ApplyChangesOperation_WorkspaceVersionMatch_ApplicationFailed = 581, + ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationSucceeded = 582, + ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_IncompatibleSolutionChange = 583, + ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_IncompatibleProjectChange = 584, + ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_NoChangedDocument = 585, + ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_NoTextChange = 586, + ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_DocumentRemoved = 587, + ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_TextChangeConflict = 588, + + // please leave the range up through 600 free in case we need to add more items to learn more about ApplyChangesOperation results. + + Next = 600 } }