From 4f5f083205018de6e516576c60f2bd9f398971b7 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Mon, 5 Aug 2019 15:07:13 -0700 Subject: [PATCH 01/51] update 16.4 version numbers --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 10343461d1..b844a2d4b5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,14 +23,14 @@ $(FSCorePackageVersion)-$(PreReleaseVersionLabel).* - 10.6 + 10.7 $(FSPackageMajorVersion).0 $(FSPackageVersion) $(FSPackageVersion).0 16 - 3 + 4 $(VSMajorVersion).0 $(VSMajorVersion).$(VSMinorVersion).0 $(VSAssemblyVersionPrefix).0 From 9d2511f961f6788de64fa752267eb443c1756370 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 8 Aug 2019 14:35:19 -0700 Subject: [PATCH 02/51] update build definition to use stages (#7361) * update build definition to use stages * disable arcade NuGet package validation --- .vsts-signed.yaml | 253 +++++++++++--------- azure-pipelines.yml | 552 +++++++++++++++++++++++--------------------- 2 files changed, 423 insertions(+), 382 deletions(-) diff --git a/.vsts-signed.yaml b/.vsts-signed.yaml index ed30cb74ef..13afde5aab 100644 --- a/.vsts-signed.yaml +++ b/.vsts-signed.yaml @@ -11,117 +11,144 @@ variables: #- name: SkipTests # defaultValue: false -jobs: -- job: Full_Signed - pool: - name: VSEng-MicroBuildVS2019 - timeoutInMinutes: 300 - variables: - BuildConfiguration: 'Release' - steps: - - # Install Signing Plugin - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 - displayName: Install Signing Plugin - inputs: - signType: real - esrpSigning: true - condition: and(succeeded(), ne(variables['SignType'], '')) - - # Build - - script: eng\CIBuild.cmd - -configuration $(BuildConfiguration) - -testAll - -officialSkipTests $(SkipTests) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - /p:VisualStudioDropName=$(VisualStudioDropName) - /p:DotNetSignType=$(SignType) - /p:DotNetPublishToBlobFeed=true - /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) - /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - /p:PublishToSymbolServer=true - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - displayName: Build - - # Publish logs - - task: PublishBuildArtifacts@1 - displayName: Publish Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)' - ArtifactName: 'Build Diagnostic Files' - publishLocation: Container - continueOnError: true - condition: succeededOrFailed() - - # Publish test results - - task: PublishBuildArtifacts@1 - displayName: Publish Test Results - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults' - ArtifactName: 'Test Results' - publishLocation: Container - continueOnError: true - condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) - - # Upload VSTS Drop - - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 - displayName: Upload VSTS Drop - inputs: - DropName: $(VisualStudioDropName) - DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' - condition: succeeded() - - # Publish an artifact that the RoslynInsertionTool is able to find by its name. - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact VSSetup - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' - ArtifactName: 'VSSetup' - condition: succeeded() - - # Archive NuGet packages to DevOps. - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Packages - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)' - ArtifactName: 'Packages' - condition: succeeded() - - # Publish nightly package to ADO - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Nightly - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\VisualFSharpFull.vsix' - ArtifactName: 'Nightly' - condition: succeeded() - - # Package publish - - task: PublishBuildArtifacts@1 - displayName: Push Asset Manifests - inputs: - PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest' - ArtifactName: AssetManifests - continueOnError: true - condition: succeeded() - - # Publish native PDBs for archiving - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Symbols - inputs: - PathtoPublish: '$(Build.SourcesDirectory)/artifacts/SymStore/$(BuildConfiguration)' - ArtifactName: NativeSymbols - condition: succeeded() - - # Execute cleanup tasks - - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 - displayName: Execute cleanup tasks - condition: succeededOrFailed() - -- template: /eng/common/templates/job/publish-build-assets.yml - parameters: - dependsOn: - - Full_Signed +stages: +- stage: build + displayName: Build + + jobs: + - job: Full_Signed pool: - vmImage: windows-2019 - enablePublishBuildArtifacts: true + name: VSEng-MicroBuildVS2019 + timeoutInMinutes: 300 + variables: + BuildConfiguration: 'Release' + steps: + + # Install Signing Plugin + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 + displayName: Install Signing Plugin + inputs: + signType: real + esrpSigning: true + condition: and(succeeded(), ne(variables['SignType'], '')) + + # Build + - script: eng\CIBuild.cmd + -configuration $(BuildConfiguration) + -testAll + -officialSkipTests $(SkipTests) + /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:VisualStudioDropName=$(VisualStudioDropName) + /p:DotNetSignType=$(SignType) + /p:DotNetPublishToBlobFeed=true + /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) + /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:PublishToSymbolServer=true + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) + displayName: Build + + # Publish logs + - task: PublishBuildArtifacts@1 + displayName: Publish Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)' + ArtifactName: 'Build Diagnostic Files' + publishLocation: Container + continueOnError: true + condition: succeededOrFailed() + + # Publish test results + - task: PublishBuildArtifacts@1 + displayName: Publish Test Results + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults' + ArtifactName: 'Test Results' + publishLocation: Container + continueOnError: true + condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) + + # Upload VSTS Drop + - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 + displayName: Upload VSTS Drop + inputs: + DropName: $(VisualStudioDropName) + DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' + condition: succeeded() + + # Publish an artifact that the RoslynInsertionTool is able to find by its name. + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact VSSetup + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' + ArtifactName: 'VSSetup' + condition: succeeded() + + # Archive NuGet packages to DevOps. + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Packages + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)' + ArtifactName: 'Packages' + condition: succeeded() + + # Publish nightly package to ADO + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Nightly + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\VisualFSharpFull.vsix' + ArtifactName: 'Nightly' + condition: succeeded() + + # Package publish + - task: PublishBuildArtifacts@1 + displayName: Push Asset Manifests + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest' + ArtifactName: AssetManifests + continueOnError: true + condition: succeeded() + + # Publish PackageArtifacts for Arcade verification + - task: PublishBuildArtifacts@1 + displayName: Publish PackageArtifacts + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)\Shipping' + ArtifactName: 'PackageArtifacts' + condition: succeeded() + + # Publish BlobArtifacts for Arcade verification + - task: PublishBuildArtifacts@1 + displayName: Publish BlobArtifacts + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)\Shipping' + ArtifactName: 'BlobArtifacts' + condition: succeeded() + + # Publish native PDBs for archiving + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Symbols + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/SymStore/$(BuildConfiguration)' + ArtifactName: NativeSymbols + condition: succeeded() + + # Execute cleanup tasks + - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 + displayName: Execute cleanup tasks + condition: succeededOrFailed() + + - template: /eng/common/templates/job/publish-build-assets.yml + parameters: + dependsOn: + - Full_Signed + pool: + vmImage: windows-2019 + enablePublishBuildArtifacts: true + +- template: eng/common/templates/post-build/post-build.yml + parameters: + # NuGet validation currently fails due to the `` field of the package being set to `Microsoft and F# Software Foundation` instead of just `Microsoft` + enableNugetValidation: false + # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. + enableSymbolValidation: false diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 87306e5c60..cf9279949d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,285 +28,299 @@ variables: #- name: SkipTests # defaultValue: false -jobs: +stages: +- stage: build + displayName: Build + jobs: -#---------------------------------------------------------------------------------------------------------------------# -# Signed build # -#---------------------------------------------------------------------------------------------------------------------# -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: false - enablePublishBuildAssets: true - enablePublishUsingPipelines: $(_PublishUsingPipelines) - enableTelemetry: true - helixRepo: dotnet/fsharp - jobs: - - job: Full_Signed - pool: - name: NetCoreInternal-Int-Pool - queue: buildpool.windows.10.amd64.vs2019 - timeoutInMinutes: 300 - variables: - - group: DotNet-Blob-Feed - - group: DotNet-Symbol-Server-Pats - - name: _SignType - value: Real - - name: _DotNetPublishToBlobFeed - value: true - steps: - - checkout: self - clean: true - - script: eng\CIBuild.cmd - -configuration $(_BuildConfig) - -prepareMachine - -testAll - -officialSkipTests $(SkipTests) - /p:SignType=$(_SignType) - /p:DotNetSignType=$(_SignType) - /p:MicroBuild_SigningEnabled=true - /p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - /p:TeamName=$(_TeamName) - /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) - /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - /p:DotNetPublishToBlobFeed=true - /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) - /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - /p:PublishToSymbolServer=true - /p:VisualStudioDropName=$(VisualStudioDropName) - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - continueOnError: true - condition: ne(variables['SkipTests'], 'true') - - task: PublishBuildArtifacts@1 - displayName: Publish Test Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_BuildConfig)' - ArtifactName: 'Test Logs' - publishLocation: Container - continueOnError: true - condition: ne(variables['SkipTests'], 'true') - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Packages - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(_BuildConfig)' - ArtifactName: 'Packages' - condition: succeeded() - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact VSSetup - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion' - ArtifactName: 'VSSetup' - condition: succeeded() - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Nightly - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpFull.vsix' - ArtifactName: 'Nightly' - condition: succeeded() - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Symbols - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)' - ArtifactName: 'NativeSymbols' - condition: succeeded() + #-------------------------------------------------------------------------------------------------------------------# + # Signed build # + #-------------------------------------------------------------------------------------------------------------------# + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishBuildArtifacts: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: $(_PublishUsingPipelines) + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: + - job: Full_Signed + pool: + name: NetCoreInternal-Pool + queue: buildpool.windows.10.amd64.vs2019 + timeoutInMinutes: 300 + variables: + - group: DotNet-Blob-Feed + - group: DotNet-Symbol-Server-Pats + - name: _SignType + value: Real + - name: _DotNetPublishToBlobFeed + value: true + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd + -configuration $(_BuildConfig) + -prepareMachine + -testAll + -officialSkipTests $(SkipTests) + /p:SignType=$(_SignType) + /p:DotNetSignType=$(_SignType) + /p:MicroBuild_SigningEnabled=true + /p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:TeamName=$(_TeamName) + /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) + /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:DotNetPublishToBlobFeed=true + /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) + /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) + /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:PublishToSymbolServer=true + /p:VisualStudioDropName=$(VisualStudioDropName) + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: ne(variables['SkipTests'], 'true') + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_BuildConfig)' + ArtifactName: 'Test Logs' + publishLocation: Container + continueOnError: true + condition: ne(variables['SkipTests'], 'true') + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Packages + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(_BuildConfig)' + ArtifactName: 'Packages' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact VSSetup + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion' + ArtifactName: 'VSSetup' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Nightly + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpFull.vsix' + ArtifactName: 'Nightly' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Symbols + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)' + ArtifactName: 'NativeSymbols' + condition: succeeded() -#---------------------------------------------------------------------------------------------------------------------# -# PR builds # -#---------------------------------------------------------------------------------------------------------------------# -- ${{ if eq(variables['System.TeamProject'], 'public') }}: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: false - enablePublishBuildAssets: true - enablePublishUsingPipelines: $(_PublishUsingPipelines) - enableTelemetry: true - helixRepo: dotnet/fsharp - jobs: + #-------------------------------------------------------------------------------------------------------------------# + # PR builds # + #-------------------------------------------------------------------------------------------------------------------# + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishBuildArtifacts: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: $(_PublishUsingPipelines) + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: - # Windows - - job: Windows - pool: - vmImage: windows-2019 - timeoutInMinutes: 120 - strategy: - maxParallel: 4 - matrix: - desktop_release: - _configuration: Release - _testKind: testDesktop - coreclr_release: - _configuration: Release - _testKind: testCoreclr - fsharpqa_release: - _configuration: Release - _testKind: testFSharpQA - vs_release: - _configuration: Release - _testKind: testVs - steps: - - checkout: self - clean: true - - script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind) - displayName: Build / Test - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)' - continueOnError: true - condition: ne(variables['_testKind'], 'testFSharpQA') - - task: PublishBuildArtifacts@1 - displayName: Publish Test Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)' - ArtifactName: 'Windows $(_configuration) $(_testKind) test logs' - publishLocation: Container - continueOnError: true - condition: eq(variables['_testKind'], 'testFSharpQA') + # Windows + - job: Windows + pool: + vmImage: windows-2019 + timeoutInMinutes: 120 + strategy: + maxParallel: 4 + matrix: + desktop_release: + _configuration: Release + _testKind: testDesktop + coreclr_release: + _configuration: Release + _testKind: testCoreclr + fsharpqa_release: + _configuration: Release + _testKind: testFSharpQA + vs_release: + _configuration: Release + _testKind: testVs + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind) + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)' + continueOnError: true + condition: ne(variables['_testKind'], 'testFSharpQA') + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)' + ArtifactName: 'Windows $(_configuration) $(_testKind) test logs' + publishLocation: Container + continueOnError: true + condition: eq(variables['_testKind'], 'testFSharpQA') - # Linux - - job: Linux - pool: - vmImage: ubuntu-16.04 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr - displayName: Build / Test - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - continueOnError: true - condition: always() + # Linux + - job: Linux + pool: + vmImage: ubuntu-16.04 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: always() - # MacOS - - job: MacOS - pool: - vmImage: macOS-10.13 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr - displayName: Build / Test - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - continueOnError: true - condition: always() + # MacOS + - job: MacOS + pool: + vmImage: macOS-10.13 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: always() - # Source Build Linux - - job: SourceBuild_Linux - pool: - vmImage: ubuntu-16.04 - steps: - - checkout: self - clean: true - - script: ./eng/cibuild.sh --configuration Release /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true - displayName: Build + # Source Build Linux + - job: SourceBuild_Linux + pool: + vmImage: ubuntu-16.04 + steps: + - checkout: self + clean: true + - script: ./eng/cibuild.sh --configuration Release /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true + displayName: Build - # Source Build Windows - - job: SourceBuild_Windows - pool: - vmImage: windows-2019 - steps: - - checkout: self - clean: true - - script: eng\CIBuild.cmd -configuration Release -noSign /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true - displayName: Build + # Source Build Windows + - job: SourceBuild_Windows + pool: + vmImage: windows-2019 + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd -configuration Release -noSign /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true + displayName: Build - # Up-to-date - - job: UpToDate_Windows - pool: - vmImage: windows-2019 - steps: - - checkout: self - clean: true - - task: PowerShell@2 - displayName: Run up-to-date build check - inputs: - filePath: eng\tests\UpToDate.ps1 - arguments: -configuration $(_BuildConfig) -ci -binaryLog + # Up-to-date + - job: UpToDate_Windows + pool: + vmImage: windows-2019 + steps: + - checkout: self + clean: true + - task: PowerShell@2 + displayName: Run up-to-date build check + inputs: + filePath: eng\tests\UpToDate.ps1 + arguments: -configuration $(_BuildConfig) -ci -binaryLog -#---------------------------------------------------------------------------------------------------------------------# -# FCS builds # -#---------------------------------------------------------------------------------------------------------------------# + #-------------------------------------------------------------------------------------------------------------------# + # FCS builds # + #-------------------------------------------------------------------------------------------------------------------# -- ${{ if eq(variables['System.TeamProject'], 'public') }}: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishTestResults: false - enablePublishBuildAssets: true - enablePublishUsingPipelines: false - enableTelemetry: true - helixRepo: dotnet/fsharp - jobs: + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: false + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: - - job: Windows_FCS - pool: - vmImage: windows-2019 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: fcs\build.cmd TestAndNuget - displayName: Build / Test - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release' - continueOnError: true - condition: always() + - job: Windows_FCS + pool: + vmImage: windows-2019 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: fcs\build.cmd TestAndNuget + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release' + continueOnError: true + condition: always() - - job: Linux_FCS - pool: - vmImage: ubuntu-16.04 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./fcs/build.sh Build - displayName: Build + - job: Linux_FCS + pool: + vmImage: ubuntu-16.04 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./fcs/build.sh Build + displayName: Build - - job: MacOS_FCS - pool: - vmImage: macOS-10.13 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./fcs/build.sh Build - displayName: Build + - job: MacOS_FCS + pool: + vmImage: macOS-10.13 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./fcs/build.sh Build + displayName: Build + +#---------------------------------------------------------------------------------------------------------------------# +# Post Build # +#---------------------------------------------------------------------------------------------------------------------# +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/common/templates/post-build/post-build.yml + parameters: + # NuGet validation currently fails due to the `` field of the package being set to `Microsoft and F# Software Foundation` instead of just `Microsoft` + enableNugetValidation: false + # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. + enableSymbolValidation: false From f675f66236890afc7b7df87ea1ca9d6d85f52c8a Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 8 Aug 2019 19:52:46 -0700 Subject: [PATCH 03/51] move attribution of F# Software Foundation to package description (#7370) Due to internal package publishing policies, the author of a package published via a Microsoft account must be exactly 'Microsoft'. To preserve attribution to the F# Software Foundation, mention is made in the tag of FSharp.Core. --- .vsts-signed.yaml | 2 -- azure-pipelines.yml | 2 -- eng/targets/Settings.props | 1 - src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj | 2 +- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.vsts-signed.yaml b/.vsts-signed.yaml index 13afde5aab..a93dcd1af9 100644 --- a/.vsts-signed.yaml +++ b/.vsts-signed.yaml @@ -148,7 +148,5 @@ stages: - template: eng/common/templates/post-build/post-build.yml parameters: - # NuGet validation currently fails due to the `` field of the package being set to `Microsoft and F# Software Foundation` instead of just `Microsoft` - enableNugetValidation: false # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. enableSymbolValidation: false diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cf9279949d..5dd52805da 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -320,7 +320,5 @@ stages: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - template: eng/common/templates/post-build/post-build.yml parameters: - # NuGet validation currently fails due to the `` field of the package being set to `Microsoft and F# Software Foundation` instead of just `Microsoft` - enableNugetValidation: false # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. enableSymbolValidation: false diff --git a/eng/targets/Settings.props b/eng/targets/Settings.props index 6360088320..3290288182 100644 --- a/eng/targets/Settings.props +++ b/eng/targets/Settings.props @@ -2,7 +2,6 @@ MIT - Microsoft and F# Software Foundation Visual F# Compiler FSharp functional programming $(ArtifactsBinDir) diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj index 4afaa51f7f..4bc3e61c16 100644 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj +++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj @@ -6,7 +6,7 @@ FSharp.Core FSharp.Core.nuspec true - FSharp.Core redistributables from Visual F# Tools version $(FSPackageMajorVersion) For F# $(FSCoreMajorVersion) + FSharp.Core redistributables from Visual F# Tools version $(FSPackageMajorVersion) For F# $(FSCoreMajorVersion). Contains code from the F# Software Foundation. From 00f9cfca93b71006c0cc8b45972a3c5415da9f54 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Tue, 13 Aug 2019 14:04:30 -0700 Subject: [PATCH 04/51] upload VSTS drop during internal build (#7392) --- azure-pipelines.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5dd52805da..53288c73d3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,6 +55,7 @@ stages: variables: - group: DotNet-Blob-Feed - group: DotNet-Symbol-Server-Pats + - group: DotNet-DevDiv-Insertion-Workflow-Variables - name: _SignType value: Real - name: _DotNetPublishToBlobFeed @@ -122,6 +123,13 @@ stages: PathtoPublish: '$(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)' ArtifactName: 'NativeSymbols' condition: succeeded() + - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 + displayName: Upload VSTS Drop + inputs: + DropName: $(VisualStudioDropName) + DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion' + AccessToken: $(dn-bot-devdiv-drop-rw-code-rw) + condition: succeeded() #-------------------------------------------------------------------------------------------------------------------# # PR builds # From a77767a37cc10bedf5855be66d63e80a5ec06261 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 5 Sep 2019 12:32:34 -0700 Subject: [PATCH 05/51] [release/dev16.4] Enable auto-insertion creation after signed builds. (#7499) * turn off broken source link validation * add VS insertion logic to build pipeline --- azure-pipelines.yml | 13 +++++ eng/release/insert-into-vs.yml | 54 ++++++++++++++++++ eng/release/scripts/GetAssemblyVersions.ps1 | 28 +++++++++ .../scripts/GetDefaultConfigVersions.ps1 | 29 ++++++++++ eng/release/scripts/GetPublishUrls.ps1 | 57 +++++++++++++++++++ 5 files changed, 181 insertions(+) create mode 100644 eng/release/insert-into-vs.yml create mode 100644 eng/release/scripts/GetAssemblyVersions.ps1 create mode 100644 eng/release/scripts/GetDefaultConfigVersions.ps1 create mode 100644 eng/release/scripts/GetPublishUrls.ps1 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 53288c73d3..56649a10f7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -330,3 +330,16 @@ stages: parameters: # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. enableSymbolValidation: false + # SourceLink improperly looks for generated files. See https://github.com/dotnet/arcade/issues/3069 + enableSourceLinkValidation: false + +#---------------------------------------------------------------------------------------------------------------------# +# VS Insertion # +#---------------------------------------------------------------------------------------------------------------------# +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/release/insert-into-vs.yml + parameters: + componentBranchName: refs/heads/release/dev16.4 + insertTargetBranch: master + insertTeamEmail: fsharpteam@microsoft.com + insertTeamName: 'F#' diff --git a/eng/release/insert-into-vs.yml b/eng/release/insert-into-vs.yml new file mode 100644 index 0000000000..0362a04fd0 --- /dev/null +++ b/eng/release/insert-into-vs.yml @@ -0,0 +1,54 @@ +parameters: + componentBranchName: '' + insertBuildPolicy: 'CloudBuild - Request RPS' + insertTargetBranch: '' + insertTeamEmail: '' + insertTeamName: '' + dependsOn: [build] + +stages: +- stage: insert + dependsOn: build + displayName: Insert into VS + jobs: + - job: Insert_VS + pool: + vmImage: vs2017-win2016 + variables: + - group: DotNet-VSTS-Infra-Access + - name: InsertAccessToken + value: $(dn-bot-devdiv-build-rw-code-rw-release-rw) + - name: InsertBuildPolicy + value: ${{ parameters.insertBuildPolicy }} + - name: InsertTargetBranch + value: ${{ parameters.insertTargetBranch }} + - name: InsertTeamEmail + value: ${{ parameters.insertTeamEmail }} + - name: InsertTeamName + value: ${{ parameters.insertTeamName }} + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Insertion Artifacts + inputs: + buildType: current + artifactName: VSSetup + - task: PowerShell@2 + displayName: Get Publish URLs + inputs: + filePath: $(Build.SourcesDirectory)/eng/release/scripts/GetPublishUrls.ps1 + arguments: -accessToken $(System.AccessToken) -buildId $(Build.BuildId) -insertionDir $(Build.ArtifactStagingDirectory)\VSSetup + - task: PowerShell@2 + displayName: Get versions for default.config + inputs: + filePath: $(Build.SourcesDirectory)/eng/release/scripts/GetDefaultConfigVersions.ps1 + arguments: -packagesDir $(Build.ArtifactStagingDirectory)\VSSetup\DevDivPackages + - task: PowerShell@2 + displayName: Get versions for AssemblyVersions.tt + inputs: + filePath: $(Build.SourcesDirectory)/eng/release/scripts/GetAssemblyVersions.ps1 + arguments: -assemblyVersionsPath $(Build.ArtifactStagingDirectory)\VSSetup\DevDivPackages\DependentAssemblyVersions.csv + - task: ms-vseng.MicroBuildShipTasks.55100717-a81d-45ea-a363-b8fe3ec375ad.MicroBuildInsertVsPayload@2 + displayName: 'Insert VS Payload' + inputs: + LinkWorkItemsToPR: false + condition: and(succeeded(), eq(variables['Build.SourceBranch'], ${{ parameters.componentBranchName }})) diff --git a/eng/release/scripts/GetAssemblyVersions.ps1 b/eng/release/scripts/GetAssemblyVersions.ps1 new file mode 100644 index 0000000000..2b75ac1dd5 --- /dev/null +++ b/eng/release/scripts/GetAssemblyVersions.ps1 @@ -0,0 +1,28 @@ +[CmdletBinding(PositionalBinding=$false)] +param ( + [string]$assemblyVersionsPath +) + +Set-StrictMode -version 2.0 +$ErrorActionPreference = "Stop" + +try { + [string[]]$lines = Get-Content -Path $assemblyVersionsPath | ForEach-Object { + $parts = $_ -Split ",",2 + $asm = $parts[0] + $ver = $parts[1] + $asmConst = ($asm -Replace "\.","") + "Version" + $output = "$asmConst=$ver" + $output + } + + $final = $lines -Join "," + Write-Host "Setting InsertVersionsValues to $final" + Write-Host "##vso[task.setvariable variable=InsertVersionsValues]$final" +} +catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + exit 1 +} diff --git a/eng/release/scripts/GetDefaultConfigVersions.ps1 b/eng/release/scripts/GetDefaultConfigVersions.ps1 new file mode 100644 index 0000000000..d0f1f67fc5 --- /dev/null +++ b/eng/release/scripts/GetDefaultConfigVersions.ps1 @@ -0,0 +1,29 @@ +[CmdletBinding(PositionalBinding=$false)] +param ( + [string]$packagesDir +) + +Set-StrictMode -version 2.0 +$ErrorActionPreference = "Stop" + +try { + $packages = @() + $regex = "^(.*?)\.((?:\.?[0-9]+){3,}(?:[-a-z0-9]+)?)\.nupkg$" + Get-Item -Path "$packagesDir\*" -Filter "*.nupkg" | ForEach-Object { + $fileName = Split-Path $_ -Leaf + If ($fileName -Match $regex) { + $entry = $Matches[1] + "=" + $Matches[2] + $packages += $entry + } + } + + $final = $packages -Join "," + Write-Host "Setting InsertConfigValues to $final" + Write-Host "##vso[task.setvariable variable=InsertConfigValues]$final" +} +catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + exit 1 +} diff --git a/eng/release/scripts/GetPublishUrls.ps1 b/eng/release/scripts/GetPublishUrls.ps1 new file mode 100644 index 0000000000..758c20ea51 --- /dev/null +++ b/eng/release/scripts/GetPublishUrls.ps1 @@ -0,0 +1,57 @@ +[CmdletBinding(PositionalBinding=$false)] +param ( + [string]$accessToken, + [string]$buildId, + [string]$insertionDir +) + +Set-StrictMode -version 2.0 +$ErrorActionPreference = "Stop" + +try { + # build map of all *.vsman files to their `info.buildVersion` values + $manifestVersionMap = @{} + Get-ChildItem -Path "$insertionDir\*" -Filter "*.vsman" | ForEach-Object { + $manifestName = Split-Path $_ -Leaf + $vsmanContents = Get-Content $_ | ConvertFrom-Json + $buildVersion = $vsmanContents.info.buildVersion + $manifestVersionMap.Add($manifestName, $buildVersion) + } + + # find all publish URLs + $manifests = @() + $seenManifests = @{} + $url = "https://dev.azure.com/dnceng/internal/_apis/build/builds/$buildId/logs?api-version=5.1" + $base64 = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$accessToken")) + $headers = @{ + Authorization = "Basic $base64" + } + Write-Host "Fetching log from $url" + $json = Invoke-WebRequest -Method Get -Uri $url -Headers $headers -UseBasicParsing | ConvertFrom-Json + foreach ($l in $json.value) { + $logUrl = $l.url + Write-Host "Fetching log from $logUrl" + $log = (Invoke-WebRequest -Method Get -Uri $logUrl -Headers $headers -UseBasicParsing).Content + If ($log -Match "(https://vsdrop\.corp\.microsoft\.com/[^\r\n;]+);([^\r\n]+)\r?\n") { + $manifestShortUrl = $Matches[1] + $manifestName = $Matches[2] + $manifestUrl = "$manifestShortUrl;$manifestName" + If (-Not $seenManifests.Contains($manifestUrl)) { + $seenManifests.Add($manifestUrl, $true) + $buildVersion = $manifestVersionMap[$manifestName] + $manifestEntry = "$manifestName{$buildVersion}=$manifestUrl" + $manifests += $manifestEntry + } + } + } + + $final = $manifests -Join "," + Write-Host "Setting InsertJsonValues to $final" + Write-Host "##vso[task.setvariable variable=InsertJsonValues]$final" +} +catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + exit 1 +} From 1f1efba7faf676f15df3d0c3d173b5829ab31937 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 5 Sep 2019 12:47:04 -0700 Subject: [PATCH 06/51] fix typo (#7501) --- eng/release/insert-into-vs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/release/insert-into-vs.yml b/eng/release/insert-into-vs.yml index 0362a04fd0..d78e5d9a22 100644 --- a/eng/release/insert-into-vs.yml +++ b/eng/release/insert-into-vs.yml @@ -51,4 +51,4 @@ stages: displayName: 'Insert VS Payload' inputs: LinkWorkItemsToPR: false - condition: and(succeeded(), eq(variables['Build.SourceBranch'], ${{ parameters.componentBranchName }})) + condition: and(succeeded(), eq(variables['Build.SourceBranch'], '${{ parameters.componentBranchName }}')) From e6bb0f12d5de504c819938a8f06fc46698b595c7 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Tue, 10 Sep 2019 17:37:48 -0700 Subject: [PATCH 07/51] update VSSDK to 16.3.2099 (#7528) This fixes an issue where VS Setup was NGENing all of the FSharp.*.resources.dll assemblies. --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 22e9d55c31..3c78780d9f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,7 +155,7 @@ 16.1.28917.181 15.3.58 9.0.30729 - 16.0.2264 + 16.3.2099 12.0.4 7.0.4 8.0.4 From 3897909a5fd085bb4932363b686a8bcf56b51479 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Mon, 16 Sep 2019 18:30:17 -0700 Subject: [PATCH 08/51] update insert task to v3 (#7573) --- eng/release/insert-into-vs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/release/insert-into-vs.yml b/eng/release/insert-into-vs.yml index d78e5d9a22..89650f190d 100644 --- a/eng/release/insert-into-vs.yml +++ b/eng/release/insert-into-vs.yml @@ -47,7 +47,7 @@ stages: inputs: filePath: $(Build.SourcesDirectory)/eng/release/scripts/GetAssemblyVersions.ps1 arguments: -assemblyVersionsPath $(Build.ArtifactStagingDirectory)\VSSetup\DevDivPackages\DependentAssemblyVersions.csv - - task: ms-vseng.MicroBuildShipTasks.55100717-a81d-45ea-a363-b8fe3ec375ad.MicroBuildInsertVsPayload@2 + - task: ms-vseng.MicroBuildShipTasks.55100717-a81d-45ea-a363-b8fe3ec375ad.MicroBuildInsertVsPayload@3 displayName: 'Insert VS Payload' inputs: LinkWorkItemsToPR: false From 73f38e4e644377fbe13af268c26f581f7a4d7010 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Tue, 24 Sep 2019 12:20:18 -0700 Subject: [PATCH 09/51] Relax --noframework for mscorlib, netstandard and system.runtime (#7612) * Eliminate Relax requirement to apply --noframework when referencing mscorlib/system.runtime.dll/netstandard.dll * Relax requirement to pass --noframework with System.Runtime, netstandard and mscorlib.dll --- FSharp.Profiles.props | 4 ---- src/fsharp/CompileOps.fs | 6 ------ src/fsharp/DotNetFrameworkDependencies.fs | 1 - src/fsharp/FSComp.txt | 1 - src/fsharp/xlf/FSComp.txt.cs.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.de.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.es.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.fr.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.it.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.ja.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.ko.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.pl.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.pt-BR.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.ru.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.tr.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.zh-Hans.xlf | 5 ----- src/fsharp/xlf/FSComp.txt.zh-Hant.xlf | 5 ----- 17 files changed, 77 deletions(-) diff --git a/FSharp.Profiles.props b/FSharp.Profiles.props index c9e761c997..65cfa205e6 100644 --- a/FSharp.Profiles.props +++ b/FSharp.Profiles.props @@ -5,16 +5,12 @@ $(DefineConstants);CROSS_PLATFORM_COMPILER $(DefineConstants);ENABLE_MONO_SUPPORT - $(DefineConstants);BE_SECURITY_TRANSPARENT $(DefineConstants);NETSTANDARD $(DefineConstants);FX_NO_APP_DOMAINS $(DefineConstants);FX_NO_CORHOST_SIGNER - $(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE - $(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS - $(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START $(DefineConstants);FX_NO_PDB_READER $(DefineConstants);FX_NO_PDB_WRITER $(DefineConstants);FX_NO_SYMBOLSTORE diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index e2cbf4474f..239015820a 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -2589,12 +2589,6 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) = | Some _ -> dllReference | None -> AssemblyReference(range0, getDefaultFSharpCoreReference, None) - // If either mscorlib.dll/System.Runtime.dll/netstandard.dll or FSharp.Core.dll are explicitly specified then we require the --noframework flag. - // The reason is that some non-default frameworks may not have the default dlls. For example, Client profile does - // not have System.Web.dll. - do if (primaryAssemblyExplicitFilenameOpt.IsSome && data.framework) then - error(Error(FSComp.SR.buildExplicitCoreLibRequiresNoFramework("--noframework"), rangeStartup)) - // clrRoot: the location of the primary assembly (mscorlib.dll or netstandard.dll or System.Runtime.dll) // // targetFrameworkVersionValue: Normally just HighestInstalledNetFrameworkVersion() diff --git a/src/fsharp/DotNetFrameworkDependencies.fs b/src/fsharp/DotNetFrameworkDependencies.fs index 3d8e33082c..2e96dcd367 100644 --- a/src/fsharp/DotNetFrameworkDependencies.fs +++ b/src/fsharp/DotNetFrameworkDependencies.fs @@ -182,7 +182,6 @@ module internal FSharp.Compiler.DotNetFrameworkDependencies // (a) included in the environment used for all .fsx files (see service.fs) // (b) included in environment for files 'orphaned' from a project context // -- for orphaned files (files in VS without a project context) - // -- for files given on a command line without --noframework set let getDesktopDefaultReferences useFsiAuxLib = [ yield "mscorlib" yield "System" diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt index 703a8cd3a1..c1ab22ab6a 100644 --- a/src/fsharp/FSComp.txt +++ b/src/fsharp/FSComp.txt @@ -1086,7 +1086,6 @@ lexIndentOffForML,"Consider using a file with extension '.ml' or '.mli' instead" 1219,tcUnionCaseNameConflictsWithGeneratedType,"The union case named '%s' conflicts with the generated type '%s'" 1220,chkNoReflectedDefinitionOnStructMember,"ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter" 1221,tcDllImportNotAllowed,"DLLImport bindings must be static members in a class or function definitions in a module" -1222,buildExplicitCoreLibRequiresNoFramework,"When mscorlib.dll is explicitly referenced the %s option must also be passed" 1223,buildExpectedSigdataFile,"FSharp.Core.sigdata not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required." 1225,buildExpectedFileAlongSideFSharpCore,"File '%s' not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required." 1227,buildUnexpectedFileNameCharacter,"Filename '%s' contains invalid character '%s'" diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index 10fa84ce31..04d79253ac 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -5322,11 +5322,6 @@ Vazby DLLImport musí být statickými členy v definici třídy nebo funkce v modulu. - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Pokud se na knihovnu mscorlib.dll nebo FSharp.Core.dll odkazuje explicitně, musí se předávat taky možnost {0}. - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. V FSharp.Core se nenašel soubor FSharp.Core.sigdata. Soubor se očekával v {0}. Zvažte upgrade na novější verzi FSharp.Core, kde se tento soubor už nevyžaduje. diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index 2a97ef5d77..da3dfb3f7d 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -5322,11 +5322,6 @@ Bei DLLImport-Bindungen muss es sich um statische Member von Klassen- oder Funktionsdefinitionen eines Moduls handeln. - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Wenn explizit auf "mscorlib.dll" oder "FSharp.Core.dll" verwiesen wird, muss auch die Option "{0}" übergeben werden. - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core.sigdata wurde nicht neben "FSharp.Core" gefunden. Die Datei wurde in {0} erwartet. Erwägen Sie ein Upgrade auf eine aktuellere Version von "FSharp.Core", in der die Datei nicht mehr erforderlich ist. diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index 0a1069b1ad..54d70ff1ef 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -5322,11 +5322,6 @@ Los enlaces DLLImport deben ser miembros estáticos en definiciones de función o clase dentro de un módulo. - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Cuando se hace referencia de forma explícita a mscorlib.dll o FSharp.Core.dll, debe pasarse también la opción {0}. - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. No se encontró FSharp.Core.sigdata junto con FSharp.Core. Archivo esperado en {0}. Considere la posibilidad de actualizar a una versión más reciente de FSharp.Core en la que ya no se requiere el archivo. diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index f19c1db7fd..0c95219908 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -5322,11 +5322,6 @@ Les liaisons DLLImport doivent être des membres statiques dans une classe ou des définitions de fonction dans un module - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Lorsque mscorlib.dll ou FSharp.Core.dll est explicitement référencé, l'option {0} doit également être passée - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core.sigdata introuvable avec FSharp.Core. Fichier attendu dans {0}. Effectuez une mise à niveau vers une version plus récente de FSharp.Core, où ce fichier n'est plus nécessaire. diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index ec424688dc..9c5dc0937a 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -5322,11 +5322,6 @@ I binding DLLImport devono essere membri statici in una classe o definizioni di funzione in un modulo - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Quando si fa riferimento in modo esplicito a mscorlib.dll o FSharp.Core.dll è necessario passare anche l'opzione {0} - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. Il file FSharp.Core.sigdata non è stato trovato con FSharp.Core. Il file deve trovarsi in {0}. Provare a eseguire l'aggiornamento a una versione più recente di FSharp.Core, in cui questo file non è più obbligatorio. diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index 6b78b55ecc..c79daf99e1 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -5322,11 +5322,6 @@ DLLImport 束縛はモジュール内のクラスまたは関数定義の静的メンバーであることが必要です - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - mscorlib.dll または FSharp.Core.dll が明示的に参照される場合は、{0} オプションも渡す必要があります - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core と同じ場所に FSharp.Core.sigdata が見つかりません。ファイルは {0} にある必要があります。このファイルを必要としない、より新しいバージョンの FSharp.Core にアップグレードすることをご検討ください。 diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index c6643da5ec..9b509f10fd 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -5322,11 +5322,6 @@ DLLImport 바인딩은 모듈의 클래스 또는 함수 정의에서 정적 멤버여야 합니다. - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - mscorlib.dll 또는 FSharp.Core.dll이 명시적으로 참조될 경우 {0} 옵션도 전달해야 합니다. - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core에서 FSharp.Core.sigdata를 찾을 수 없습니다. 파일이 {0}에 있어야 합니다. 이 파일이 더 이상 필요하지 않은 최신 버전의 FSharp.Core로의 업그레이드를 고려해 보세요. diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index 8dcbcc291b..56c58894e2 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -5322,11 +5322,6 @@ Powiązania DLLImport muszą być statycznymi elementami członkowskimi w definicjach klas lub funkcji w module - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - W przypadku jawnego odwołania do pliku mscorlib.dll lub pliku FSharp.Core.dll musi również zostać przekazana opcja {0} - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. Nie znaleziono zasobu FSharp.Core.sigdata z plikiem FSharp.Core. Plik oczekiwany w {0}. Rozważ uaktualnienie do nowszej wersji pliku FSharp.Core, w której ten plik nie jest już wymagany. diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf index 717ad3dd6d..7ff47eff44 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -5322,11 +5322,6 @@ As associações DLLImport devem ser membros estáticos em uma classe ou definições de função em um módulo - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - Enquanto mscorlib.dll ou FSharp.Core.dll é explicitamente referenciado, a opção {0} também deve ser passada - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core.sigdata não encontrado junto com FSharp.Core. Arquivo esperado em {0}. Considere atualizar para uma versão mais recente do FSharp.Corem, na qual esse arquivo não é mais necessário. diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index e1aa38d356..fa2acf5942 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -5322,11 +5322,6 @@ Привязки DLLImport должны быть статическими элементами в определениях класса или функции в модуле - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - При явной ссылке на mscorlib.dll или FSharp.Core.dll также должен передаваться параметр {0} - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. Ресурс FSharp.Core.sigdata не найден вместе с FSharp.Core. Файл ожидался в {0}. Рекомендуется обновление до более новой версии FSharp.Core, где этот файл не требуется. diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index ec02c91549..f701970ff2 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -5322,11 +5322,6 @@ DLLImport bağlamaları bir sınıf içinde statik üyeler veya bir modül içinde işlev tanımları olmalıdır - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - mscorlib.dll veya FSharp.Core.dll dosyalarına açık olarak başvurulduğunda {0} seçeneği de geçirilmelidir - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. FSharp.Core.sigdata, FSharp.Core ile birlikte bulunamadı. Dosyanın {0} içinde olması bekleniyordu. Bu dosyayı gerektirmeyen daha yeni bir FSharp.Core sürümüne yükseltmeniz önerilir. diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf index 99448a0a6a..184b48a968 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -5322,11 +5322,6 @@ DLLImport 绑定必须是类中的静态成员或模块中的函数定义 - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - 当显式引用 mscorlib.dll 或 FSharp.Core.dll 时,同时也必须传递 {0} 选项 - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. 未能在 FSharp.Core 旁找到 FSharp.Core.sigdata。文件应在 {0} 中。请考虑升级到更新版本的 FSharp.Core,该版本不再需要此文件。 diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf index 0eabef7607..5f379b01d5 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -5322,11 +5322,6 @@ DLLImport 繫結必須是類別中的靜態成員或模組中的函式定義 - - When mscorlib.dll is explicitly referenced the {0} option must also be passed - 如果明確參考了 mscorlib.dll 或 FSharp.Core.dll,就必須同時傳遞 {0} 選項 - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. 找不到與 FSharp.Core 並存的 FSharp.Core.sigdata。檔案應位於 {0}。請考慮升級至最新版的 FSharp.Core,其中不再需要此檔案。 From 8b3fd3f389a4a068a70ef9e6974a0ab7e476be79 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 26 Sep 2019 12:13:06 +0000 Subject: [PATCH 10/51] Update dependencies from https://github.com/dotnet/arcade build 20190923.5 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19473.5 --- eng/Version.Details.xml | 4 +- eng/common/enable-cross-org-publishing.ps1 | 6 + eng/common/sdl/extract-artifact-packages.ps1 | 7 + eng/common/templates/job/job.yml | 142 +++++++++--------- .../templates/job/publish-build-assets.yml | 1 - eng/common/templates/jobs/jobs.yml | 74 ++++----- .../post-build/channels/netcore-dev-30.yml | 126 ---------------- .../post-build/channels/netcore-dev-31.yml | 14 +- .../post-build/channels/netcore-dev-5.yml | 14 +- .../channels/netcore-internal-30.yml | 26 +++- .../channels/netcore-release-30.yml | 14 +- .../channels/netcore-release-31.yml | 14 +- .../channels/netcore-tools-latest.yml | 14 +- .../channels/public-validation-release.yml | 12 +- .../templates/post-build/common-variables.yml | 4 - .../templates/post-build/post-build.yml | 48 ++++-- eng/common/tools.ps1 | 14 +- eng/common/tools.sh | 16 +- global.json | 4 +- 19 files changed, 243 insertions(+), 311 deletions(-) create mode 100644 eng/common/enable-cross-org-publishing.ps1 delete mode 100644 eng/common/templates/post-build/channels/netcore-dev-30.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 32461002c4..ce40df6327 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 7b731032220c21a3ed0021c72757b1f3122579b2 + ef4b288de587f0b86e65b3950e9095f714808ade diff --git a/eng/common/enable-cross-org-publishing.ps1 b/eng/common/enable-cross-org-publishing.ps1 new file mode 100644 index 0000000000..eccbf9f1b1 --- /dev/null +++ b/eng/common/enable-cross-org-publishing.ps1 @@ -0,0 +1,6 @@ +param( + [string] $token +) + +Write-Host "##vso[task.setvariable variable=VSS_NUGET_ACCESSTOKEN]$token" +Write-Host "##vso[task.setvariable variable=VSS_NUGET_URI_PREFIXES]https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/" diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1 index 1fdbb14329..6e6825013b 100644 --- a/eng/common/sdl/extract-artifact-packages.ps1 +++ b/eng/common/sdl/extract-artifact-packages.ps1 @@ -5,6 +5,13 @@ param( $ErrorActionPreference = "Stop" Set-StrictMode -Version 2.0 + +# `tools.ps1` checks $ci to perform some actions. Since the post-build +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +. $PSScriptRoot\..\tools.ps1 + $ExtractPackage = { param( [string] $PackagePath # Full path to a NuGet package diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index ffda80a197..13dd40e26c 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -1,67 +1,33 @@ +# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, +# and some (Microbuild) should only be applied to non-PR cases for internal builds. + parameters: # Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job cancelTimeoutInMinutes: '' - condition: '' - - continueOnError: false - container: '' - + continueOnError: false dependsOn: '' - displayName: '' - - steps: [] - pool: '' - + steps: [] strategy: '' - timeoutInMinutes: '' - variables: [] - workspace: '' - # Job base template specific parameters - # Optional: Enable installing Microbuild plugin - # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix - # _TeamName - the name of your team - # _SignType - 'test' or 'real' +# Job base template specific parameters + # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md + artifacts: '' enableMicrobuild: false - - # Optional: Include PublishBuildArtifacts task enablePublishBuildArtifacts: false - - # Optional: Enable publishing to the build asset registry enablePublishBuildAssets: false - - # Optional: Prevent gather/push manifest from executing when using publishing pipelines - enablePublishUsingPipelines: false - - # Optional: Include PublishTestResults task enablePublishTestResults: false - - # Optional: enable sending telemetry - enableTelemetry: false - - # Optional: define the helix repo for telemetry (example: 'dotnet/arcade') - helixRepo: '' - - # Optional: define the helix type for telemetry (example: 'build/product/') - helixType: '' - - # Required: name of the job + enablePublishUsingPipelines: false name: '' - - # Optional: should run as a public build even in the internal project - # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. + preSteps: [] runAsPublic: false -# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, -# and some (Microbuild) should only be applied to non-PR cases for internal builds. - jobs: - job: ${{ parameters.name }} @@ -93,7 +59,7 @@ jobs: timeoutInMinutes: ${{ parameters.timeoutInMinutes }} variables: - - ${{ if eq(parameters.enableTelemetry, 'true') }}: + - ${{ if ne(parameters.enableTelemetry, 'false') }}: - name: DOTNET_CLI_TELEMETRY_PROFILE value: '$(Build.Repository.Uri)' - ${{ each variable in parameters.variables }}: @@ -125,21 +91,12 @@ jobs: workspace: ${{ parameters.workspace }} steps: - - ${{ if eq(parameters.enableTelemetry, 'true') }}: - # Telemetry tasks are built from https://github.com/dotnet/arcade-extensions - - task: sendStartTelemetry@0 - displayName: 'Send Helix Start Telemetry' - inputs: - helixRepo: ${{ parameters.helixRepo }} - ${{ if ne(parameters.helixType, '') }}: - helixType: ${{ parameters.helixType }} - buildConfig: $(_BuildConfig) - runAsPublic: ${{ parameters.runAsPublic }} - continueOnError: ${{ parameters.continueOnError }} - condition: always() + - ${{ if ne(parameters.preSteps, '') }}: + - ${{ each preStep in parameters.preSteps }}: + - ${{ preStep }} - - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - task: MicroBuildSigningPlugin@2 displayName: Install MicroBuild plugin inputs: @@ -151,9 +108,16 @@ jobs: continueOnError: ${{ parameters.continueOnError }} condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: NuGetAuthenticate@0 + - ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}: + - task: DownloadPipelineArtifact@2 + inputs: + buildType: current + artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }} + targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }} + itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }} + - ${{ each step in parameters.steps }}: - ${{ step }} @@ -166,20 +130,60 @@ jobs: env: TeamName: $(_TeamName) - - ${{ if eq(parameters.enableTelemetry, 'true') }}: - # Telemetry tasks are built from https://github.com/dotnet/arcade-extensions - - task: sendEndTelemetry@0 - displayName: 'Send Helix End Telemetry' - continueOnError: ${{ parameters.continueOnError }} - condition: always() - - - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: + - ${{ if ne(parameters.artifacts.publish, '') }}: + - ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}: + - task: CopyFiles@2 + displayName: Gather binaries for publish to artifacts + inputs: + SourceFolder: 'artifacts/bin' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin' + - task: CopyFiles@2 + displayName: Gather packages for publish to artifacts + inputs: + SourceFolder: 'artifacts/packages' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages' + - task: PublishBuildArtifacts@1 + displayName: Publish pipeline artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts' + PublishLocation: Container + ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} + continueOnError: true + condition: always() + - ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}: + - publish: artifacts/log + artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} + displayName: Publish logs + continueOnError: true + condition: always() + - ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: + - ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: CopyFiles@2 + displayName: Gather Asset Manifests + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' + TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests' + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + + - task: PublishBuildArtifacts@1 + displayName: Push Asset Manifests + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests' + PublishLocation: Container + ArtifactName: AssetManifests + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + + - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: - task: PublishBuildArtifacts@1 displayName: Publish Logs inputs: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)' PublishLocation: Container - ArtifactName: $(Agent.Os)_$(Agent.JobName) + ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} continueOnError: true condition: always() diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 5dca87c5db..b722975f9c 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -61,7 +61,6 @@ jobs: /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:Configuration=$(_BuildConfig) - /v:detailed condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index 6a2f98c036..c08225a9a9 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -1,19 +1,10 @@ parameters: - # Optional: 'true' if failures in job.yml job should not fail the job + # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md continueOnError: false - # Optional: Enable installing Microbuild plugin - # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix - # _TeamName - the name of your team - # _SignType - 'test' or 'real' - enableMicrobuild: false - # Optional: Include PublishBuildArtifacts task enablePublishBuildArtifacts: false - # Optional: Enable publishing to the build asset registry - enablePublishBuildAssets: false - # Optional: Enable publishing using release pipelines enablePublishUsingPipelines: false @@ -23,19 +14,9 @@ parameters: # Optional: Include toolset dependencies in the generated graph files includeToolset: false - # Optional: Include PublishTestResults task - enablePublishTestResults: false - - # Optional: enable sending telemetry - # if enabled then the 'helixRepo' parameter should also be specified - enableTelemetry: false - # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job jobs: [] - # Optional: define the helix repo for telemetry (example: 'dotnet/arcade') - helixRepo: '' - # Optional: Override automatically derived dependsOn value for "publish build assets" job publishBuildAssetsDependsOn: '' @@ -62,29 +43,30 @@ jobs: name: ${{ job.job }} -- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: ../job/publish-build-assets.yml - parameters: - continueOnError: ${{ parameters.continueOnError }} - dependsOn: - - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: - - ${{ each job in parameters.publishBuildAssetsDependsOn }}: - - ${{ job.job }} - - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: - - ${{ each job in parameters.jobs }}: - - ${{ job.job }} - pool: - vmImage: vs2017-win2016 - runAsPublic: ${{ parameters.runAsPublic }} - publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} - enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} - -- ${{ if and(eq(parameters.graphFileGeneration.enabled, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: ../job/generate-graph-files.yml - parameters: - continueOnError: ${{ parameters.continueOnError }} - includeToolset: ${{ parameters.graphFileGeneration.includeToolset }} - dependsOn: - - Asset_Registry_Publish - pool: - vmImage: vs2017-win2016 +- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: + - template: ../job/publish-build-assets.yml + parameters: + continueOnError: ${{ parameters.continueOnError }} + dependsOn: + - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: + - ${{ each job in parameters.publishBuildAssetsDependsOn }}: + - ${{ job.job }} + - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: + - ${{ each job in parameters.jobs }}: + - ${{ job.job }} + pool: + vmImage: vs2017-win2016 + runAsPublic: ${{ parameters.runAsPublic }} + publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} + enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} + + - ${{ if eq(parameters.graphFileGeneration.enabled, true) }}: + - template: ../job/generate-graph-files.yml + parameters: + continueOnError: ${{ parameters.continueOnError }} + includeToolset: ${{ parameters.graphFileGeneration.includeToolset }} + dependsOn: + - Asset_Registry_Publish + pool: + vmImage: vs2017-win2016 diff --git a/eng/common/templates/post-build/channels/netcore-dev-30.yml b/eng/common/templates/post-build/channels/netcore-dev-30.yml deleted file mode 100644 index 69f1a9013e..0000000000 --- a/eng/common/templates/post-build/channels/netcore-dev-30.yml +++ /dev/null @@ -1,126 +0,0 @@ -parameters: - symbolPublishingAdditionalParameters: '' - artifactsPublishingAdditionalParameters: '' - publishInstallersAndChecksums: false - -stages: -- stage: NetCore_Dev30_Publish - dependsOn: validate - variables: - - template: ../common-variables.yml - displayName: .NET Core 3.0 Dev Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_30_Channel_Id)) - variables: - - group: DotNet-Symbol-Server-Pats - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts - inputs: - artifactName: 'PDBArtifacts' - continueOnError: true - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_30_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Publish Assets - env: - AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw) - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.PublicDevRelease_30_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-dev-31.yml b/eng/common/templates/post-build/channels/netcore-dev-31.yml index 720a0ab08a..af64724f79 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-31.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-31.yml @@ -1,11 +1,13 @@ parameters: - symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate publishInstallersAndChecksums: false + symbolPublishingAdditionalParameters: '' stages: - stage: NetCore_Dev31_Publish - dependsOn: validate + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Core 3.1 Dev Publishing @@ -85,10 +87,14 @@ stages: - task: NuGetAuthenticate@0 displayName: 'Authenticate to AzDO Feeds' + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish Assets - env: - AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw) inputs: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml index 9c81e39e9c..6c8dff5424 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-5.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-5.yml @@ -1,11 +1,13 @@ parameters: - symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate publishInstallersAndChecksums: false + symbolPublishingAdditionalParameters: '' stages: - stage: NetCore_Dev5_Publish - dependsOn: validate + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Core 5 Dev Publishing @@ -85,10 +87,14 @@ stages: - task: NuGetAuthenticate@0 displayName: 'Authenticate to AzDO Feeds' + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish Assets - env: - AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw) inputs: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet diff --git a/eng/common/templates/post-build/channels/netcore-internal-30.yml b/eng/common/templates/post-build/channels/netcore-internal-30.yml index 053163cf6a..201ed570ae 100644 --- a/eng/common/templates/post-build/channels/netcore-internal-30.yml +++ b/eng/common/templates/post-build/channels/netcore-internal-30.yml @@ -1,10 +1,12 @@ parameters: - symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate + symbolPublishingAdditionalParameters: '' stages: - stage: NetCore_30_Internal_Servicing_Publishing - dependsOn: validate + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Core 3.0 Internal Servicing Publishing @@ -32,6 +34,18 @@ stages: artifactName: 'PDBArtifacts' continueOnError: true + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish inputs: @@ -84,10 +98,14 @@ stages: - task: NuGetAuthenticate@0 displayName: 'Authenticate to AzDO Feeds' + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish Assets - env: - AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw) inputs: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet diff --git a/eng/common/templates/post-build/channels/netcore-release-30.yml b/eng/common/templates/post-build/channels/netcore-release-30.yml index 8ba9237ffc..206dd43e3a 100644 --- a/eng/common/templates/post-build/channels/netcore-release-30.yml +++ b/eng/common/templates/post-build/channels/netcore-release-30.yml @@ -1,11 +1,13 @@ parameters: - symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate publishInstallersAndChecksums: false + symbolPublishingAdditionalParameters: '' stages: - stage: NetCore_Release30_Publish - dependsOn: validate + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Core 3.0 Release Publishing @@ -85,10 +87,14 @@ stages: - task: NuGetAuthenticate@0 displayName: 'Authenticate to AzDO Feeds' + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish Assets - env: - AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw) inputs: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet diff --git a/eng/common/templates/post-build/channels/netcore-release-31.yml b/eng/common/templates/post-build/channels/netcore-release-31.yml index d8270eadae..6270c82835 100644 --- a/eng/common/templates/post-build/channels/netcore-release-31.yml +++ b/eng/common/templates/post-build/channels/netcore-release-31.yml @@ -1,11 +1,13 @@ parameters: - symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate publishInstallersAndChecksums: false + symbolPublishingAdditionalParameters: '' stages: - stage: NetCore_Release31_Publish - dependsOn: validate + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Core 3.1 Release Publishing @@ -85,10 +87,14 @@ stages: - task: NuGetAuthenticate@0 displayName: 'Authenticate to AzDO Feeds' + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish Assets - env: - AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw) inputs: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet diff --git a/eng/common/templates/post-build/channels/netcore-tools-latest.yml b/eng/common/templates/post-build/channels/netcore-tools-latest.yml index c75d186733..9bf9626ca3 100644 --- a/eng/common/templates/post-build/channels/netcore-tools-latest.yml +++ b/eng/common/templates/post-build/channels/netcore-tools-latest.yml @@ -1,11 +1,13 @@ parameters: - symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate publishInstallersAndChecksums: false + symbolPublishingAdditionalParameters: '' stages: - stage: NetCore_Tools_Latest_Publish - dependsOn: validate + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Tools - Latest Publishing @@ -85,10 +87,14 @@ stages: - task: NuGetAuthenticate@0 displayName: 'Authenticate to AzDO Feeds' + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish Assets - env: - AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw) inputs: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet diff --git a/eng/common/templates/post-build/channels/public-validation-release.yml b/eng/common/templates/post-build/channels/public-validation-release.yml index fb2c23d0f4..5c8e91cce1 100644 --- a/eng/common/templates/post-build/channels/public-validation-release.yml +++ b/eng/common/templates/post-build/channels/public-validation-release.yml @@ -1,10 +1,12 @@ parameters: artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate publishInstallersAndChecksums: false stages: - stage: PVR_Publish - dependsOn: validate + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Tools - Validation Publishing @@ -50,10 +52,14 @@ stages: - task: NuGetAuthenticate@0 displayName: 'Authenticate to AzDO Feeds' + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish Assets - env: - AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw) inputs: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index adb2a854f2..9ccc08b2c8 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -3,10 +3,6 @@ variables: - group: DotNet-DotNetCli-Storage - group: DotNet-MSRC-Storage - # .NET Core 3 Dev - - name: PublicDevRelease_30_Channel_Id - value: 3 - # .NET Core 3.1 Dev - name: PublicDevRelease_31_Channel_Id value: 128 diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 5b9d0a5d99..3f06b5d146 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -16,11 +16,14 @@ parameters: signingValidationAdditionalParameters: '' # Which stages should finish execution before post-build stages start - dependsOn: [build] + validateDependsOn: + - build + publishDependsOn: + - Validate stages: -- stage: validate - dependsOn: ${{ parameters.dependsOn }} +- stage: Validate + dependsOn: ${{ parameters.validateDependsOn }} displayName: Validate jobs: - ${{ if eq(parameters.enableNugetValidation, 'true') }}: @@ -45,6 +48,9 @@ stages: - ${{ if eq(parameters.enableSigningValidation, 'true') }}: - job: displayName: Signing Validation + variables: + - template: common-variables.yml + - group: AzureDevOps-Artifact-Feeds-Pats pool: vmImage: 'windows-2019' steps: @@ -54,6 +60,19 @@ stages: buildType: current artifactName: PackageArtifacts + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@0 + condition: eq(variables['IsInternalBuild'], 'true') + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Validate inputs: @@ -97,46 +116,47 @@ stages: - template: \eng\common\templates\post-build\channels\netcore-dev-5.yml parameters: - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - -- template: \eng\common\templates\post-build\channels\netcore-dev-30.yml - parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - template: \eng\common\templates\post-build\channels\netcore-dev-31.yml parameters: - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - template: \eng\common\templates\post-build\channels\netcore-tools-latest.yml parameters: - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - template: \eng\common\templates\post-build\channels\public-validation-release.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - template: \eng\common\templates\post-build\channels\netcore-release-30.yml parameters: - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - template: \eng\common\templates\post-build\channels\netcore-release-31.yml parameters: - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - template: \eng\common\templates\post-build\channels\netcore-internal-30.yml parameters: - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 91efea9405..5c94bd78d6 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -154,15 +154,6 @@ function InitializeDotNetCli([bool]$install) { # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build Write-PipelinePrependPath -Path $dotnetRoot - # Work around issues with Azure Artifacts credential provider - # https://github.com/dotnet/arcade/issues/3932 - if ($ci) { - $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20 - $env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20 - Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20' - Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20' - } - Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0' Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1' @@ -504,6 +495,11 @@ function MSBuild() { # https://github.com/dotnet/arcade/issues/3932 if ($ci -and $buildTool.Tool -eq "dotnet") { dotnet nuget locals http-cache -c + + $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20 + $env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20 + Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20' + Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20' } $toolsetBuildProject = InitializeToolset diff --git a/eng/common/tools.sh b/eng/common/tools.sh index cdba97ac8b..93ee4d67e3 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -152,15 +152,6 @@ function InitializeDotNetCli { # build steps from using anything other than what we've downloaded. Write-PipelinePrependPath -path "$dotnet_root" - # Work around issues with Azure Artifacts credential provider - # https://github.com/dotnet/arcade/issues/3932 - if [[ "$ci" == true ]]; then - export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20 - export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20 - Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20" - Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20" - fi - Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0" Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1" @@ -342,6 +333,11 @@ function MSBuild { # https://github.com/dotnet/arcade/issues/3932 if [[ "$ci" == true ]]; then dotnet nuget locals http-cache -c + + export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20 + export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20 + Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20" + Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20" fi local toolset_dir="${_InitializeToolset%/*}" @@ -379,8 +375,6 @@ function MSBuild-Core { } } -. "$scriptroot/pipeline-logging-functions.sh" - ResolvePath "${BASH_SOURCE[0]}" _script_dir=`dirname "$_ResolvePath"` diff --git a/global.json b/global.json index 1e7325d768..8687218e1b 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "3.0.100-preview6-012264", + "dotnet": "3.0.100", "vs": { "version": "16.1", "components": [ @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19463.3", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19473.5", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From f07fcf2c6df8147fa90787168e6504a1508d83fb Mon Sep 17 00:00:00 2001 From: Fraser Waters Date: Fri, 27 Sep 2019 02:26:08 +0100 Subject: [PATCH 11/51] Fix #7564 (#7596) * Add a bind to Parallel test to force async continuations * Fixing Parallel and more tests * Use trampoline holder directly * Split race test to check with and without max degree * Fix RaceBetweenCancellationAndError tests (use an async that errors) --- src/fsharp/FSharp.Core/async.fs | 33 +++++++++---------- .../Microsoft.FSharp.Control/AsyncModule.fs | 20 ++++++----- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/fsharp/FSharp.Core/async.fs b/src/fsharp/FSharp.Core/async.fs index 1d4eb37ecc..8b7c91b58a 100644 --- a/src/fsharp/FSharp.Core/async.fs +++ b/src/fsharp/FSharp.Core/async.fs @@ -1250,31 +1250,28 @@ namespace Microsoft.FSharp.Control |> unfake) | Some maxDegreeOfParallelism -> let mutable i = -1 - let worker = MakeAsync (fun _ -> - while i < tasks.Length do + let rec worker (trampolineHolder : TrampolineHolder) = + if i < tasks.Length then let j = Interlocked.Increment &i if j < tasks.Length then - let trampolineHolder = new TrampolineHolder() - trampolineHolder.ExecuteWithTrampoline (fun () -> - let ctxt = + if innerCTS.Token.IsCancellationRequested then + let cexn = new OperationCanceledException (innerCTS.Token) + recordFailure (Choice2Of2 cexn) |> unfake + worker trampolineHolder |> unfake + else + let taskCtxt = AsyncActivation.Create innerCTS.Token trampolineHolder - (fun res -> recordSuccess j res) - (fun edi -> recordFailure (Choice1Of2 edi)) - (fun cexn -> recordFailure (Choice2Of2 cexn)) - tasks.[j].Invoke ctxt - ) - |> unfake + (fun res -> recordSuccess j res |> unfake; worker trampolineHolder) + (fun edi -> recordFailure (Choice1Of2 edi) |> unfake; worker trampolineHolder) + (fun cexn -> recordFailure (Choice2Of2 cexn) |> unfake; worker trampolineHolder) + tasks.[j].Invoke taskCtxt |> unfake fake() - ) for x = 1 to maxDegreeOfParallelism do - QueueAsync - innerCTS.Token - (fun _ -> fake()) - (fun edi -> recordFailure (Choice1Of2 edi)) - (fun cexn -> recordFailure (Choice2Of2 cexn)) - worker + let trampolineHolder = new TrampolineHolder() + trampolineHolder.QueueWorkItemWithTrampoline (fun () -> + worker trampolineHolder) |> unfake fake())) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs index b525469322..14c842e8c5 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs @@ -630,6 +630,7 @@ type AsyncModule() = member this.``Parallel with maxDegreeOfParallelism`` () = let mutable i = 1 let action j = async { + do! Async.Sleep 1 Assert.AreEqual(j, i) i <- i + 1 } @@ -662,14 +663,17 @@ type AsyncModule() = Assert.AreEqual("maxDegreeOfParallelism", exc.ParamName) Assert.True(exc.Message.Contains("maxDegreeOfParallelism must be positive, was -1")) -// This has been failing very regularly on LINUX --- issue : https://github.com/dotnet/fsharp/issues/7112 -#if !TESTING_ON_LINUX [] - member this.``RaceBetweenCancellationAndError.Parallel``() = - [| for i in 1 .. 1000 -> async { return i } |] + member this.``RaceBetweenCancellationAndError.Parallel(maxDegreeOfParallelism)``() = + [| for i in 1 .. 1000 -> async { failwith "boom" } |] |> fun cs -> Async.Parallel(cs, 1) + |> testErrorAndCancelRace "RaceBetweenCancellationAndError.Parallel(maxDegreeOfParallelism)" + + [] + member this.``RaceBetweenCancellationAndError.Parallel``() = + [| for i in 1 .. 1000 -> async { failwith "boom" } |] + |> fun cs -> Async.Parallel(cs) |> testErrorAndCancelRace "RaceBetweenCancellationAndError.Parallel" -#endif [] member this.``error on one workflow should cancel all others with maxDegreeOfParallelism``() = @@ -679,13 +683,11 @@ type AsyncModule() = let job i = async { if i = 55 then failwith "boom" else - do! Async.Sleep 1000 incr counter } - let! _ = Async.Parallel ([ for i in 1 .. 100 -> job i ], 2) |> Async.Catch - do! Async.Sleep 5000 + let! _ = Async.Parallel ([ for i in 1 .. 100 -> job i ], 1) |> Async.Catch return !counter } |> Async.RunSynchronously - Assert.AreEqual(0, counter) \ No newline at end of file + Assert.AreEqual(54, counter) From c1cbe0937e8f08f610bec4626a04af81f1a40ac5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 27 Sep 2019 12:19:01 +0000 Subject: [PATCH 12/51] Update dependencies from https://github.com/dotnet/arcade build 20190926.6 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19476.6 --- eng/Version.Details.xml | 4 +- eng/common/init-tools-native.ps1 | 1 + eng/common/sdl/execute-all-sdl-tools.ps1 | 52 ++++++++++++------------ eng/common/templates/job/execute-sdl.yml | 10 ++--- global.json | 2 +- 5 files changed, 35 insertions(+), 34 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ce40df6327..aef250643d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - ef4b288de587f0b86e65b3950e9095f714808ade + b449f372df1a3374ebdc85f42ff137dcda08776b diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index 8cf18bcfeb..0fc0503ab9 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -133,6 +133,7 @@ try { if (Test-Path $InstallBin) { Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin) Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)" + return $InstallBin } else { Write-Error "Native tools install directory does not exist, installation failed" diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1 index 01799d63ff..eb21321ba2 100644 --- a/eng/common/sdl/execute-all-sdl-tools.ps1 +++ b/eng/common/sdl/execute-all-sdl-tools.ps1 @@ -1,30 +1,30 @@ Param( - [string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified) - [string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified) - [string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified - [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade) - [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master - [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located - [string] $ArtifactsDirectory = (Join-Path $env:BUILD_SOURCESDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located - [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault - [string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code - [string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts - [bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs. - [string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs. - [string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs. - [string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber) - [bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed - [bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs. - [string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs. - [string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs. - [string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs. - [string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs. - [string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs. - [string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. - [string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. - [string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error - [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") - [string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") + [string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified) + [string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified) + [string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified + [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade) + [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master + [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located + [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located + [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault + [string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code + [string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts + [bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs. + [string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs. + [string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber) + [bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed + [bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs. + [string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs. + [string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs. + [string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. + [string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. + [string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error + [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") + [string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") ) $ErrorActionPreference = "Stop" diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index a7f9964195..9a00430d65 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -24,15 +24,15 @@ jobs: buildType: current downloadType: specific files matchingPattern: "**" - downloadPath: $(Build.SourcesDirectory)\artifacts + downloadPath: $(Build.ArtifactStagingDirectory)\artifacts - powershell: eng/common/sdl/extract-artifact-packages.ps1 - -InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts - -ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts + -InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts + -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts displayName: Extract Blob Artifacts continueOnError: ${{ parameters.sdlContinueOnError }} - powershell: eng/common/sdl/extract-artifact-packages.ps1 - -InputPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts - -ExtractPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts + -InputPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts + -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts displayName: Extract Package Artifacts continueOnError: ${{ parameters.sdlContinueOnError }} - task: NuGetToolInstaller@1 diff --git a/global.json b/global.json index 8687218e1b..e8c93c341d 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19473.5", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19476.6", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 4ee0140a662b23ce46cf06fc98cc6c41d9bcb13d Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Fri, 27 Sep 2019 13:47:50 -0700 Subject: [PATCH 13/51] replace deprecated nuspec `iconUrl` element with `icon` --- .gitattributes | 2 ++ .../FSharp.Compiler.Service.MSBuild.v12.fsproj | 3 ++- ...FSharp.Compiler.Service.ProjectCracker.fsproj | 3 ++- .../FSharp.Compiler.Service.fsproj | 3 ++- .../FSharp.Core.nuget/FSharp.Core.nuget.csproj | 4 ++++ src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec | 4 +++- src/fsharp/FSharp.Core.nuget/icon.png | Bin 0 -> 1581 bytes 7 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 src/fsharp/FSharp.Core.nuget/icon.png diff --git a/.gitattributes b/.gitattributes index f5b288ab2d..d3a9149263 100644 --- a/.gitattributes +++ b/.gitattributes @@ -26,3 +26,5 @@ mono/config.make text eol=lf targets.make text eol=lf *.bsl linguist-vendored=true + +*.png binary diff --git a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj index 486401ae8b..ad6a9d7cd6 100644 --- a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj +++ b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj @@ -13,10 +13,11 @@ Microsoft Corporation; F# community contributors https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE https://github.com/fsharp/FSharp.Compiler.Service - https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png + logo.png F#, compiler, msbuild + Service/MSBuildReferenceResolver.fs diff --git a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj index 1a4171e13a..b12fa10ee5 100644 --- a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj +++ b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj @@ -11,10 +11,11 @@ Microsoft Corporation; F# community contributors https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE https://github.com/fsharp/FSharp.Compiler.Service - https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png + logo.png F#, compiler, msbuild + ProjectCrackerOptions.fs diff --git a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj index 04389899a2..8f849da41b 100644 --- a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj +++ b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj @@ -25,7 +25,7 @@ Microsoft Corporation; F# community contributors https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE https://github.com/fsharp/FSharp.Compiler.Service - https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png + logo.png F#, fsharp, interactive, compiler, editor @@ -38,6 +38,7 @@ $(DefineConstants);FX_RESHAPED_REFEMIT + AssemblyInfo/AssemblyInfo.fs diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj index 4bc3e61c16..b55bc2feba 100644 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj +++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj @@ -9,6 +9,10 @@ FSharp.Core redistributables from Visual F# Tools version $(FSPackageMajorVersion) For F# $(FSCoreMajorVersion). Contains code from the F# Software Foundation. + + + + false diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec index e94b3a547c..0d5d1e21db 100644 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec +++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec @@ -2,7 +2,7 @@ $CommonMetadataElements$ - https://fsharp.org/img/logo.png + icon.png en-US @@ -10,6 +10,8 @@ + + diff --git a/src/fsharp/FSharp.Core.nuget/icon.png b/src/fsharp/FSharp.Core.nuget/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8a2b81b9eb60b9bd48e50daed8ab02a46ee4992f GIT binary patch literal 1581 zcmXw3dr%W+5Wl3S(FfL4WtA!Y%7hEfB!WB|b8zRyCiVIVTx zNzPm!kts^~A#+bmdOVOCle8;y)vowVJNH%WRc?h-Y9RnDXcF+bn z*li~;306aP%Y%y_0u+mAh&qS~58j$LH~q#G z(!AI7P7v@a;K4anPh1DRbFD{?CC`k4tH9`WpLUy8FJIZ&Ii50G%=g!EI`_@yHw=Ec z=jKi23khOhIw@uVsAYKr)=cunp1k<@G3BZAvlAk{wfW3t?TVfRh!}mVDil!J0WWlD z3%}LeE(WSh7j%QSNvLtZ*W;c&roXfii2sXub+u%OU|XU6CK6!I2&}+Z!O@)L}$~ZX;#W(qagHT z71H?4SU^yr9j8p=&f*U4Zmu~(<4}3Q;KhMCgk57OH1o0=vDbDeJlhOG@UYRlcj+!l zR&kXeG(uh~Dg6&&i4w;(*$!rzE7IKcSk_Fcs{m23@{D*jhIsVppUhHARrKQ8LG?u4 zBN}BZGVz8uIDpY5SyqBT1w7x8>wYC08jB2q```#kF{@YG6v&H^H%LlYy`>Lm6d!~= zwvWFNr!zcrtVJc)x(<`~S%g(V^^`H3H-vys4vLDLzqg6~&tQRa|$R z*ku3G;X1JCE!AJi>b+b~bDZw6)-bzsN%$Mo<7GMX4DNP3ZJGzWN+Ev!2aC;4_T+%$ zO5<9xc7at4lw5qc=hm2AI>c`C+NDdVQ31~@o&`(4jfL2awpVp;-xQ5cP|s2$A$C3V zMAwipYc*(j1|)}^U}J6}h-^9xa^P53gAXH*EXSG*^dYYk z3FpKeKWJt&mSHllRRb)R9CL6@hh~O%{5`-~ce$*}_97@*b9fu}#3XxVg~|?omiifh+Hsmj>=l_z6AzHj%P zh9}7VaJVZ*w+<*dGr}Yk37JWCJiXKDFk<0meCm1n1*b!Zh2hMsABR7*2lEj%fRFdH zVWE_cr~s-Bsw)*rRP*%zFHtiJ&C|ofM4a4m VXWV0Pq6A; Date: Fri, 27 Sep 2019 18:07:19 -0700 Subject: [PATCH 14/51] delete old build definition file (#7662) Only the 16.3 build uses this file and that branch still has a copy. --- .vsts-signed.yaml | 152 ---------------------------------------------- 1 file changed, 152 deletions(-) delete mode 100644 .vsts-signed.yaml diff --git a/.vsts-signed.yaml b/.vsts-signed.yaml deleted file mode 100644 index a93dcd1af9..0000000000 --- a/.vsts-signed.yaml +++ /dev/null @@ -1,152 +0,0 @@ -variables: -- group: DotNet-Blob-Feed -- name: SignType - value: real -- name: VisualStudioDropName - value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber) - -# Variables defined in yml cannot be overridden at queue time; instead overridable variables must be defined in the web UI. -# Commenting out until something like this is supported: https://github.com/Microsoft/azure-pipelines-yaml/pull/129 -#variables: -#- name: SkipTests -# defaultValue: false - -stages: -- stage: build - displayName: Build - - jobs: - - job: Full_Signed - pool: - name: VSEng-MicroBuildVS2019 - timeoutInMinutes: 300 - variables: - BuildConfiguration: 'Release' - steps: - - # Install Signing Plugin - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 - displayName: Install Signing Plugin - inputs: - signType: real - esrpSigning: true - condition: and(succeeded(), ne(variables['SignType'], '')) - - # Build - - script: eng\CIBuild.cmd - -configuration $(BuildConfiguration) - -testAll - -officialSkipTests $(SkipTests) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - /p:VisualStudioDropName=$(VisualStudioDropName) - /p:DotNetSignType=$(SignType) - /p:DotNetPublishToBlobFeed=true - /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) - /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - /p:PublishToSymbolServer=true - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - displayName: Build - - # Publish logs - - task: PublishBuildArtifacts@1 - displayName: Publish Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)' - ArtifactName: 'Build Diagnostic Files' - publishLocation: Container - continueOnError: true - condition: succeededOrFailed() - - # Publish test results - - task: PublishBuildArtifacts@1 - displayName: Publish Test Results - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults' - ArtifactName: 'Test Results' - publishLocation: Container - continueOnError: true - condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) - - # Upload VSTS Drop - - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 - displayName: Upload VSTS Drop - inputs: - DropName: $(VisualStudioDropName) - DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' - condition: succeeded() - - # Publish an artifact that the RoslynInsertionTool is able to find by its name. - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact VSSetup - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' - ArtifactName: 'VSSetup' - condition: succeeded() - - # Archive NuGet packages to DevOps. - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Packages - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)' - ArtifactName: 'Packages' - condition: succeeded() - - # Publish nightly package to ADO - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Nightly - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\VisualFSharpFull.vsix' - ArtifactName: 'Nightly' - condition: succeeded() - - # Package publish - - task: PublishBuildArtifacts@1 - displayName: Push Asset Manifests - inputs: - PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest' - ArtifactName: AssetManifests - continueOnError: true - condition: succeeded() - - # Publish PackageArtifacts for Arcade verification - - task: PublishBuildArtifacts@1 - displayName: Publish PackageArtifacts - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)\Shipping' - ArtifactName: 'PackageArtifacts' - condition: succeeded() - - # Publish BlobArtifacts for Arcade verification - - task: PublishBuildArtifacts@1 - displayName: Publish BlobArtifacts - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)\Shipping' - ArtifactName: 'BlobArtifacts' - condition: succeeded() - - # Publish native PDBs for archiving - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Symbols - inputs: - PathtoPublish: '$(Build.SourcesDirectory)/artifacts/SymStore/$(BuildConfiguration)' - ArtifactName: NativeSymbols - condition: succeeded() - - # Execute cleanup tasks - - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 - displayName: Execute cleanup tasks - condition: succeededOrFailed() - - - template: /eng/common/templates/job/publish-build-assets.yml - parameters: - dependsOn: - - Full_Signed - pool: - vmImage: windows-2019 - enablePublishBuildArtifacts: true - -- template: eng/common/templates/post-build/post-build.yml - parameters: - # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. - enableSymbolValidation: false From 3fd44c46551d902fc6669922a100b17baf775bc6 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Mon, 30 Sep 2019 13:17:12 -0700 Subject: [PATCH 15/51] update tool requirement to VS 16.3 (#7671) --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index e8c93c341d..39f9ea968e 100644 --- a/global.json +++ b/global.json @@ -2,7 +2,7 @@ "tools": { "dotnet": "3.0.100", "vs": { - "version": "16.1", + "version": "16.3", "components": [ "Microsoft.Net.Core.Component.SDK.2.1", "Microsoft.VisualStudio.Component.FSharp" From 47072af3e159246e4bec420124db27cbf99db0de Mon Sep 17 00:00:00 2001 From: Gustavo Leon <1261319+gusty@users.noreply.github.com> Date: Tue, 1 Oct 2019 02:25:27 +0200 Subject: [PATCH 16/51] Consider '_' for members with access modifiers (#7631) * Consider '_' for members with access modifiers * Add tests * Revert * Add tests with modifiers --- src/fsharp/pars.fsy | 5 ++++ .../members/self-identifier/version47/test.fs | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index cb2b0a7020..64011e2c40 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -1924,6 +1924,11 @@ atomicPatternLongIdent: } | GLOBAL DOT pathOp { let (LongIdentWithDots(lid,dotms)) = $3 in (None,LongIdentWithDots(ident(MangledGlobalName,rhs parseState 1) :: lid, rhs parseState 2 :: dotms)) } | pathOp { (None,$1) } + | access UNDERSCORE DOT pathOp { + if not (parseState.LexBuffer.SupportsFeature LanguageFeature.SingleUnderscorePattern) then + raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedSymbolDot()) + let (LongIdentWithDots(lid,dotms)) = $4 in (Some($1),LongIdentWithDots(ident("_",rhs parseState 1)::lid, rhs parseState 2::dotms)) + } | access pathOp { (Some($1), $2) } diff --git a/tests/fsharp/core/members/self-identifier/version47/test.fs b/tests/fsharp/core/members/self-identifier/version47/test.fs index 99629250b6..76bc777ae0 100644 --- a/tests/fsharp/core/members/self-identifier/version47/test.fs +++ b/tests/fsharp/core/members/self-identifier/version47/test.fs @@ -26,12 +26,30 @@ type MyStructWithUnderscoreIdentifier = member _.MethodWithUnderscoreSelf() = true member __.MethodWithDoubleUnderscoreSelf() = true member _E.MethodWithUnderscoreESelf() = true + member private _.PrivateMethodWithUnderscoreSelf() = true + member private __.PrivateMethodWithDoubleUnderscoreSelf() = true + member private _E.PrivateMethodWithUnderscoreESelf() = true + member inline _.InlineMethodWithUnderscoreSelf() = true + member inline __.InlineMethodWithDoubleUnderscoreSelf() = true + member inline _E.InlineMethodWithUnderscoreESelf() = true + member inline private _.InlinePrivateMethodWithUnderscoreSelf() = true + member inline private __.InlinePrivateMethodWithDoubleUnderscoreSelf() = true + member inline private _E.InlinePrivateMethodWithUnderscoreESelf() = true type MyClassWithUnderscoreIdentifier () = class member _.MethodWithUnderscoreSelf() = true member __.MethodWithDoubleUnderscoreSelf() = true member _E.MethodWithUnderscoreESelf() = true + member private _.PrivateMethodWithUnderscoreSelf() = true + member private __.PrivateMethodWithDoubleUnderscoreSelf() = true + member private _E.PrivateMethodWithUnderscoreESelf() = true + member inline _.InlineMethodWithUnderscoreSelf() = true + member inline __.InlineMethodWithDoubleUnderscoreSelf() = true + member inline _E.InlineMethodWithUnderscoreESelf() = true + member inline private _.InlinePrivateMethodWithUnderscoreSelf() = true + member inline private __.InlinePrivateMethodWithDoubleUnderscoreSelf() = true + member inline private _E.InlinePrivateMethodWithUnderscoreESelf() = true end type MyStructTypeWithUnderscoreIdentifier = @@ -39,6 +57,15 @@ type MyStructTypeWithUnderscoreIdentifier = member _.MethodWithUnderscoreSelf() = true member __.MethodWithDoubleUnderscoreSelf() = true member _E.MethodWithUnderscoreESelf() = true + member private _.PrivateMethodWithUnderscoreSelf() = true + member private __.PrivateMethodWithDoubleUnderscoreSelf() = true + member private _E.PrivateMethodWithUnderscoreESelf() = true + member inline _.InlineMethodWithUnderscoreSelf() = true + member inline __.InlineMethodWithDoubleUnderscoreSelf() = true + member inline _E.InlineMethodWithUnderscoreESelf() = true + member inline private _.InlinePrivateMethodWithUnderscoreSelf() = true + member inline private __.InlinePrivateMethodWithDoubleUnderscoreSelf() = true + member inline private _E.InlinePrivateMethodWithUnderscoreESelf() = true end From c29f3a6b9b335cbad6499061702291dc519f96b1 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 3 Oct 2019 15:18:22 -0700 Subject: [PATCH 17/51] Disable Linux_FCS (#7697) A recent update to the `ubuntu-16.04` VM image in ADO causes mono/fake to crash and this is blocking all work. The MacOS version works and follows an identical code path. --- azure-pipelines.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 56649a10f7..7895b291d1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -298,17 +298,17 @@ stages: continueOnError: true condition: always() - - job: Linux_FCS - pool: - vmImage: ubuntu-16.04 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./fcs/build.sh Build - displayName: Build + #- job: Linux_FCS + # pool: + # vmImage: ubuntu-16.04 + # variables: + # - name: _SignType + # value: Test + # steps: + # - checkout: self + # clean: true + # - script: ./fcs/build.sh Build + # displayName: Build - job: MacOS_FCS pool: From da3ca86d2608d5753f6fc8e0595778ff6f407af1 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Fri, 25 Oct 2019 14:36:51 -0700 Subject: [PATCH 18/51] update VS insertion target to `rel/d16.4` (#7770) --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7895b291d1..d9fe4d34c7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -340,6 +340,6 @@ stages: - template: eng/release/insert-into-vs.yml parameters: componentBranchName: refs/heads/release/dev16.4 - insertTargetBranch: master + insertTargetBranch: rel/d16.4 insertTeamEmail: fsharpteam@microsoft.com insertTeamName: 'F#' From e7597deb7042710a7142bdccabd6f92b0840d354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Sailer?= Date: Sat, 2 Nov 2019 01:16:12 +0100 Subject: [PATCH 19/51] LOC CHECKIN | dotnet/fsharp release/dev16.4 | 20191101 (#7805) --- src/fsharp/fsi/xlf/FSIstrings.txt.cs.xlf | 22 +++++++++++----- src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf | 22 +++++++++++----- src/fsharp/fsi/xlf/FSIstrings.txt.es.xlf | 20 ++++++++++---- src/fsharp/fsi/xlf/FSIstrings.txt.fr.xlf | 20 ++++++++++---- src/fsharp/fsi/xlf/FSIstrings.txt.it.xlf | 16 +++++++++--- src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf | 24 ++++++++++++----- src/fsharp/fsi/xlf/FSIstrings.txt.ko.xlf | 26 +++++++++++++------ src/fsharp/fsi/xlf/FSIstrings.txt.pl.xlf | 22 +++++++++++----- src/fsharp/fsi/xlf/FSIstrings.txt.pt-BR.xlf | 26 +++++++++++++------ src/fsharp/fsi/xlf/FSIstrings.txt.ru.xlf | 24 ++++++++++++----- src/fsharp/fsi/xlf/FSIstrings.txt.tr.xlf | 24 ++++++++++++----- src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hans.xlf | 24 ++++++++++++----- src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf | 26 +++++++++++++------ src/fsharp/xlf/FSComp.txt.cs.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.de.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.es.xlf | 8 +++--- src/fsharp/xlf/FSComp.txt.fr.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.it.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.ja.xlf | 22 ++++++++-------- src/fsharp/xlf/FSComp.txt.ko.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.pl.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.pt-BR.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.ru.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.tr.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.zh-Hans.xlf | 6 ++--- src/fsharp/xlf/FSComp.txt.zh-Hant.xlf | 6 ++--- ...osoft.VisualStudio.Editors.Designer.cs.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.de.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.es.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.fr.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.it.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.ja.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.ko.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.pl.xlf | 3 +-- ...ft.VisualStudio.Editors.Designer.pt-BR.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.ru.xlf | 3 +-- ...osoft.VisualStudio.Editors.Designer.tr.xlf | 3 +-- ....VisualStudio.Editors.Designer.zh-Hans.xlf | 3 +-- ....VisualStudio.Editors.Designer.zh-Hant.xlf | 3 +-- .../src/FSharp.UIResources/xlf/Strings.cs.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.de.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.es.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.fr.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.it.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.ja.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.ko.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.pl.xlf | 2 +- .../FSharp.UIResources/xlf/Strings.pt-BR.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.ru.xlf | 2 +- .../src/FSharp.UIResources/xlf/Strings.tr.xlf | 2 +- .../xlf/Strings.zh-Hans.xlf | 2 +- .../xlf/Strings.zh-Hant.xlf | 2 +- 52 files changed, 287 insertions(+), 170 deletions(-) diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.cs.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.cs.xlf index c43178fe80..2d4481919d 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.cs.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.cs.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + Operaci nešlo dokončit z důvodu dřívější chyby. + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + Operace nebyla úspěšná. Text chyby se vytiskl do streamu chyb. Pokud chcete vrátit odpovídající FSharpErrorInfo, použijte EvalInteractionNonThrowing, EvalScriptNonThrowing nebo EvalExpressionNonThrowing. + + Stopped due to error\n Zastavilo se kvůli chybě.\n @@ -9,7 +19,7 @@ Usage: {0} <options> [script.fsx [<arguments>]] - Použití: {0} <parametry> [skript.fsx [<argumenty>]] + Použití: {0} <možnosti> [script.fsx [<argumenty>]] @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - Při spuštění procesu F# Interactive se vyskytl problém. Ten mohly způsobit známé potíže s podporou konzoly procesu na pozadí pro aplikace umožňující kódování Unicode v některých systémech Windows. V případě sady Visual Studio zkuste vybrat Nástroje->Možnosti->F# Interactive a zadat: --fsi-server-no-unicode. + Při spouštění procesu F# Interactive došlo k potížím. Může to být způsobené známým problémem s podporou procesů na pozadí v konzole pro aplikace podporující Unicode v některých systémech Windows. Zkuste vybrat Nástroje -> Možnosti -> F# Interactive pro Visual Studio a zadat --fsi-server-no-unicode. @@ -209,22 +219,22 @@ --> Referenced '{0}' - --> Odkazovaný soubor {0} + --> Odkazovalo se na: {0} --> Referenced '{0}' (file may be locked by F# Interactive process) - --> Odkazovaný soubor {0} (Soubor musí být procesem F# Interactive uzamčený.) + --> Odkazovalo se na: {0} (soubor může být zamknutý procesem F# Interactive) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> Odkazováno {0} (na sestavení s odlišným časovým razítkem se už z tohoto umístění odkazovalo, pro načtení aktualizovaného sestavení obnovte soubor fsi) + --> Odkazovalo se na: {0} (Z tohoto umístění se už odkazovalo na sestavení s jiným časovým razítkem. Je třeba resetovat fsi, aby se načetlo aktualizované sestavení.) --> Added '{0}' to library include path - --> Soubory přidané do knihovny ({0}) zahrnují cestu. + --> Přidali jsme {0} do cesty pro zahrnutí do knihovny diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf index 0e7145c703..80ec70245d 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + Der Vorgang konnte aufgrund eines vorherigen Fehlers nicht abgeschlossen werden. + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + Der Vorgang ist fehlgeschlagen. Der Fehlertext wurde im Fehlerstream ausgegeben. Verwenden Sie EvalInteractionNonThrowing, EvalScriptNonThrowing oder EvalExpressionNonThrowing, um die entsprechende FSharpErrorInfo zurückzugeben. + + Stopped due to error\n Aufgrund eines Fehlers beendet\n @@ -9,7 +19,7 @@ Usage: {0} <options> [script.fsx [<arguments>]] - Verwendung: {0} <Optionen> [script.fsx [<Argumente>]] + Verwendung: {0} <Optionen> [script.fsx [<arguments>]] @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - Beim Starten des F# Interactive-Prozesses ist ein Fehler aufgetreten. Ursache hierfür kann ein bekanntes Problem mit der Hintergrundprozess-Konsolenunterstützung für Unicode-aktivierte Anwendungen unter manchen Windows-Systemen sein. Wählen Sie "Tools" -> "Optionen" -> "F# Interactive für Visual Studio" aus, und geben Sie "--fsi-server-no-unicode" ein. + Beim Starten des F# Interactive-Prozesses ist ein Fehler aufgetreten. Ursache hierfür kann ein bekanntes Problem mit der Hintergrundprozess-Konsolenunterstützung für Unicode-aktivierte Anwendungen unter manchen Windows-Systemen sein. Navigieren Sie zu "Tools > Optionen > F# Interactive für Visual Studio", und geben Sie --fsi-server-no-unicode ein. @@ -209,22 +219,22 @@ --> Referenced '{0}' - --> Auf "{0}" wurde verwiesen + --> Auf {0} wurde verwiesen --> Referenced '{0}' (file may be locked by F# Interactive process) - --> Auf "{0}" wurde verwiesen (die Datei wird möglicherweise vom F# Interactive-Prozess gesperrt) + --> Auf {0} wurde verwiesen (die Datei wird möglicherweise vom F# Interactive-Prozess gesperrt). --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> Auf "{0}" wurde verwiesen (eine Assembly mit einem anderen Zeitstempel wurde bereits von diesem Ort verwiesen; stellen Sie fsi wieder her, um die aktualisierte Assembly zu laden) + --> Auf {0} wurde verwiesen (eine Assembly mit einem anderen Zeitstempel wurde bereits von diesem Ort verwiesen; setzen Sie fsi zurück, um die aktualisierte Assembly zu laden). --> Added '{0}' to library include path - --> "{0}" wurde zum Bibliotheksincludepfad hinzugefügt + --> {0} wurde zum Bibliotheksincludepfad hinzugefügt. diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.es.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.es.xlf index 0ba7ef163b..d5ec3bf213 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.es.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.es.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + La operación no se pudo completar debido a un error anterior + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + Error en la operación. El texto del error se ha impreso en la secuencia de errores. Para devolver el correspondiente FSharpErrorInfo, use EvalInteractionNonThrowing, EvalScriptNonThrowing o EvalExpressionNonThrowing + + Stopped due to error\n Detenido debido a un error.\n @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - Se produjo un problema al iniciar el proceso de F# interactivo. Esto puede deberse a un problema conocido de compatibilidad de la consola de procesos en segundo plano con aplicaciones habilitadas para Unicode en algunos sistemas Windows. Pruebe lo siguiente: seleccione Herramientas->Opciones->F# interactivo para Visual Studio y escriba '--fsi-server-no-unicode'. + Se ha producido un problema al iniciar el proceso interactivo de F. Esto puede deberse a un problema conocido con la compatibilidad con la consola de proceso en segundo plano para aplicaciones habilitadas para Unicode en algunos sistemas Windows. Pruebe a seleccionar Herramientas->Opciones->F# interactivo para Visual Studio y escriba "--fsi-server-no-unicode". @@ -209,22 +219,22 @@ --> Referenced '{0}' - --> '{0}' referenciado + --> "{0}" referenciado --> Referenced '{0}' (file may be locked by F# Interactive process) - --> '{0}' al que se hace referencia (el archivo puede estar bloqueado por un proceso de F# interactivo) + --> "{0}" referenciado (el archivo puede estar bloqueado por un proceso interactivo de F#) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> Se hace referencia a '{0}' (ya se ha hecho referencia a un ensamblado con una marca de tiempo distinta desde esta ubicación, restablecer fsi para cargar el ensamblado actualizado) + --> "{0}" referenciado (ya se ha hecho referencia a un ensamblado con una marca de tiempo diferente desde esta ubicación, restablezca fsi para cargar el ensamblado actualizado) --> Added '{0}' to library include path - --> Se agregó '{0}' a la ruta de acceso de inclusión de biblioteca + -> Se agregó "{0}" a la ruta de acceso de inclusión de biblioteca diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.fr.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.fr.xlf index 57ed7d784e..963d52c650 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.fr.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.fr.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + Impossible d'exécuter l'opération en raison d'une erreur antérieure + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + L'opération a échoué. Le texte d'erreur a été imprimé dans le flux d'erreurs. Pour retourner le FSharpErrorInfo correspondant, utiliser EvalInteractionNonThrowing, EvalScriptNonThrowing ou EvalExpressionNonThrowing + + Stopped due to error\n Arrêt en raison d'une erreur\n @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - Un problème s'est produit lors du démarrage du processus F# Interactive. Cela peut être dû à un problème connu lié à la prise en charge par la console des processus en arrière-plan pour les applications Unicode sur certains systèmes Windows. Essayez de sélectionner Outils->Options->F# Interactive pour Visual Studio, puis entrez '--fsi-server-no-unicode'. + Un problème s'est produit au démarrage du processus F# Interactive. Il s'agit peut-être d'un problème connu avec la prise en charge de la console de processus d'arrière-plan pour les applications Unicode sur certains systèmes Windows. Essayez de sélectionner Outils->Options->F# Interactive pour Visual Studio et d'entrer '--fsi-server-no-unicode'. @@ -209,22 +219,22 @@ --> Referenced '{0}' - --> Référencement de '{0}' + --> '{0}' référencé --> Referenced '{0}' (file may be locked by F# Interactive process) - --> Référencement de '{0}' (le fichier est peut-être verrouillé par le processus F# Interactive) + --> '{0}' référencé (le fichier est peut-être verrouillé par le processus F# Interactive) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> Référencement de '{0}' (un assembly avec un horodatage différent a déjà été référencé à partir de cet emplacement, réinitialisez fsi pour charger l'assembly mis à jour) + --> '{0}' référencé (un assembly avec un horodatage différent a déjà été référencé à cet emplacement, réinitialiser fsi pour charger l'assembly mis à jour) --> Added '{0}' to library include path - --> Ajout de '{0}' au chemin d'accès Include de la bibliothèque + --> '{0}' ajouté au chemin d'inclusion de bibliothèque diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.it.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.it.xlf index d7f05d6aa9..aa030eb6b3 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.it.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.it.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + Non è stato possibile completare l'operazione a causa di un errore precedente + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + L'operazione non è riuscita. Il testo dell'errore è stato stampato nel flusso degli errori. Per restituire l'elemento FSharpErrorInfo corrispondente, usare EvalInteractionNonThrowing, EvalScriptNonThrowing o EvalExpressionNonThrowing + + Stopped due to error\n Interruzione a causa di un errore\n @@ -9,7 +19,7 @@ Usage: {0} <options> [script.fsx [<arguments>]] - Sintassi: {0} <opzioni> [script.fsx [<argomenti>]] + Utilizzo: {0} <opzioni> [script.fsx [<argomenti>]] @@ -209,12 +219,12 @@ --> Referenced '{0}' - --> Riferimento a '{0}' + --> Riferimento già presente a '{0}' --> Referenced '{0}' (file may be locked by F# Interactive process) - --> Riferimento a '{0}' (il file potrebbe essere bloccato dal processo di F# Interactive) + --> Riferimento già presente a '{0}' (il file potrebbe essere bloccato dal processo di F# Interactive) diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf index c70b2e1dd3..ad4b06f0fd 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + 以前のエラーが原因で操作を完了できませんでした + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + 操作に失敗しました。エラー テキストがエラー ストリームで印刷されました。対応する FSharpErrorInfo を戻すには、EvalInteractionNonThrowing、EvalScriptuNonThrowing、または EvalExpressionNonThrowing を使用します + + Stopped due to error\n エラーのため停止しました\n @@ -9,7 +19,7 @@ Usage: {0} <options> [script.fsx [<arguments>]] - 使い方: {0} <オプション> [script.fsx [<引数>]] + 使用状況: {0} <オプション> [script.fsx [<引数>]] @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - F# インタラクティブのプロセスの開始中に問題が発生しました。この原因は、一部の Windows システム上での Unicode 対応アプリケーションのバックグラウンド プロセス コンソールのサポートに関する既知の問題にある可能性があります。[ツール]5D; の [オプション]5D; から [F# Interactive for Visual Studio]5D; を選択し、「--fsi-server-no-unicode」と入力してください。 + F# 対話型プロセスの開始で問題が発生しました。これは、一部の Windows システムで Unicode 対応アプリケーションのバックグラウンド プロセス コンソールのサポートに関する既知の問題が原因である可能性があります。Visual Studio で ツール->オプション->F# インタラクティブを選択し、「-fsi-server-no-unicode」と入力します。 @@ -209,17 +219,17 @@ --> Referenced '{0}' - --> '{0}' を参照しました + --> 参照済み '{0}' --> Referenced '{0}' (file may be locked by F# Interactive process) - --> '{0}' を参照しました (ファイルが F# インタラクティブのプロセスによってロックされている可能性があります) + --> 参照済み '{0}' (ファイルは F# 対話型プロセスによってロックされている可能性があります) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> 参照された '{0}' (タイムスタンプが異なるアセンブリが既にこの場所から参照されています。fsi をリセットして更新されたアセンブリを読み込んでください) + --> 参照済み '{0}' (異なるタイムスタンプを持つアセンブリがこの場所から既に参照されています、更新されたアセンブリを読み込むには fsi をリセットします) @@ -229,12 +239,12 @@ --> Timing now on - --> 現在タイミングはオンです + --> 今すぐタイミング オン --> Timing now off - --> 現在タイミングはオフです + --> 今すぐタイミング オフ diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.ko.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.ko.xlf index b6af609a2a..53f9f27608 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.ko.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.ko.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + 이전 오류로 인해 작업을 완료할 수 없습니다. + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + 작업이 실패했습니다. 오류 텍스트가 오류 스트림에 인쇄되었습니다. 해당 FSharpErrorInfo를 반환하려면 EvalInteractionNonThrowing, EvalScriptNonThrowing 또는 EvalExpressionNonThrowing를 사용하세요. + + Stopped due to error\n 오류 때문에 중지되었습니다.\n @@ -9,7 +19,7 @@ Usage: {0} <options> [script.fsx [<arguments>]] - 사용법: {0} <options> [script.fsx [<arguments>]] + 사용법: {0} <옵션> [script.fsx [<인수>]] @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - F# 대화형 프로세스를 시작하는 동안 오류가 발생했습니다. 일부 Windows 시스템에서 나타나는 유니코드 기반 애플리케이션의 백그라운드 프로세스 콘솔 지원과 관련된 알려진 문제가 원인일 수 있습니다. [도구]->[옵션]->[Visual Studio용 F# 대화형]를 선택하고 '--fsi-server-no-unicode'를 입력해 보세요. + F# Interactive 프로세스를 시작하는 동안 문제가 발생했습니다. 일부 Windows 시스템의 유니코드 기반 애플리케이션에 대한 백그라운드 프로세스 콘솔 지원과 관련된 알려진 문제가 원인일 수 있습니다. [도구]>[옵션]->[F# Interactive for Visual Studio]를 선택하고 '--fsi-server-no-unicode'를 입력해 보세요. @@ -209,32 +219,32 @@ --> Referenced '{0}' - --> '{0}'이(가) 참조되었습니다. + --> '{0}'을(를) 참조함 --> Referenced '{0}' (file may be locked by F# Interactive process) - --> '{0}' 참조됨(파일은 F# 대화형 프로세스에 의해 잠길 수 있음) + --> 참조된 '{0}'(파일이 F# Interactive 프로세스에 의해 잠겼을 수 있음) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> 참조된 '{0}'(다른 타임스탬프가 포함된 어셈블리가 이 위치에서 이미 참조되었습니다. fsi를 다시 설정하여 업데이트된 어셈블리를 로드하세요.) + --> '{0}'을(를) 참조함(다른 타임스탬프가 있는 어셈블리가 이미 이 위치에서 참조되었습니다. fsi를 다시 설정하여 업데이트된 어셈블리를 로드하세요.) --> Added '{0}' to library include path - --> 라이브러리 포함 경로에 '{0}'을(를) 추가했습니다. + --> 라이브러리 포함 경로에 '{0}'을(를) 추가함 --> Timing now on - --> 타이밍이 설정되었습니다. + --> 지금 타이밍 켜기 --> Timing now off - --> 타이밍이 해제되었습니다. + --> 지금 타이밍 끄기 diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.pl.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.pl.xlf index 82960cad8f..3666ea478e 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.pl.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.pl.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + Nie udało się ukończyć operacji z powodu wcześniejszego błędu + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + Operacja nie powiodła się. Tekst błędu został umieszczony w strumieniu błędów. Aby zwrócić odpowiedni element FSharpErrorInfo, użyj elementu EvalInteractionNonThrowing, eEvalScriptNonThrowing lub EvalExpressionNonThrowing + + Stopped due to error\n Zatrzymano ze względu na błąd\n @@ -9,7 +19,7 @@ Usage: {0} <options> [script.fsx [<arguments>]] - Składnia: {0} <opcje> [script.fsx [<argumenty>]] + Użycie: {0} <opcje> [script.fsx [<argumenty>]] @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - Wystąpił problem podczas uruchamiania procesu narzędzia F# Interactive. Taka sytuacja może być spowodowana znanym problemem z obsługą konsoli procesu w tle dla aplikacji obsługujących kodowanie Unicode w niektórych systemach Windows. Spróbuj wybrać kolejno opcje Narzędzia->Opcje->F# Interactive dla Visual Studio i wprowadź „--fsi-server-no-unicode”. + Wystąpił problem podczas uruchamiania procesu narzędzia F# Interactive. Może to być spowodowane znanym problemem z obsługą konsoli procesu w tle dla aplikacji obsługujących standard Unicode w niektórych systemach Windows. Spróbuj wybrać pozycje Narzędzia->Opcje->F# Interactive dla programu Visual Studio i wprowadź ciąg „--fsi-server-no-unicode”. @@ -219,22 +229,22 @@ --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> Zestaw „{0}” występujący w odwołaniu (zestaw z inną sygnaturą czasową występuje już w odwołaniu z tej lokalizacji; zresetuj narzędzie fsi, aby załadować zaktualizowany zestaw) + --> Przywołano element „{0}” (z tej lokalizacji przywołano już zestaw z inną sygnaturą czasową, zresetuj narzędzie fsi, aby załadować zaktualizowany zestaw) --> Added '{0}' to library include path - --> Dodano element „{0}” do ścieżki dołączenia biblioteki + --> Dodano element „{0}” do ścieżki dołączania biblioteki --> Timing now on - --> Funkcja chronometrażu została włączona + --> Chronometraż jest teraz włączony --> Timing now off - --> Funkcja chronometrażu została wyłączona + --> Chronometraż jest teraz wyłączony diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.pt-BR.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.pt-BR.xlf index 41c3148c35..9adafa2f09 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.pt-BR.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.pt-BR.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + Não foi possível concluir a operação devido a um erro anterior + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + Falha na operação. O texto do erro foi impresso no fluxo de erros. Para retornar o FSharpErrorInfo correspondente, use EvalInteractionNonThrowing, EvalScriptNonThrowing ou EvalExpressionNonThrowing + + Stopped due to error\n Interrompido devido a erro\n @@ -9,7 +19,7 @@ Usage: {0} <options> [script.fsx [<arguments>]] - Uso: {0} <opções> [script.fsx [<argumentos>]] + Uso: {0} <options> [script.fsx [<arguments>]] @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - Um problema ocorreu na inicialização do processo interativo #F. Isto pode ter ocorrido devido a um problema conhecido com processo de fundo do console de apoio pelo aplicativos habilitados Unicode em alguns sistemas do Windows. Tente Ferramentas->Opções->Interativo F# para Visual Studio e insira '--fsi-server-no-unicode'. + Ocorreu um problema ao iniciar o processo do F# Interativo. O motivo pode ser um problema conhecido com o suporte do console do processo em segundo plano para aplicativos habilitados para Unicode em alguns sistemas Windows. Tente selecionar Ferramentas->Opções->F# Interativo para Visual Studio e digite '--fsi-server-no-unicode'. @@ -209,32 +219,32 @@ --> Referenced '{0}' - --> Referenciado '{0}' + --> '{0}' referenciado --> Referenced '{0}' (file may be locked by F# Interactive process) - --> Referenciado '{0}' (o arquivo pode ter sido bloqueado pelo processo F# Interativo) + --> '{0}' referenciado (o arquivo pode estar bloqueado pelo processo do F# Interativo) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> '{0}' referenciado (um assembly com um carimbo de data/hora diferente já foi referenciado deste local, redefina o fsi para carregar o assembly atualizado) + --> '{0}' referenciado (um assembly com um carimbo de data/hora diferente já foi referenciado deste local. Redefina o FSI para carregar o assembly atualizado) --> Added '{0}' to library include path - --> '{0}' foi adicionado à biblioteca de caminho de inclusão + --> Foi adicionado '{0}' ao caminho de inclusão da biblioteca --> Timing now on - --> Timing ligado agora + --> Sincronização ativada agora --> Timing now off - --> Timing desligado agora + --> Sincronização desativada agora diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.ru.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.ru.xlf index 0de5c8a527..9cbfe6ff50 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.ru.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.ru.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + Операция не может быть завершена из-за предыдущей ошибки + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + Не удалось выполнить операцию. Текст ошибки был выведен в потоке ошибок. Чтобы вернуть соответствующие сведения FSharpErrorInfo, используйте EvalInteractionNonThrowing, EvalScriptNonThrowing или EvalExpressionNonThrowing + + Stopped due to error\n Остановлено из-за ошибки\n @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - Возникла проблема при запуске процесса F# Interactive. Это может быть вызвано известной проблемой с поддержкой консоли фонового процесса для приложений с поддержкой Юникода в некоторых системах Windows. Попробуйте выбрать "Сервис" -> "Параметры" -> "F# Interactive для Visual Studio" и ввести "--fsi-server-no-unicode". + Возникла проблема при запуске процесса F# Interactive. Это может быть связано с известной проблемой с поддержкой консоли в фоновых процессах для приложений с поддержкой Unicode на некоторых системах Windows. Выберите "Инструменты"->"Параметры"->"F# Interactive" для Visual Studio и введите '--fsi-server-no-unicode'. @@ -209,32 +219,32 @@ --> Referenced '{0}' - --> Задана ссылка на "{0}" + --> Добавлена ссылка на "{0}" --> Referenced '{0}' (file may be locked by F# Interactive process) - --> Задана ссылка на "{0}" (возможно, файл заблокирован процессом F# Interactive) + --> Добавлена ссылка на "{0}" (файл может быть заблокирован процессом F# Interactive) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> "{0}" с заданной ссылкой (из этого расположения уже задана ссылка на сборку с другой меткой времени, выполните сброс fsi, чтобы загрузить обновленную сборку) + --> Добавлена ссылка на "{0}" (из этого расположения уже указана ссылка на сборку с другой временной отметкой; чтобы загрузить обновленную сборку, сбросьте fsi) --> Added '{0}' to library include path - --> Выполнено добавление "{0}" по пути включения в библиотеку + --> В путь включения библиотеки добавлен "{0}" --> Timing now on - --> Таймер включен + --> Синхронизация включена --> Timing now off - --> Таймер отключен + --> Синхронизация отключена diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.tr.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.tr.xlf index 61fb0cee68..65042521c7 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.tr.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.tr.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + Önceki hata nedeniyle işlem tamamlanamadı + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + İşlem başarısız oldu. Hata metni hata akışında yazdırıldı. İlgili FSharpErrorInfo bilgilerini döndürmek için EvalInteractionNonThrowing, EvalScriptNonThrowing veya EvalExpressionNonThrowing kullanın + + Stopped due to error\n Hata nedeniyle durduruldu\n @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - F# Etkileşimli işlemi başlatılırken bir sorun oluştu. Bu durum, bazı Windows sistemlerindeki Unicode kullanan uygulamalara yönelik arka plan işlemi konsol desteğinde bilinen bir soruna bağlı olabilir. Visual Studio için Araçlar->Seçenekler->F# Etkileşimli'yi seçmeyi deneyin ve '--fsi-server-no-unicode' girin. + F# Interactive işlemi başlatılırken br sorun oluştu. Bu, bazı Windows sistemlerinde Unicode etkin uygulamalar için arka planda işleme konsol desteğiyle ilgili bilinen bir sorundan kaynaklanıyor olabilir. Araçlar->Seçenekler->Visual Studio için F# Interactive seçeneğini belirleyip '--fsi-server-no-unicode' komutunu girmeyi deneyin. @@ -209,32 +219,32 @@ --> Referenced '{0}' - --> '{0}' öğesine başvuruldu + --> Başvurulan '{0}' --> Referenced '{0}' (file may be locked by F# Interactive process) - --> '{0}' öğesine başvuruldu (dosya F# Etkileşimli işlemi tarafından kilitlenmiş olabilir) + --> Başvurulan '{0}' (dosya F# Interactive işlemi tarafından kilitlenmiş olabilir) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> Başvurulan '{0}' (farklı bir zaman damgası olan bir bütünleştirilmiş koda bu konumdan zaten başvuruldu; güncelleştirilen bütünleştirilmiş kodu yüklemek için fsi'yi sıfırlayın) + --> Başvurulan '{0}' (bu konumdan farklı bir zaman damgasına sahip bir derlemeye zaten başvurulmuş, güncelleştirilmiş derlemeyi yüklemek için fsi'yi sıfırlayın) --> Added '{0}' to library include path - --> Kitaplık ekleme yoluna '{0}' eklendi + --> '{0}', kitaplık ekleme yoluna eklendi --> Timing now on - --> Zamanlama şimdi açık + --> Zamanlama açıldı --> Timing now off - --> Zamanlama şimdi kapalı + --> Zamanlama kapatıldı diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hans.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hans.xlf index 4a8085973e..a97b57363e 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hans.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hans.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + 由于早期错误,无法完成操作 + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + 操作失败。错误文本已在错误流中打印。要返回相应的 FSharpErrorInfo,请使用 EvalInteractionNonThrowing、EvalScriptNonThrowing 或 EvalExpressionNonThrowing + + Stopped due to error\n 已因出错而停止\n @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - 启动 F# 交互窗口进程时发生问题。此情况可能是由一个已知问题导致的,即某些 Windows 系统上的后台进程控制台不支持启用了 Unicode 的应用程序。请尝试选择“工具”->“选项”->“Visual Studio 的 F# 交互窗口”,然后输入“--fsi-server-no-unicode”。 + 启动 F# 交互进程时出现问题。这可能是由于某些 Windows 系统上启用 Unicode 的应用程序的后台进程控制台支持存在已知问题。请尝试选择“工具”->“选项”-> "F# Interactive for Visual Studio",然后输入 "--fsi-server-no-unicode"。 @@ -209,32 +219,32 @@ --> Referenced '{0}' - --> 已引用“{0}” + -> 引用的“{0}” --> Referenced '{0}' (file may be locked by F# Interactive process) - --> 已引用“{0}”(文件可能由 F# 交互窗口进程锁定) + --> 引用的“{0}”(F# 交互进程可能已锁定文件) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - ->引用“{0}”(具有不同时间戳的程序集已经从该位置引用并重置 fsi 以加载更新的程序集) + --> 引用的“{0}”(已从此位置引用具有不同时间戳的程序集,请重置 fsi 以加载更新后的程序集) --> Added '{0}' to library include path - --> 已将“{0}”添加到库包含路径 + --> 已将“{0}”添加到库包括路径 --> Timing now on - --> 现在已启用计时 + -> 计时现在打开 --> Timing now off - --> 现在已关闭计时 + -> 计时现已关闭 diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf index 4ba5fc71b7..936f04dd78 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf @@ -2,6 +2,16 @@ + + Operation could not be completed due to earlier error + 因為先前發生錯誤,所以無法完成作業 + + + + Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing + 作業失敗。錯誤文字已列印在錯誤資料流中。若要傳回相對應的 FSharpErrorInfo,請使用 EvalInteractionNonThrowing、EvalScriptNonThrowing 或 EvalExpressionNonThrowing + + Stopped due to error\n 已因錯誤而停止\n @@ -9,7 +19,7 @@ Usage: {0} <options> [script.fsx [<arguments>]] - 使用方式: {0} <選項> [script.fsx [<引數>]] + 用法: {0} <選項> [script.fsx [<引數>]] @@ -99,7 +109,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - 啟動 F# 互動處理序時發生問題。這可能是因為背景處理序主控台對於支援某些 Windows 系統上具備 Unicode 支援功能之應用程式的已知問題所造成。請嘗試選取 [工具] -> [選項] -> [F# Interactive for Visual Studio],然後輸入 '--fsi-server-no-unicode'。 + 啟動 F# Interactive 處理序時發生錯誤。這可能是某些 Windows 系統上可使用 Unicode 之應用程式的背景處理序主控台支援發生已知錯誤所致。請嘗試選取 [工具]->[選項]->[適用於 Visual Studio 的 F# Interactive] 並輸入 '--fsi-server-no-unicode’。 @@ -209,32 +219,32 @@ --> Referenced '{0}' - --> 參考的 '{0}' + --> 已參考 '{0}’ --> Referenced '{0}' (file may be locked by F# Interactive process) - --> 參考的 '{0}' (檔案可能已被 F# 互動處理序鎖定) + --> 已參考 '{0}' (F# Interactive 處理序可能鎖定了檔案) --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - --> 已參考 '{0}' (已經從這個位置參考有不同時間戳記的組件,請重設 fsi 以載入更新的組件) + --> 已參考 '{0}' (已從此位置參考具有不同時間戳記的組件,請重設 fsi 以載入更新的組件) --> Added '{0}' to library include path - --> 已將 '{0}' 加入程式庫 Include 路徑 + --> 已將 '{0}' 新增到程式庫 include 路徑 --> Timing now on - --> 計時現已開啟 + --> 計時現在已開啟 --> Timing now off - --> 計時現已關閉 + --> 計時現在已關閉 diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index 04d79253ac..990037e09d 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + Stream nezačíná zdrojem s hodnotou null a není ve formátu .RES. Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + Hlavička zdroje začínající na posunu {0} má chybný formát. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Atributy nejde použít pro rozšíření typů. diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index da3dfb3f7d..a0263a53bd 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + Der Stream beginnt nicht mit einer NULL-Ressource und ist nicht im RES-Format. Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + Der Ressourcenheader, der am Offset {0} beginnt, ist fehlerhaft formatiert. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Attribute können nicht auf Typerweiterungen angewendet werden. diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index 54d70ff1ef..ba91cf6400 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + El flujo no comienza con un recurso nulo ni está en formato ".RES". Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + El encabezado de los recursos que comienza en el desplazamiento {0} está mal formado. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Los atributos no se pueden aplicar a las extensiones de tipo. @@ -159,7 +159,7 @@ All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. - All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Todas las ramas de una expresión de coincidencia de patrón deben devolver valores del mismo tipo. La primera rama devolvió un valor de tipo "{0}", pero esta rama devolvió un valor de tipo "\{1 \}". diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index 0c95219908..d2751124db 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + Le flux ne commence pas par une ressource null et n'est pas au format '.RES'. Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + L'en-tête de ressource commençant au décalage {0} est mal formé. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Impossible d'appliquer des attributs aux extensions de type. diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index 9c5dc0937a..3dc48e6248 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + Il flusso non inizia con una risorsa Null e non è in formato '.RES'. Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + L'intestazione di risorsa che inizia a partire dall'offset {0} non è valida. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Gli attributi non possono essere applicati a estensioni di tipo. diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index c79daf99e1..46fc22b388 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -7,6 +7,16 @@ F# {1} のための {0} + + Stream does not begin with a null resource and is not in '.RES' format. + ストリームは null リソースでは始まらず、'RES' 形式でもありません。 + + + + Resource header beginning at offset {0} is malformed. + オフセット {0} で始まるリソース ヘッダーの形式に誤りがあります。 + + Display the allowed values for language version, specify language version such as 'latest' or 'preview' 言語バージョンで許可された値を表示し、'最新' や 'プレビュー' などの言語バージョンを指定する @@ -27,16 +37,6 @@ メンバー定義に予期しない記号 '.' があります。'with'、'=' またはその他のトークンが必要です。 - - Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. - - - - Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. - - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) PDB に格納されているソース ファイル チェックサムを計算するためのアルゴリズムを指定します。サポートされる値は次のとおりです: SHA1 または SHA256 (既定) @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + 属性を型拡張に適用することはできません。 diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index 9b509f10fd..0807084300 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + 스트림은 null 리소스로 시작되지 않으며 '.RES' 형식이 아닙니다. Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + 오프셋 {0}에서 시작하는 리소스 헤더의 형식이 잘못되었습니다. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + 형식 확장에 특성을 적용할 수 없습니다. diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index 56c58894e2..e9d92110cb 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + Strumień nie zaczyna się od zasobu o wartości null i nie jest w formacie „.RES”. Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + Nagłówek zasobu rozpoczynający się od przesunięcia {0} jest nieprawidłowo sformułowany. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Atrybutów nie można stosować do rozszerzeń typu. diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf index 7ff47eff44..7d15750bf3 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + Stream não começa com um recurso nulo e não está no formato '.RES'. Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + O cabeçalho do recurso que começa no deslocamento {0} está malformado. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Os atributos não podem ser aplicados às extensões de tipo. diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index fa2acf5942..9d34292526 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + Поток не начинается с нулевого ресурса и не соответствует формату ".RES". Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + Заголовок ресурса некорректен начиная со смещения {0}. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Атрибуты не могут быть применены к расширениям типа. diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index f701970ff2..18b7d759b2 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + Akış null kaynakla başlamıyor ve '.RES' biçiminde değil. Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + {0} uzaklığında başlayan kaynak üst bilgisi hatalı biçimlendirilmiş. @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + Öznitelikler tür uzantılarına uygulanamaz. diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf index 184b48a968..d3e0ab4f8e 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + 流应以空资源开头并且应采用 .RES 格式。 Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + 以偏移量 {0} 开始的资源标头格式不正确。 @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + 属性不可应用于类型扩展。 diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf index 5f379b01d5..41be9e5f87 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -9,12 +9,12 @@ Stream does not begin with a null resource and is not in '.RES' format. - Stream does not begin with a null resource and is not in '.RES' format. + 資料流未以 null 資源開頭,並且未使用 '.RES' 格式。 Resource header beginning at offset {0} is malformed. - Resource header beginning at offset {0} is malformed. + 從位移 {0} 開始的資源標頭格式錯誤。 @@ -49,7 +49,7 @@ Attributes cannot be applied to type extensions. - Attributes cannot be applied to type extensions. + 屬性無法套用到類型延伸模組。 diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf index 5340031907..b071e0c5f7 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf index 2ca4bd450e..4184f3edc5 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf index 394481ad69..4b1a5e0d90 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf index 821545638e..99d3469919 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf index dd58cb9a11..8902030751 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf index c0221174d9..de4d65e71f 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf index 6f540b5425..e7191ac3c4 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf index f912b6b4c7..6936b8e97f 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf index 5a2b75dce0..fefd197867 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf index 2b5303d91d..355d363084 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf index 73a72b806a..86ac32f4b3 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf index 474f99a3dc..0537632d5f 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf index 16b7339b2a..17c64ffefb 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf index 0d27949790..a9808062bd 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Diagnostika diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf index fc1d36391d..9e48372cb2 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Diagnose diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf index 24649ecad9..cd6b650ec6 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Diagnóstico diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf index d0f77ba362..90b7e5b378 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Diagnostics diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf index a5555f9738..51b5a87f28 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Diagnostica diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf index 847e294368..7a59c8c4d3 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + 診断 diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf index 55927919df..8ba93bed1b 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + 진단 diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf index db4a139485..3d83c8f6ad 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Diagnostyka diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf index 5385f6147d..e3a75c3136 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Diagnóstico diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf index ba6871df2e..106dcd8b87 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Диагностика diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf index 9caf1fa8b9..8525295e6e 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + Tanılama diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf index cff797b883..ff0bad3144 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + 诊断 diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf index a3267c876f..1edc051a59 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf @@ -44,7 +44,7 @@ Diagnostics - Diagnostics + 診斷 From 95ca3886becee08c44870a4b9fe21d9103773fdd Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 9 Nov 2019 13:21:39 +0000 Subject: [PATCH 20/51] Update dependencies from https://github.com/dotnet/arcade build 20191108.11 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19558.11 --- eng/Version.Details.xml | 4 +-- eng/common/templates/job/execute-sdl.yml | 28 ++++++++++++++----- .../channels/netcore-blazor-31-features.yml | 6 ++-- .../templates/post-build/common-variables.yml | 2 +- .../templates/post-build/post-build.yml | 2 ++ global.json | 2 +- 6 files changed, 30 insertions(+), 14 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9470178a3b..7b147553c7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - b62f1617f2c453497fd55697c04dd8021a38dc17 + be7971c98d4ad60cdf8c3d1aa41f950f42bd466a diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index 9a00430d65..2973bcaf3a 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -6,6 +6,11 @@ parameters: # This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter sdlContinueOnError: false # optional: determines whether to continue the build if the step errors; dependsOn: '' # Optional: dependencies of the job + artifactNames: '' # Optional: patterns supplied to DownloadBuildArtifacts + # Usage: + # artifactNames: + # - 'BlobArtifacts' + # - 'Artifacts_Windows_NT_Release' jobs: - job: Run_SDL @@ -18,13 +23,22 @@ jobs: steps: - checkout: self clean: true - - task: DownloadBuildArtifacts@0 - displayName: Download Build Artifacts - inputs: - buildType: current - downloadType: specific files - matchingPattern: "**" - downloadPath: $(Build.ArtifactStagingDirectory)\artifacts + - ${{ if ne(parameters.artifactNames, '') }}: + - ${{ each artifactName in parameters.artifactNames }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Artifacts + inputs: + buildType: current + artifactName: ${{ artifactName }} + downloadPath: $(Build.ArtifactStagingDirectory)\artifacts + - ${{ if eq(parameters.artifactNames, '') }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Artifacts + inputs: + buildType: current + downloadType: specific files + itemPattern: "**" + downloadPath: $(Build.ArtifactStagingDirectory)\artifacts - powershell: eng/common/sdl/extract-artifact-packages.ps1 -InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts diff --git a/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml b/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml index 8be0506ff9..297b541f9f 100644 --- a/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml +++ b/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml @@ -17,7 +17,7 @@ stages: - job: displayName: Symbol Publishing dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_31_Blazor_Features)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_31_Blazor_Features_Channel_Id)) variables: - group: DotNet-Symbol-Server-Pats pool: @@ -68,7 +68,7 @@ stages: value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - name: IsStableBuild value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_31_Blazor_Features)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_31_Blazor_Features_Channel_Id)) pool: vmImage: 'windows-2019' steps: @@ -140,4 +140,4 @@ stages: - template: ../../steps/promote-build.yml parameters: - ChannelId: ${{ variables.NetCore_31_Blazor_Features }} + ChannelId: ${{ variables.NetCore_31_Blazor_Features_Channel_Id }} diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index ad4e0004f2..56134ed44a 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -54,7 +54,7 @@ variables: value: 529 # .NET Core 3.1 Blazor Features - - name: NetCore_31_Blazor_Features + - name: NetCore_31_Blazor_Features_Channel_Id value: 531 # Whether the build is internal or not diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index f5755590cd..69286f51f1 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -8,6 +8,7 @@ parameters: enable: false continueOnError: false params: '' + artifactNames: '' # These parameters let the user customize the call to sdk-task.ps1 for publishing # symbols & general artifacts as well as for signing validation @@ -111,6 +112,7 @@ stages: parameters: additionalParameters: ${{ parameters.SDLValidationParameters.params }} continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} + artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} - template: \eng\common\templates\post-build\channels\netcore-dev-5.yml parameters: diff --git a/global.json b/global.json index 964bb5e247..04836ad338 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19557.20", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19558.11", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 3641f5c7f80c94a396dbbba376c41bb01cee68bc Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 12 Nov 2019 13:22:55 +0000 Subject: [PATCH 21/51] Update dependencies from https://github.com/dotnet/arcade build 20191111.8 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19561.8 --- eng/Version.Details.xml | 4 ++-- .../post-build/channels/general-testing.yml | 13 +++++++++++- .../channels/netcore-3-eng-validation.yml | 5 +++++ .../post-build/channels/netcore-3-eng.yml | 13 +++++++++++- .../channels/netcore-blazor-31-features.yml | 12 ++++++++++- .../post-build/channels/netcore-dev-31.yml | 12 ++++++++++- .../post-build/channels/netcore-dev-5.yml | 12 ++++++++++- .../channels/netcore-eng-latest.yml | 12 ++++++++++- .../channels/netcore-eng-validation.yml | 5 +++++ .../channels/netcore-internal-30.yml | 13 +++++++++++- .../channels/netcore-release-30.yml | 12 ++++++++++- .../channels/netcore-release-31.yml | 12 ++++++++++- .../templates/post-build/post-build.yml | 6 +++++- eng/common/templates/steps/publish-logs.yml | 21 +++++++++++++++++++ global.json | 2 +- 15 files changed, 141 insertions(+), 13 deletions(-) create mode 100644 eng/common/templates/steps/publish-logs.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7b147553c7..37481d60dd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - be7971c98d4ad60cdf8c3d1aa41f950f42bd466a + 4fd4ceae13d9305a5868bd1c11409c89905f5aa1 diff --git a/eng/common/templates/post-build/channels/general-testing.yml b/eng/common/templates/post-build/channels/general-testing.yml index 229e80a883..687b138e3d 100644 --- a/eng/common/templates/post-build/channels/general-testing.yml +++ b/eng/common/templates/post-build/channels/general-testing.yml @@ -14,7 +14,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.GeneralTesting_Channel_Id)) @@ -60,6 +60,12 @@ stages: /p:Configuration=Release ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_General_Testing' + JobLabel: 'SymbolPublishing' + + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -138,6 +144,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_General_Testing' + JobLabel: 'AssetsPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.GeneralTesting_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml b/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml index 47f7a445be..cffd1e848d 100644 --- a/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml +++ b/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml @@ -91,6 +91,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_3_Tools_Validation' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.NETCore_3_Tools_Validation_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-3-eng.yml b/eng/common/templates/post-build/channels/netcore-3-eng.yml index a8ef4435dd..95ce454fed 100644 --- a/eng/common/templates/post-build/channels/netcore-3-eng.yml +++ b/eng/common/templates/post-build/channels/netcore-3-eng.yml @@ -14,7 +14,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id)) @@ -60,6 +60,12 @@ stages: /p:Configuration=Release ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_3_Tools' + JobLabel: 'SymbolPublishing' + + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -138,6 +144,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_3_Tools' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.NetCore_3_Tools_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml b/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml index 297b541f9f..4a1302f608 100644 --- a/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml +++ b/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml @@ -14,7 +14,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_31_Blazor_Features_Channel_Id)) @@ -60,6 +60,11 @@ stages: /p:Configuration=Release ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Core_31_Blazor_Features' + JobLabel: 'SymbolPublishing' + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -138,6 +143,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Core_31_Blazor_Features' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.NetCore_31_Blazor_Features_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-dev-31.yml b/eng/common/templates/post-build/channels/netcore-dev-31.yml index 83a411f111..a2c2224a7a 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-31.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-31.yml @@ -24,7 +24,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id)) @@ -70,6 +70,11 @@ stages: /p:Configuration=Release ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Core_31_Dev' + JobLabel: 'SymbolPublishing' + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -154,6 +159,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Core_31_Dev' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.PublicDevRelease_31_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml index a918545677..f317e70cb0 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-5.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-5.yml @@ -24,7 +24,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id)) @@ -70,6 +70,11 @@ stages: /p:Configuration=Release ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Core_5_Dev' + JobLabel: 'SymbolPublishing' + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -154,6 +159,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Core_5_Dev' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.NetCore_5_Dev_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-eng-latest.yml b/eng/common/templates/post-build/channels/netcore-eng-latest.yml index 4bf6cdbde1..6f9034f1bc 100644 --- a/eng/common/templates/post-build/channels/netcore-eng-latest.yml +++ b/eng/common/templates/post-build/channels/netcore-eng-latest.yml @@ -24,7 +24,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id)) @@ -70,6 +70,11 @@ stages: /p:Configuration=Release ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Tools_Latest' + JobLabel: 'SymbolPublishing' + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -154,6 +159,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Tools_Latest' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.NetCore_Tools_Latest_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-eng-validation.yml b/eng/common/templates/post-build/channels/netcore-eng-validation.yml index 36991ed020..bde7938c66 100644 --- a/eng/common/templates/post-build/channels/netcore-eng-validation.yml +++ b/eng/common/templates/post-build/channels/netcore-eng-validation.yml @@ -93,6 +93,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_Tools_Validation' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.NetCore_Tools_Validation_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-internal-30.yml b/eng/common/templates/post-build/channels/netcore-internal-30.yml index 75b1bfaaad..863a3bc51c 100644 --- a/eng/common/templates/post-build/channels/netcore-internal-30.yml +++ b/eng/common/templates/post-build/channels/netcore-internal-30.yml @@ -23,7 +23,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id)) @@ -73,6 +73,11 @@ stages: /p:PublishToMSDL=false ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_30_Internal_Servicing' + JobLabel: 'SymbolPublishing' + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -154,8 +159,14 @@ stages: /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json' /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' + /p:PublishToMSDL=false ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_30_Internal_Servicing' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.InternalServicing_30_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-release-30.yml b/eng/common/templates/post-build/channels/netcore-release-30.yml index ad82afd50b..f3a7b42e73 100644 --- a/eng/common/templates/post-build/channels/netcore-release-30.yml +++ b/eng/common/templates/post-build/channels/netcore-release-30.yml @@ -24,7 +24,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id)) @@ -70,6 +70,11 @@ stages: /p:Configuration=Release ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_30_Release' + JobLabel: 'SymbolPublishing' + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -154,6 +159,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_30_Release' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.PublicRelease_30_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-release-31.yml b/eng/common/templates/post-build/channels/netcore-release-31.yml index 070c1186da..ad43342eb5 100644 --- a/eng/common/templates/post-build/channels/netcore-release-31.yml +++ b/eng/common/templates/post-build/channels/netcore-release-31.yml @@ -24,7 +24,7 @@ stages: jobs: - template: ../setup-maestro-vars.yml - - job: + - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id)) @@ -70,6 +70,11 @@ stages: /p:Configuration=Release ${{ parameters.symbolPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_31_Release' + JobLabel: 'SymbolPublishing' + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars @@ -154,6 +159,11 @@ stages: /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: 'Channel_Net_31_Release' + JobLabel: 'AssetPublishing' + - template: ../../steps/promote-build.yml parameters: ChannelId: ${{ variables.PublicRelease_31_Channel_Id }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 69286f51f1..49440f7060 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -79,9 +79,13 @@ stages: arguments: -task SigningValidation -restore -msbuildEngine dotnet /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' - /p:Configuration=Release ${{ parameters.signingValidationAdditionalParameters }} + - template: ../steps/publish-logs.yml + parameters: + StageLabel: 'Validation' + JobLabel: 'Signing' + - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}: - job: displayName: SourceLink Validation diff --git a/eng/common/templates/steps/publish-logs.yml b/eng/common/templates/steps/publish-logs.yml new file mode 100644 index 0000000000..21ea054f3c --- /dev/null +++ b/eng/common/templates/steps/publish-logs.yml @@ -0,0 +1,21 @@ +parameters: + StageLabel: '' + JobLabel: '' + +steps: +- task: Powershell@2 + displayName: Prepare Binlogs to Upload + inputs: + targetType: inline + script: | + New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${parameters.StageLabel}/${parameters.JobLabel}/ + Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${parameters.StageLabel}/${parameters.JobLabel}/ + +- task: PublishBuildArtifacts@1 + displayName: Publish Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs' + PublishLocation: Container + ArtifactName: PostBuilLogs + continueOnError: true + condition: always() diff --git a/global.json b/global.json index 04836ad338..f2254081d5 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19558.11", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19561.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 487df5cb9125f1e20c98cc7af76433733a1c2767 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Tue, 12 Nov 2019 00:24:47 +0200 Subject: [PATCH 22/51] Add FSharpUnionCase.HasFields (#7841) --- src/fsharp/symbols/Symbols.fs | 6 +++++- src/fsharp/symbols/Symbols.fsi | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs index add09769d6..d46313cb37 100755 --- a/src/fsharp/symbols/Symbols.fs +++ b/src/fsharp/symbols/Symbols.fs @@ -781,9 +781,13 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = checkIsResolved() v.Range + member __.HasFields = + if isUnresolved() then false else + v.UnionCase.RecdFieldsArray.Length <> 0 + member __.UnionCaseFields = if isUnresolved() then makeReadOnlyCollection [] else - v.UnionCase.RecdFields |> List.mapi (fun i _ -> FSharpField(cenv, FSharpFieldData.Union (v, i))) |> makeReadOnlyCollection + v.UnionCase.RecdFieldsArray |> Array.mapi (fun i _ -> FSharpField(cenv, FSharpFieldData.Union (v, i))) |> makeReadOnlyCollection member __.ReturnType = checkIsResolved() diff --git a/src/fsharp/symbols/Symbols.fsi b/src/fsharp/symbols/Symbols.fsi index 19df3cd26a..6893097ed9 100644 --- a/src/fsharp/symbols/Symbols.fsi +++ b/src/fsharp/symbols/Symbols.fsi @@ -382,6 +382,9 @@ and [] public FSharpUnionCase = /// Get the range of the name of the case member DeclarationLocation : range + /// Indicates if the union case has field definitions + member HasFields: bool + /// Get the data carried by the case. member UnionCaseFields: IList From bc832a8f1a5e4b64d08cef1092d0e8f107757164 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Tue, 12 Nov 2019 00:26:27 +0200 Subject: [PATCH 23/51] Optimize union case fields enumeration (#7840) --- src/fsharp/PatternMatchCompilation.fs | 2 +- src/fsharp/SignatureConformance.fs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs index d3c49646c1..5a8eaa6534 100755 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -1031,7 +1031,7 @@ let CompilePatternBasic (isNil origInputValTypars && not origInputVal.IsMemberOrModuleBinding && not ucref.Tycon.IsStructRecordOrUnionTycon && - ucref.UnionCase.RecdFields.Length >= 1 && + ucref.UnionCase.RecdFieldsArray.Length >= 1 && ucref.Tycon.UnionCasesArray.Length > 1) -> let v, vExpr = mkCompGenLocal m "unionCase" (mkProvenUnionCaseTy ucref tinst) diff --git a/src/fsharp/SignatureConformance.fs b/src/fsharp/SignatureConformance.fs index b367987e17..0a84d3af5f 100644 --- a/src/fsharp/SignatureConformance.fs +++ b/src/fsharp/SignatureConformance.fs @@ -346,8 +346,8 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = sigUnionCase.OtherRangeOpt <- Some (implUnionCase.Range, true) implUnionCase.OtherRangeOpt <- Some (sigUnionCase.Range, false) if implUnionCase.Id.idText <> sigUnionCase.Id.idText then err FSComp.SR.ModuleContainsConstructorButNamesDiffer - elif implUnionCase.RecdFields.Length <> sigUnionCase.RecdFields.Length then err FSComp.SR.ModuleContainsConstructorButDataFieldsDiffer - elif not (List.forall2 (checkField aenv) implUnionCase.RecdFields sigUnionCase.RecdFields) then err FSComp.SR.ModuleContainsConstructorButTypesOfFieldsDiffer + elif implUnionCase.RecdFieldsArray.Length <> sigUnionCase.RecdFieldsArray.Length then err FSComp.SR.ModuleContainsConstructorButDataFieldsDiffer + elif not (Array.forall2 (checkField aenv) implUnionCase.RecdFieldsArray sigUnionCase.RecdFieldsArray) then err FSComp.SR.ModuleContainsConstructorButTypesOfFieldsDiffer elif isLessAccessible implUnionCase.Accessibility sigUnionCase.Accessibility then err FSComp.SR.ModuleContainsConstructorButAccessibilityDiffers else checkAttribs aenv implUnionCase.Attribs sigUnionCase.Attribs (fun attribs -> implUnionCase.Attribs <- attribs) From 478f4457c41833684b280cf6804594ffed70ae1b Mon Sep 17 00:00:00 2001 From: Adeel Mujahid Date: Fri, 15 Nov 2019 02:33:07 +0200 Subject: [PATCH 24/51] P/invoke Kernel32.dll only on Windows (#7858) --- src/fsharp/lib.fs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fsharp/lib.fs b/src/fsharp/lib.fs index 7ed3521ca3..fba1c975e8 100755 --- a/src/fsharp/lib.fs +++ b/src/fsharp/lib.fs @@ -4,6 +4,7 @@ module internal FSharp.Compiler.Lib open System.IO open System.Collections.Generic +open System.Runtime.InteropServices open Internal.Utilities open FSharp.Compiler.AbstractIL.Internal open FSharp.Compiler.AbstractIL.Internal.Library @@ -518,7 +519,7 @@ module UnmanagedProcessExecutionOptions = // Translation of C# from http://swikb/v1/DisplayOnlineDoc.aspx?entryID=826 and copy in bug://5018 [] let EnableHeapTerminationOnCorruption() = - if (System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher System.Environment.Version.Major < 3) then // and CLR not 3.0 or higher // "The flag HeapSetInformation sets is available in Windows XP SP3 and later. // The data structure used for heap information is available on earlier versions of Windows. @@ -547,4 +548,4 @@ module StackGuard = let EnsureSufficientExecutionStack recursionDepth = if recursionDepth > MaxUncheckedRecursionDepth then - RuntimeHelpers.EnsureSufficientExecutionStack () \ No newline at end of file + RuntimeHelpers.EnsureSufficientExecutionStack () From 75443e25b113dd1d3a256236cff07f4d9151e97a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2019 21:31:59 -0800 Subject: [PATCH 25/51] [master] Update dependencies from dotnet/arcade (#7853) * Update dependencies from https://github.com/dotnet/arcade build 20191112.5 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19562.5 * Update dependencies from https://github.com/dotnet/arcade build 20191113.9 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19563.9 * Update dependencies from https://github.com/dotnet/arcade build 20191114.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19564.2 --- eng/Version.Details.xml | 4 +- ...al-30.yml => generic-internal-channel.yml} | 28 ++-- ...testing.yml => generic-public-channel.yml} | 26 +-- .../channels/netcore-3-eng-validation.yml | 101 ------------ .../post-build/channels/netcore-3-eng.yml | 154 ------------------ .../channels/netcore-blazor-31-features.yml | 153 ----------------- .../channels/netcore-eng-validation.yml | 103 ------------ .../templates/post-build/post-build.yml | 116 +++++++++++-- eng/common/templates/steps/publish-logs.yml | 8 +- global.json | 2 +- 10 files changed, 146 insertions(+), 549 deletions(-) rename eng/common/templates/post-build/channels/{netcore-internal-30.yml => generic-internal-channel.yml} (86%) rename eng/common/templates/post-build/channels/{general-testing.yml => generic-public-channel.yml} (87%) delete mode 100644 eng/common/templates/post-build/channels/netcore-3-eng-validation.yml delete mode 100644 eng/common/templates/post-build/channels/netcore-3-eng.yml delete mode 100644 eng/common/templates/post-build/channels/netcore-blazor-31-features.yml delete mode 100644 eng/common/templates/post-build/channels/netcore-eng-validation.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 37481d60dd..52f05bd19f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 4fd4ceae13d9305a5868bd1c11409c89905f5aa1 + 44214d4d7d9091e31f57c5e6bc51180cbb0f79bf diff --git a/eng/common/templates/post-build/channels/netcore-internal-30.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml similarity index 86% rename from eng/common/templates/post-build/channels/netcore-internal-30.yml rename to eng/common/templates/post-build/channels/generic-internal-channel.yml index 863a3bc51c..a35256bc59 100644 --- a/eng/common/templates/post-build/channels/netcore-internal-30.yml +++ b/eng/common/templates/post-build/channels/generic-internal-channel.yml @@ -12,21 +12,27 @@ stages: - Validate publishInstallersAndChecksums: false symbolPublishingAdditionalParameters: '' + stageName: '' + channelName: '' + channelId: '' + transportFeed: '' + shippingFeed: '' + symbolsFeed: '' stages: -- stage: NetCore_30_Internal_Servicing_Publishing +- stage: ${{ parameters.stageName }} dependsOn: ${{ parameters.dependsOn }} >>>>>>> refs/rewritten/master variables: - template: ../common-variables.yml - displayName: .NET Core 3.0 Internal Servicing Publishing + displayName: ${{ parameters.channelName }} Publishing jobs: - template: ../setup-maestro-vars.yml - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )) variables: - group: DotNet-Symbol-Server-Pats pool: @@ -75,7 +81,7 @@ stages: - template: ../../steps/publish-logs.yml parameters: - StageLabel: 'Channel_Net_30_Internal_Servicing' + StageLabel: '${{ parameters.stageName }}' JobLabel: 'SymbolPublishing' - job: publish_assets @@ -86,7 +92,7 @@ stages: value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - name: IsStableBuild value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }})) pool: vmImage: 'windows-2019' steps: @@ -153,20 +159,20 @@ stages: /p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey) /p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl) /p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey) - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json' + /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json' + /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json' + /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' /p:PublishToMSDL=false ${{ parameters.artifactsPublishingAdditionalParameters }} - template: ../../steps/publish-logs.yml parameters: - StageLabel: 'Channel_Net_30_Internal_Servicing' - JobLabel: 'AssetPublishing' + StageLabel: '${{ parameters.stageName }}' + JobLabel: 'AssetsPublishing' - template: ../../steps/promote-build.yml parameters: - ChannelId: ${{ variables.InternalServicing_30_Channel_Id }} + ChannelId: ${{ parameters.channelId }} diff --git a/eng/common/templates/post-build/channels/general-testing.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml similarity index 87% rename from eng/common/templates/post-build/channels/general-testing.yml rename to eng/common/templates/post-build/channels/generic-public-channel.yml index 687b138e3d..59b4765da1 100644 --- a/eng/common/templates/post-build/channels/general-testing.yml +++ b/eng/common/templates/post-build/channels/generic-public-channel.yml @@ -4,20 +4,26 @@ parameters: - Validate publishInstallersAndChecksums: false symbolPublishingAdditionalParameters: '' + stageName: '' + channelName: '' + channelId: '' + transportFeed: '' + shippingFeed: '' + symbolsFeed: '' stages: -- stage: General_Testing_Publish +- stage: ${{ parameters.stageName }} dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml - displayName: General Testing Publishing + displayName: ${{ parameters.channelName }} Publishing jobs: - template: ../setup-maestro-vars.yml - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.GeneralTesting_Channel_Id)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )) variables: - group: DotNet-Symbol-Server-Pats pool: @@ -62,7 +68,7 @@ stages: - template: ../../steps/publish-logs.yml parameters: - StageLabel: 'Channel_General_Testing' + StageLabel: '${{ parameters.stageName }}' JobLabel: 'SymbolPublishing' @@ -74,7 +80,7 @@ stages: value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - name: IsStableBuild value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.GeneralTesting_Channel_Id)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }})) pool: vmImage: 'windows-2019' steps: @@ -136,19 +142,19 @@ stages: /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' + /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' + /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json' + /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} - template: ../../steps/publish-logs.yml parameters: - StageLabel: 'Channel_General_Testing' + StageLabel: '${{ parameters.stageName }}' JobLabel: 'AssetsPublishing' - template: ../../steps/promote-build.yml parameters: - ChannelId: ${{ variables.GeneralTesting_Channel_Id }} + ChannelId: ${{ parameters.channelId }} diff --git a/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml b/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml deleted file mode 100644 index cffd1e848d..0000000000 --- a/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml +++ /dev/null @@ -1,101 +0,0 @@ -parameters: - artifactsPublishingAdditionalParameters: '' - dependsOn: - - Validate - publishInstallersAndChecksums: false - -stages: -- stage: NetCore_3_Tools_Validation_Publish - dependsOn: ${{ parameters.dependsOn }} - variables: - - template: ../common-variables.yml - displayName: .NET 3 Tools - Validation Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NETCore_3_Tools_Validation_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: 'Channel_Net_3_Tools_Validation' - JobLabel: 'AssetPublishing' - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NETCore_3_Tools_Validation_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-3-eng.yml b/eng/common/templates/post-build/channels/netcore-3-eng.yml deleted file mode 100644 index 95ce454fed..0000000000 --- a/eng/common/templates/post-build/channels/netcore-3-eng.yml +++ /dev/null @@ -1,154 +0,0 @@ -parameters: - artifactsPublishingAdditionalParameters: '' - dependsOn: - - Validate - publishInstallersAndChecksums: false - symbolPublishingAdditionalParameters: '' - -stages: -- stage: NetCore_3_Tools_Publish - dependsOn: ${{ parameters.dependsOn }} - variables: - - template: ../common-variables.yml - displayName: .NET 3 Tools Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: publish_symbols - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id)) - variables: - - group: DotNet-Symbol-Server-Pats - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts - inputs: - artifactName: 'PDBArtifacts' - continueOnError: true - - # This is necessary whenever we want to publish/restore to an AzDO private feed - # Since sdk-task.ps1 tries to restore packages we need to do this authentication here - # otherwise there will be authentication failures when accessing a private feed hosted in a different org. - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: 'Channel_Net_3_Tools' - JobLabel: 'SymbolPublishing' - - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: 'Channel_Net_3_Tools' - JobLabel: 'AssetPublishing' - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NetCore_3_Tools_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml b/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml deleted file mode 100644 index 4a1302f608..0000000000 --- a/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml +++ /dev/null @@ -1,153 +0,0 @@ -parameters: - artifactsPublishingAdditionalParameters: '' - dependsOn: - - Validate - publishInstallersAndChecksums: false - symbolPublishingAdditionalParameters: '' - -stages: -- stage: NetCore_Blazor31_Features_Publish - dependsOn: ${{ parameters.dependsOn }} - variables: - - template: ../common-variables.yml - displayName: .NET Core 3.1 Blazor Features Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: publish_symbols - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_31_Blazor_Features_Channel_Id)) - variables: - - group: DotNet-Symbol-Server-Pats - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts - inputs: - artifactName: 'PDBArtifacts' - continueOnError: true - - # This is necessary whenever we want to publish/restore to an AzDO private feed - # Since sdk-task.ps1 tries to restore packages we need to do this authentication here - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: 'Channel_Net_Core_31_Blazor_Features' - JobLabel: 'SymbolPublishing' - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_31_Blazor_Features_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: 'Channel_Net_Core_31_Blazor_Features' - JobLabel: 'AssetPublishing' - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NetCore_31_Blazor_Features_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-eng-validation.yml b/eng/common/templates/post-build/channels/netcore-eng-validation.yml deleted file mode 100644 index bde7938c66..0000000000 --- a/eng/common/templates/post-build/channels/netcore-eng-validation.yml +++ /dev/null @@ -1,103 +0,0 @@ -parameters: - artifactsPublishingAdditionalParameters: '' - dependsOn: - - Validate - publishInstallersAndChecksums: false - -stages: -- stage: PVR_Publish - dependsOn: ${{ parameters.dependsOn }} - variables: - - template: ../common-variables.yml - displayName: .NET Tools - Validation Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Validation_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - # Since sdk-task.ps1 tries to restore packages we need to do this authentication here - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/publish-logs.yml - parameters: - StageLabel: 'Channel_Net_Tools_Validation' - JobLabel: 'AssetPublishing' - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NetCore_Tools_Validation_Channel_Id }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 49440f7060..adedc70b83 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -118,77 +118,171 @@ stages: continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} -- template: \eng\common\templates\post-build\channels\netcore-dev-5.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Dev5_Publish' + channelName: '.NET Core 5 Dev' + channelId: 131 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-dev-31.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Dev31_Publish' + channelName: '.NET Core 3.1 Dev' + channelId: 128 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-eng-latest.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Tools_Latest_Publish' + channelName: '.NET Tools - Latest' + channelId: 2 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-eng-validation.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'PVR_Publish' + channelName: '.NET Tools - Validation' + channelId: 9 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_3_Tools_Validation_Publish' + channelName: '.NET 3 Tools - Validation' + channelId: 390 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-3-eng-validation.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_3_Tools_Publish' + channelName: '.NET 3 Tools' + channelId: 344 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-3-eng.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Release30_Publish' + channelName: '.NET Core 3.0 Release' + channelId: 19 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Release31_Publish' + channelName: '.NET Core 3.1 Release' + channelId: 129 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-release-30.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Blazor31_Features_Publish' + channelName: '.NET Core 3.1 Blazor Features' + channelId: 531 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-release-31.yml +- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_30_Internal_Servicing_Publishing' + channelName: '.NET Core 3.0 Internal Servicing' + channelId: 184 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-blazor-31-features.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'General_Testing_Publish' + channelName: 'General Testing' + channelId: 529 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-internal-30.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_Tooling_Dev_Publishing' + channelName: '.NET Core Tooling Dev' + channelId: 548 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\general-testing.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_Tooling_Release_Publishing' + channelName: '.NET Core Tooling Release' + channelId: 549 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' diff --git a/eng/common/templates/steps/publish-logs.yml b/eng/common/templates/steps/publish-logs.yml index 21ea054f3c..8903ba57c0 100644 --- a/eng/common/templates/steps/publish-logs.yml +++ b/eng/common/templates/steps/publish-logs.yml @@ -8,9 +8,11 @@ steps: inputs: targetType: inline script: | - New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${parameters.StageLabel}/${parameters.JobLabel}/ - Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${parameters.StageLabel}/${parameters.JobLabel}/ - + New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + continueOnError: true + condition: always() + - task: PublishBuildArtifacts@1 displayName: Publish Logs inputs: diff --git a/global.json b/global.json index f2254081d5..9b868128fe 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19561.8", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19564.2", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 04471461e9b0a1e21c706545360b7bbba0e28749 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2019 18:26:31 +0000 Subject: [PATCH 26/51] Update dependencies from https://github.com/dotnet/arcade build 20191114.6 (#7867) - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19564.6 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 52f05bd19f..4eb2be5c22 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 44214d4d7d9091e31f57c5e6bc51180cbb0f79bf + c1cd0349f7d29cf21d93d61cdea382aecc422e36 diff --git a/global.json b/global.json index 9b868128fe..3434fa0fc6 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19564.2", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19564.6", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 77a5cb90eefce425fb89ebe5e77e78e47f72aa52 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 16 Nov 2019 13:17:42 +0000 Subject: [PATCH 27/51] Update dependencies from https://github.com/dotnet/arcade build 20191115.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19565.1 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4eb2be5c22..72105363e4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - c1cd0349f7d29cf21d93d61cdea382aecc422e36 + ccb393e43ad12d84d3ce4ccdd931a0bcd05eacb1 diff --git a/global.json b/global.json index 3434fa0fc6..7a4c98c50b 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19564.6", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19565.1", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 5366ca110ef615c372cdc880ce3bccece783f8c9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 17 Nov 2019 13:18:30 +0000 Subject: [PATCH 28/51] Update dependencies from https://github.com/dotnet/arcade build 20191116.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19566.1 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 72105363e4..c1331a01a1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - ccb393e43ad12d84d3ce4ccdd931a0bcd05eacb1 + 2c6db6ee8d8adeb2e8ccc1485e6780635890e419 diff --git a/global.json b/global.json index 7a4c98c50b..26af281ded 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19565.1", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19566.1", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From c8f5fba05874e60157916a45cd51123e7c4cfe5f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 18 Nov 2019 13:17:18 +0000 Subject: [PATCH 29/51] Update dependencies from https://github.com/dotnet/arcade build 20191117.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19567.2 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c1331a01a1..f219acccad 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 2c6db6ee8d8adeb2e8ccc1485e6780635890e419 + 928efaa081ffd17b37f6c662fee44775f2d0b90f diff --git a/global.json b/global.json index 26af281ded..a4b073e074 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19566.1", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19567.2", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From e26902a29004f2969913b249bd3b01a95ccbd277 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 19 Nov 2019 13:16:49 +0000 Subject: [PATCH 30/51] Update dependencies from https://github.com/dotnet/arcade build 20191118.10 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19568.10 --- eng/Version.Details.xml | 4 +- eng/common/cross/build-rootfs.sh | 2 +- .../channels/generic-public-channel.yml | 1 - .../templates/post-build/post-build.yml | 91 ------------------- global.json | 2 +- 5 files changed, 4 insertions(+), 96 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f219acccad..867e19da34 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 928efaa081ffd17b37f6c662fee44775f2d0b90f + 303e0fac8703c7147c9e1f1046082c8db4fb66fa diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index d7d5d7d5f4..8d61377a87 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -193,7 +193,7 @@ fi if [[ "$__LinuxCodeName" == "alpine" ]]; then __ApkToolsVersion=2.9.1 - __AlpineVersion=3.7 + __AlpineVersion=3.9 __ApkToolsDir=$(mktemp -d) wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir diff --git a/eng/common/templates/post-build/channels/generic-public-channel.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml index 59b4765da1..3f572f8b12 100644 --- a/eng/common/templates/post-build/channels/generic-public-channel.yml +++ b/eng/common/templates/post-build/channels/generic-public-channel.yml @@ -71,7 +71,6 @@ stages: StageLabel: '${{ parameters.stageName }}' JobLabel: 'SymbolPublishing' - - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index adedc70b83..5965cc2005 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -131,19 +131,6 @@ stages: shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_Dev31_Publish' - channelName: '.NET Core 3.1 Dev' - channelId: 128 - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} @@ -170,84 +157,6 @@ stages: shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_3_Tools_Validation_Publish' - channelName: '.NET 3 Tools - Validation' - channelId: 390 - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - -- template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_3_Tools_Publish' - channelName: '.NET 3 Tools' - channelId: 344 - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' - -- template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_Release30_Publish' - channelName: '.NET Core 3.0 Release' - channelId: 19 - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json' - -- template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_Release31_Publish' - channelName: '.NET Core 3.1 Release' - channelId: 129 - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' - -- template: \eng\common\templates\post-build\channels\generic-public-channel.yml - parameters: - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_Blazor31_Features_Publish' - channelName: '.NET Core 3.1 Blazor Features' - channelId: 531 - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json' - -- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml - parameters: - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: ${{ parameters.publishDependsOn }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_30_Internal_Servicing_Publishing' - channelName: '.NET Core 3.0 Internal Servicing' - channelId: 184 - transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json' - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} diff --git a/global.json b/global.json index a4b073e074..f94f1dee52 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19567.2", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19568.10", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 75c83a30f49e06fbdc0475f8da9cea6ba18aded2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 20 Nov 2019 13:19:17 +0000 Subject: [PATCH 31/51] Update dependencies from https://github.com/dotnet/arcade build 20191119.6 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19569.6 --- eng/Version.Details.xml | 4 ++-- .../post-build/channels/generic-internal-channel.yml | 1 - global.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 867e19da34..d3f59466db 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 303e0fac8703c7147c9e1f1046082c8db4fb66fa + c29c916a0d1736522cfd944fcc06ead33b5e27db diff --git a/eng/common/templates/post-build/channels/generic-internal-channel.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml index a35256bc59..6762ffb53e 100644 --- a/eng/common/templates/post-build/channels/generic-internal-channel.yml +++ b/eng/common/templates/post-build/channels/generic-internal-channel.yml @@ -109,7 +109,6 @@ stages: buildType: current artifactName: BlobArtifacts continueOnError: true - - task: DownloadBuildArtifacts@0 displayName: Download Asset Manifests inputs: diff --git a/global.json b/global.json index f94f1dee52..ca1b0780a7 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19568.10", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19569.6", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 6a07ca914d8ca584f15e3c9cc6fd195467b23ae2 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Wed, 20 Nov 2019 19:23:18 +0100 Subject: [PATCH 32/51] Fixes #7859 (#7874) --- src/fsharp/fscmain.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/fsharp/fscmain.fs b/src/fsharp/fscmain.fs index 73e578f3de..f4c6b87c28 100644 --- a/src/fsharp/fscmain.fs +++ b/src/fsharp/fscmain.fs @@ -77,7 +77,6 @@ let main(argv) = System.Runtime.GCSettings.LatencyMode <- System.Runtime.GCLatencyMode.Batch use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter - if not runningOnMono then Lib.UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption() (* SDL recommendation *) Lib.UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption() (* SDL recommendation *) try From d89d4ff36ca0d2c4e277cd7a968c4be0d4fbe3e6 Mon Sep 17 00:00:00 2001 From: Will Smith Date: Wed, 20 Nov 2019 11:03:02 -0800 Subject: [PATCH 33/51] Minor pickle optimization for Map and list (#7812) * Minor pickle optimization for Map and list * Minor feedback changes * quick style change --- src/fsharp/TastPickle.fs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/fsharp/TastPickle.fs b/src/fsharp/TastPickle.fs index 4f9d8c6b61..d04a049be9 100644 --- a/src/fsharp/TastPickle.fs +++ b/src/fsharp/TastPickle.fs @@ -581,8 +581,7 @@ let u_array_ext extraf f st = extraItem, arr let u_list_core f n st = - [ for _ in 1..n do - yield f st ] + List.init n (fun _ -> f st) let u_list f st = let n = u_int st @@ -1305,11 +1304,23 @@ let u_ILInstr st = // Pickle/unpickle for F# types and module signatures //--------------------------------------------------------------------------- -let p_Map pk pv = p_wrap Map.toList (p_list (p_tup2 pk pv)) +let p_Map_core pk pv xs st = + xs |> Map.iter (fun k v -> pk k st; pv v st) + +let p_Map pk pv x st = + p_int (Map.count x) st + p_Map_core pk pv x st + let p_qlist pv = p_wrap QueueList.toList (p_list pv) let p_namemap p = p_Map p_string p -let u_Map uk uv = u_wrap Map.ofList (u_list (u_tup2 uk uv)) +let u_Map_core uk uv n st = + Map.ofSeq (seq { for _ in 1..n -> (uk st, uv st) }) + +let u_Map uk uv st = + let n = u_int st + u_Map_core uk uv n st + let u_qlist uv = u_wrap QueueList.ofList (u_list uv) let u_namemap u = u_Map u_string u From 9489f46f443d048f03b289d07699887cb2576502 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 20 Nov 2019 15:27:35 -0600 Subject: [PATCH 34/51] Update FCS build to using .Net Core only (#7883) * update runner to netcore runner * build working * release works, start on doc gen * disable docgen until fsharp.formatting is updated and .net core razor available * Add missing manifest file * reenable the linux fcs job * fix bash build script to go to the fcs dir before restore/build * use default targets where appropriate in build definitions * disable macos FCS builds until https://github.com/microsoft/azure-pipelines-image-generation/issues/1351 is merged --- fcs/.config/dotnet-tools.json | 18 + fcs/.gitignore | 1 + fcs/.paket/Paket.Restore.targets | 203 +++--- fcs/build.cmd | 8 +- fcs/build.fsx | 155 ++--- fcs/build.sh | 35 +- fcs/docsrc/tools/generate.fsx | 23 +- fcs/download-paket.ps1 | 15 - fcs/download-paket.sh | 23 - fcs/global.json | 5 + fcs/paket.dependencies | 31 +- fcs/paket.lock | 1092 +++++++++++++++++++++++++++++- 12 files changed, 1350 insertions(+), 259 deletions(-) create mode 100644 fcs/.config/dotnet-tools.json delete mode 100644 fcs/download-paket.ps1 delete mode 100755 fcs/download-paket.sh create mode 100644 fcs/global.json diff --git a/fcs/.config/dotnet-tools.json b/fcs/.config/dotnet-tools.json new file mode 100644 index 0000000000..c3e6f5e472 --- /dev/null +++ b/fcs/.config/dotnet-tools.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "fake-cli": { + "version": "5.18.3", + "commands": [ + "fake" + ] + }, + "paket": { + "version": "5.236.0", + "commands": [ + "paket" + ] + } + } +} \ No newline at end of file diff --git a/fcs/.gitignore b/fcs/.gitignore index a21a02ee54..ba316d8d5a 100644 --- a/fcs/.gitignore +++ b/fcs/.gitignore @@ -1,4 +1,5 @@ .paket/ +build.fsx.lock FSharp.Compiler.Service.Tests/TestResults/* FSharp.Compiler.Service.netstandard/illex.fs FSharp.Compiler.Service.netstandard/ilpars.fs diff --git a/fcs/.paket/Paket.Restore.targets b/fcs/.paket/Paket.Restore.targets index e33a731f23..dfc4aaec7a 100644 --- a/fcs/.paket/Paket.Restore.targets +++ b/fcs/.paket/Paket.Restore.targets @@ -5,6 +5,11 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(MSBuildVersion) + 15.0.0 + false + true true $(MSBuildThisFileDirectory) @@ -15,93 +20,132 @@ proj assembly native - /Library/Frameworks/Mono.framework/Commands/mono + /Library/Frameworks/Mono.framework/Commands/mono mono $(PaketRootPath)paket.bootstrapper.exe $(PaketToolsPath)paket.bootstrapper.exe $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ + + "$(PaketBootStrapperExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" - + + True - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - $(PaketToolsPath)paket.exe - $(_PaketBootStrapperExeDir)paket.exe - paket.exe + + False - - $(PaketRootPath)paket - $(PaketToolsPath)paket - $(PaketToolsPath)paket + $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) + - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe + + + + + + + $(PaketRootPath)paket + $(PaketToolsPath)paket + - - $(PaketBootStrapperExeDir)paket.exe + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + - - paket + + + + <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) + <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) + <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false + - - <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - dotnet "$(PaketExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - "$(PaketExePath)" + + + + + + + + <_PaketCommand>dotnet paket + - "$(PaketBootStrapperExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + + + + $(PaketToolsPath)paket + $(PaketBootStrapperExeDir)paket - - - - true - true + + paket + - - True - + + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" + + + + + + + + - + + + + - + true $(NoWarn);NU1603;NU1604;NU1605;NU1608 + false + true - - - /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }' - /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }' + + + + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + + + + + + + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) + + + + + %(PaketRestoreCachedKeyValue.Value) + %(PaketRestoreCachedKeyValue.Value) - - - - - - - - - - - - - - $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) - $([System.IO.File]::ReadAllText('$(PaketLockFilePath)')) + + true - false + false true @@ -114,19 +158,22 @@ + + - - + + + - + - + - $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached + $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached $(MSBuildProjectFullPath).paket.references @@ -161,8 +208,9 @@ - - + + + @@ -182,7 +230,7 @@ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) %(PaketReferencesFileLinesInfo.PackageVersion) @@ -195,7 +243,7 @@ - $(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools + $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools @@ -214,23 +262,20 @@ - + false - $(MSBuildVersion) - 15.8.0 - - + - <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/> + <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> @@ -246,15 +291,17 @@ true false true - $(BaseIntermediateOutputPath)$(Configuration) - $(BaseIntermediateOutputPath) + $(PaketIntermediateOutputPath)\$(Configuration) + $(PaketIntermediateOutputPath) - <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/> + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> - + + + @@ -280,7 +327,7 @@ DevelopmentDependency="$(DevelopmentDependency)" BuildOutputInPackage="@(_BuildOutputInPackage)" TargetPathsToSymbols="@(_TargetPathsToSymbols)" - SymbolPackageFormat="symbols.nupkg" + SymbolPackageFormat="$(SymbolPackageFormat)" TargetFrameworks="@(_TargetFrameworks)" AssemblyName="$(AssemblyName)" PackageOutputPath="$(PackageOutputAbsolutePath)" @@ -327,7 +374,7 @@ DevelopmentDependency="$(DevelopmentDependency)" BuildOutputInPackage="@(_BuildOutputInPackage)" TargetPathsToSymbols="@(_TargetPathsToSymbols)" - SymbolPackageFormat="symbols.nupkg" + SymbolPackageFormat="$(SymbolPackageFormat)" TargetFrameworks="@(_TargetFrameworks)" AssemblyName="$(AssemblyName)" PackageOutputPath="$(PackageOutputAbsolutePath)" diff --git a/fcs/build.cmd b/fcs/build.cmd index e556a4bd7d..dc47a88f8c 100644 --- a/fcs/build.cmd +++ b/fcs/build.cmd @@ -3,13 +3,14 @@ setlocal pushd %~dp0% +dotnet tool restore + if errorlevel 1 ( endlocal exit /b %errorlevel% ) -powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\download-paket.ps1" -.paket\paket.exe restore +dotnet paket restore if errorlevel 1 ( endlocal exit /b %errorlevel% @@ -18,7 +19,8 @@ if errorlevel 1 ( :: don't care if this fails dotnet build-server shutdown >NUL 2>&1 -packages\FAKE\tools\FAKE.exe build.fsx %* +dotnet fake build -t %* + if errorlevel 1 ( endlocal exit /b %errorlevel% diff --git a/fcs/build.fsx b/fcs/build.fsx index 0a3821c708..6b315182dd 100644 --- a/fcs/build.fsx +++ b/fcs/build.fsx @@ -1,58 +1,34 @@ // -------------------------------------------------------------------------------------- // FAKE build script // -------------------------------------------------------------------------------------- +#r "paket: groupref Main //" +#load "./.fake/build.fsx/intellisense.fsx" -#I "packages/FAKE/tools" -#r "packages/FAKE/tools/FakeLib.dll" open System open System.IO -open Fake -open Fake.AppVeyor -open Fake.ReleaseNotesHelper - -#if MONO -// prevent incorrect output encoding (e.g. https://github.com/fsharp/FAKE/issues/1196) -System.Console.OutputEncoding <- System.Text.Encoding.UTF8 -CleanDir (__SOURCE_DIRECTORY__ + "/../artifacts/TestResults") -File.WriteAllText(__SOURCE_DIRECTORY__ + "/../artifacts/TestResults/notestsyet.txt","No tests yet") -let isMono = true -#else -let isMono = false -#endif - - -let dotnetExePath = +open Fake.BuildServer +open Fake.Core +open Fake.DotNet +open Fake.IO + +BuildServer.install [ AppVeyor.Installer ] +// -------------------------------------------------------------------------------------- +// Utilities +// -------------------------------------------------------------------------------------- + +let withDotnetExe = // Build.cmd normally downloads a dotnet cli to: \artifacts\toolset\dotnet // check if there is one there to avoid downloading an additional one here let pathToCli = Path.Combine(__SOURCE_DIRECTORY__, @"..\artifacts\toolset\dotnet\dotnet.exe") if File.Exists(pathToCli) then - pathToCli + (fun opts -> { opts with DotNet.Options.DotNetCliPath = pathToCli }) else - DotNetCli.InstallDotNetSDK "3.0.100" - -let runDotnet workingDir args = - let result = - ExecProcess (fun info -> - info.FileName <- dotnetExePath - info.WorkingDirectory <- workingDir - info.Arguments <- args) TimeSpan.MaxValue - - if result <> 0 then failwithf "dotnet %s failed" args - -let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x - -let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) -> -#if MONO - let exe = exe.Replace("\\","/") - let args = args.Replace("\\","/") - printfn "[%s] mono %s %s" workDir exe args - Shell.Exec("mono", sprintf "%s %s" exe args, workDir) -#else - printfn "[%s] %s %s" workDir exe args - Shell.Exec(exe, args, workDir) -#endif - |> assertExitCodeZero -) + DotNet.install (fun cliOpts -> { cliOpts with Version = DotNet.CliVersion.GlobalJson }) + +let runDotnet workingDir command args = + let result = DotNet.exec (DotNet.Options.withWorkingDirectory workingDir >> withDotnetExe) command args + + if result.ExitCode <> 0 then failwithf "dotnet %s failed with errors: %s" args (result.Errors |> String.concat "\n") // -------------------------------------------------------------------------------------- // The rest of the code is standard F# build script @@ -61,77 +37,68 @@ let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) -> let releaseDir = Path.Combine(__SOURCE_DIRECTORY__, "../artifacts/bin/fcs/Release") // Read release notes & version info from RELEASE_NOTES.md -let release = LoadReleaseNotes (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md") -let isAppVeyorBuild = buildServer = BuildServer.AppVeyor -let isJenkinsBuild = buildServer = BuildServer.Jenkins +let release = ReleaseNotes.load (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md") +let isAppVeyorBuild = AppVeyor.detect() let isVersionTag (tag: string) = Version.TryParse tag |> fst -let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName -let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion +let hasRepoVersionTag = isAppVeyorBuild && AppVeyor.Environment.RepoTag && isVersionTag AppVeyor.Environment.RepoTagName +let assemblyVersion = if hasRepoVersionTag then AppVeyor.Environment.RepoTagName else release.NugetVersion let buildVersion = if hasRepoVersionTag then assemblyVersion - else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber + else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyor.Environment.BuildNumber else assemblyVersion -Target "Clean" (fun _ -> - CleanDir releaseDir +Target.create "Clean" (fun _ -> + Shell.cleanDir releaseDir ) -Target "Restore" (fun _ -> +Target.create "Restore" (fun _ -> // We assume a paket restore has already been run - runDotnet __SOURCE_DIRECTORY__ "restore ../src/buildtools/buildtools.proj -v n" - runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.sln -v n" + runDotnet __SOURCE_DIRECTORY__ "restore" "../src/buildtools/buildtools.proj -v n" + runDotnet __SOURCE_DIRECTORY__ "restore" "FSharp.Compiler.Service.sln -v n" ) -Target "BuildVersion" (fun _ -> +Target.create "BuildVersion" (fun _ -> Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore ) -Target "Build" (fun _ -> - runDotnet __SOURCE_DIRECTORY__ "build ../src/buildtools/buildtools.proj -v n -c Proto" +Target.create "Build" (fun _ -> + runDotnet __SOURCE_DIRECTORY__ "build" "../src/buildtools/buildtools.proj -v n -c Proto" let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/netcoreapp2.1/fslex.dll" let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/netcoreapp2.1/fsyacc.dll" - runDotnet __SOURCE_DIRECTORY__ (sprintf "build FSharp.Compiler.Service.sln -v n -c Release /p:FsLexPath=%s /p:FsYaccPath=%s /p:VersionPrefix=%s" fslexPath fsyaccPath assemblyVersion) + runDotnet __SOURCE_DIRECTORY__ "build" (sprintf "FSharp.Compiler.Service.sln -v n -c Release /p:FsLexPath=%s /p:FsYaccPath=%s" fslexPath fsyaccPath) ) -Target "Test" (fun _ -> +Target.create "Test" (fun _ -> // This project file is used for the netcoreapp2.0 tests to work out reference sets - runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n /restore /p:DisableCompilerRedirection=true" + runDotnet __SOURCE_DIRECTORY__ "build" "../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n /restore /p:DisableCompilerRedirection=true" // Now run the tests let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.xml") - runDotnet __SOURCE_DIRECTORY__ (sprintf "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -v n -c Release --test-adapter-path . --logger \"nunit;LogFilePath=%s\"" logFilePath) + runDotnet __SOURCE_DIRECTORY__ "test" (sprintf "FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -v n -c Release --test-adapter-path . --logger \"nunit;LogFilePath=%s\"" logFilePath) ) -// escape a string's content so that it can be passed on the command line -let escapeString (s: string) = - let replaced = s.Replace("\"", "\\\"") - sprintf "\"%s\"" replaced - -Target "NuGet" (fun _ -> - let props = - [ "VersionPrefix", release.NugetVersion - "PackageReleaseNotes", release.Notes |> String.concat "\n"] - |> Seq.map (fun (prop, value) -> sprintf "-p:%s=%s" prop (escapeString value)) - |> String.concat " " - - runDotnet __SOURCE_DIRECTORY__ (sprintf "pack FSharp.Compiler.Service.sln --no-build -v n -c Release %s" props) +Target.create "NuGet" (fun _ -> + DotNet.pack (fun packOpts -> + { packOpts with + Configuration = DotNet.BuildConfiguration.Release + Common = packOpts.Common |> withDotnetExe |> DotNet.Options.withVerbosity (Some DotNet.Verbosity.Normal) + MSBuildParams = { packOpts.MSBuildParams with + Properties = packOpts.MSBuildParams.Properties @ [ "Version", assemblyVersion; "PackageReleaseNotes", release.Notes |> String.concat "\n" ] } + }) "FSharp.Compiler.Service.sln" ) -Target "GenerateDocsEn" (fun _ -> - executeFSIWithArgs "docsrc/tools" "generate.fsx" [] [] |> ignore +Target.create "GenerateDocsEn" (fun _ -> + runDotnet "docsrc/tools" "fake" "run generate.fsx" ) -Target "GenerateDocsJa" (fun _ -> - executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" [] [] |> ignore +Target.create "GenerateDocsJa" (fun _ -> + runDotnet "docsrc/tools" "fake" "run generate.ja.fsx" ) -Target "PublishNuGet" (fun _ -> - Paket.Push (fun p -> - let apikey = - match getBuildParam "nuget-apikey" with - | s when not (String.IsNullOrWhiteSpace s) -> s - | _ -> getUserInput "Nuget API Key: " +Target.create "PublishNuGet" (fun _ -> + let apikey = Environment.environVarOrDefault "nuget-apikey" (UserInput.getUserPassword "Nuget API Key: ") + Paket.push (fun p -> { p with ApiKey = apikey WorkingDir = releaseDir }) @@ -140,10 +107,12 @@ Target "PublishNuGet" (fun _ -> // -------------------------------------------------------------------------------------- // Run all targets by default. Invoke 'build ' to override -Target "Start" DoNothing -Target "Release" DoNothing -Target "GenerateDocs" DoNothing -Target "TestAndNuGet" DoNothing +Target.create "Start" ignore +Target.create "Release" ignore +Target.create "GenerateDocs" ignore +Target.create "TestAndNuGet" ignore + +open Fake.Core.TargetOperators "Start" =?> ("BuildVersion", isAppVeyorBuild) @@ -161,21 +130,21 @@ Target "TestAndNuGet" DoNothing "NuGet" ==> "TestAndNuGet" - + "Build" ==> "NuGet" ==> "PublishNuGet" ==> "Release" "Build" - ==> "GenerateDocsEn" + // ==> "GenerateDocsEn" ==> "GenerateDocs" "Build" - ==> "GenerateDocsJa" + // ==> "GenerateDocsJa" ==> "GenerateDocs" "GenerateDocs" ==> "Release" -RunTargetOrDefault "Build" +Target.runOrDefaultWithArguments "Build" diff --git a/fcs/build.sh b/fcs/build.sh index 424d78d477..4c4819aca7 100755 --- a/fcs/build.sh +++ b/fcs/build.sh @@ -1,24 +1,17 @@ #!/bin/bash -if test "$OS" = "Windows_NT" -then - # use .Net - cmd fcs/build.cmd $@ -else - if [[ "$PWD" != *fcs ]]; then - cd fcs - fi - # use mono - if [[ ! -e ~/.config/.mono/certs ]]; then - mozroots --import --sync --quiet - fi +# bail out as soon as any single command errors +set -e - ./download-paket.sh - mono .paket/paket.exe restore - exit_code=$? - if [ $exit_code -ne 0 ]; then - exit $exit_code - fi - - mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx -fi +start_pwd=$PWD + +# dotnet tools look in certain paths by default that Just Work when we're in the fcs dir, +# so let's force that here: +cd $(dirname ${BASH_SOURCE[0]}) + +dotnet tool restore +dotnet paket restore +dotnet fake build -t $@ + +# but we'll be nice and go back to the start dir at the end +cd $start_pwd \ No newline at end of file diff --git a/fcs/docsrc/tools/generate.fsx b/fcs/docsrc/tools/generate.fsx index c5f7589b23..09fa803a2f 100644 --- a/fcs/docsrc/tools/generate.fsx +++ b/fcs/docsrc/tools/generate.fsx @@ -3,6 +3,9 @@ // (the generated documentation is stored in the 'docs' directory) // -------------------------------------------------------------------------------------- +#r "paket: groupref generate //" +#load "./.fake/generate.fsx/intellisense.fsx" + // Binaries that have XML documentation (in a corresponding generated XML file) let referenceBinaries = [ "FSharp.Compiler.Service.dll" ] // Web site location for the generated documentation @@ -20,15 +23,12 @@ let info = // For typical project, no changes are needed below // -------------------------------------------------------------------------------------- -#load "../../packages/FSharp.Formatting/FSharp.Formatting.fsx" -#I "../../packages/FAKE/tools" -#r "../../packages/FAKE/tools/FakeLib.dll" open Fake open System.IO -open Fake.FileHelper +open Fake.IO.FileSystemOperators +open Fake.IO +open Fake.Core open FSharp.Literate -open FSharp.MetadataFormat -open FSharp.Formatting.Razor let root = "." @@ -49,17 +49,18 @@ let layoutRoots = // Copy static files and CSS + JS from F# Formatting let copyFiles () = - CopyRecursive files output true |> Log "Copying file: " - ensureDirectory (output @@ "content") - CopyRecursive (formatting @@ "styles") (output @@ "content") true - |> Log "Copying styles and scripts: " + Shell.copyRecursive files output true + |> Trace.tracefn "Copying file: %A" + Directory.ensure (output @@ "content") + Shell.copyRecursive (formatting @@ "styles") (output @@ "content") true + |> Trace.tracefn "Copying styles and scripts: %A" let clr = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() let fsfmt = __SOURCE_DIRECTORY__ @@ ".." @@ ".." @@ @"packages" @@ "FSharp.Formatting" @@ "lib" @@ "net40" // Build API reference from XML comments let buildReference () = - CleanDir (output @@ "reference") + Shell.cleanDir (output @@ "reference") for lib in referenceBinaries do RazorMetadataFormat.Generate ( bin @@ lib, output @@ "reference", layoutRoots, diff --git a/fcs/download-paket.ps1 b/fcs/download-paket.ps1 deleted file mode 100644 index 4541168012..0000000000 --- a/fcs/download-paket.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -$paketurl="https://github.com/fsprojects/Paket/releases/download/5.215.0/paket.exe" -$paketdir = Join-Path $PSScriptRoot ".paket" -$paketpath = Join-Path $paketdir "paket.exe" - -# Enable TLS 1.2 and TLS 1.1 as Security Protocols -[Net.ServicePointManager]::SecurityProtocol = ` - [Net.SecurityProtocolType]::Tls12, - [Net.SecurityProtocolType]::Tls11; - -if (-not (Test-Path "$paketpath")) { - if (-not (Test-Path "$paketdir")) { - mkdir "$paketdir" - } - Invoke-WebRequest -Uri $paketurl -OutFile "$paketpath" -} diff --git a/fcs/download-paket.sh b/fcs/download-paket.sh deleted file mode 100755 index 2825ac4d5a..0000000000 --- a/fcs/download-paket.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE[0]}" - -# resolve $source until the file is no longer a symlink -while [[ -h "$source" ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -paketurl=https://github.com/fsprojects/Paket/releases/download/5.215.0/paket.exe -paketdir=$scriptroot/.paket -paketpath=$paketdir/paket.exe -if [ ! -e "$paketpath" ]; then - if [ ! -e "$paketdir" ]; then - mkdir "$paketdir" - fi - curl -o "$paketpath" -L $paketurl -fi diff --git a/fcs/global.json b/fcs/global.json new file mode 100644 index 0000000000..2223a05e31 --- /dev/null +++ b/fcs/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "3.0.100" + } +} \ No newline at end of file diff --git a/fcs/paket.dependencies b/fcs/paket.dependencies index d23e0010e7..c3d2f47304 100644 --- a/fcs/paket.dependencies +++ b/fcs/paket.dependencies @@ -1,6 +1,29 @@ -framework: net461 +source https://api.nuget.org/v3/index.json -source https://www.nuget.org/api/v2/ +storage: none +framework: netstandard2.0 -nuget FAKE 5.8.4 -nuget FSharp.Formatting +nuget FSharp.Core ~> 4.7 +nuget Fake.BuildServer.AppVeyor +nuget Fake.Core +nuget Fake.Core.Environment +nuget Fake.Core.Process +nuget Fake.Core.ReleaseNotes +nuget Fake.Core.Target +nuget Fake.Core.UserInput +nuget Fake.DotNet.Cli +nuget Fake.DotNet.Fsi +nuget Fake.DotNet.Paket + +group generate + +source https://api.nuget.org/v3/index.json + +storage: none +framework: netstandard2.0 + +nuget FSharp.Core +nuget Fake.Core +nuget Fake.IO.FileSystem +nuget Fake.Core.Trace +nuget FSharp.Literate diff --git a/fcs/paket.lock b/fcs/paket.lock index 85f5ff5efe..13fe5c84cc 100644 --- a/fcs/paket.lock +++ b/fcs/paket.lock @@ -1,19 +1,1089 @@ -RESTRICTION: == net461 +STORAGE: NONE +RESTRICTION: == netstandard2.0 NUGET - remote: https://www.nuget.org/api/v2 - FAKE (5.8.4) + remote: https://api.nuget.org/v3/index.json + BlackFox.VsWhere (1.0) + FSharp.Core (>= 4.2.3) + Fake.BuildServer.AppVeyor (5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.Process (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + Fake.IO.FileSystem (>= 5.18.3) + Fake.Net.Http (>= 5.18.3) + FSharp.Core (>= 4.7) + System.Diagnostics.FileVersionInfo (>= 4.3) + System.Diagnostics.Process (>= 4.3) + System.IO.FileSystem.Watcher (>= 4.3) + System.Net.Http (>= 4.3.4) + System.Xml.ReaderWriter (>= 4.3.1) + System.Xml.XDocument (>= 4.3) + System.Xml.XmlDocument (>= 4.3) + System.Xml.XPath (>= 4.3) + System.Xml.XPath.XDocument (>= 4.3) + System.Xml.XPath.XmlDocument (>= 4.3) + Fake.Core (5.16) + Fake.Core.CommandLineParsing (5.18.3) + FParsec (>= 1.0.3) + FSharp.Core (>= 4.7) + Fake.Core.Context (5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.Environment (5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.FakeVar (5.18.3) + Fake.Core.Context (>= 5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.Process (5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.FakeVar (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + Fake.IO.FileSystem (>= 5.18.3) + FSharp.Core (>= 4.7) + System.Diagnostics.Process (>= 4.3) + Fake.Core.ReleaseNotes (5.18.3) + Fake.Core.SemVer (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.SemVer (5.18.3) + FSharp.Core (>= 4.7) + System.Runtime.Numerics (>= 4.3) + Fake.Core.String (5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.Target (5.18.3) + Fake.Core.CommandLineParsing (>= 5.18.3) + Fake.Core.Context (>= 5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.FakeVar (>= 5.18.3) + Fake.Core.Process (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + FSharp.Control.Reactive (>= 4.2) + FSharp.Core (>= 4.7) + System.Reactive.Compatibility (>= 4.2) + Fake.Core.Tasks (5.18.3) + Fake.Core.Trace (>= 5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.Trace (5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.FakeVar (>= 5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.UserInput (5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.Xml (5.18.3) + Fake.Core.String (>= 5.18.3) + FSharp.Core (>= 4.7) + System.Xml.ReaderWriter (>= 4.3.1) + System.Xml.XDocument (>= 4.3) + System.Xml.XPath (>= 4.3) + System.Xml.XPath.XDocument (>= 4.3) + System.Xml.XPath.XmlDocument (>= 4.3) + Fake.DotNet.Cli (5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.Process (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + Fake.DotNet.MSBuild (>= 5.18.3) + Fake.DotNet.NuGet (>= 5.18.3) + Fake.IO.FileSystem (>= 5.18.3) + FSharp.Core (>= 4.7) + Mono.Posix.NETStandard (>= 1.0) + Newtonsoft.Json (>= 12.0.2) + Fake.DotNet.Fsi (5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.Process (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + Fake.DotNet.MSBuild (>= 5.18.3) + Fake.IO.FileSystem (>= 5.18.3) + Fake.Tools.Git (>= 5.18.3) + FSharp.Compiler.Service (>= 32.0) + FSharp.Core (>= 4.7) + Fake.DotNet.MSBuild (5.18.3) + BlackFox.VsWhere (>= 1.0) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.Process (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + Fake.IO.FileSystem (>= 5.18.3) + FSharp.Core (>= 4.7) + MSBuild.StructuredLogger (>= 2.0.110) + Fake.DotNet.NuGet (5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.Process (>= 5.18.3) + Fake.Core.SemVer (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Tasks (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + Fake.Core.Xml (>= 5.18.3) + Fake.IO.FileSystem (>= 5.18.3) + Fake.Net.Http (>= 5.18.3) + FSharp.Core (>= 4.7) + Newtonsoft.Json (>= 12.0.2) + NuGet.Protocol (>= 4.9.4) + System.Net.Http (>= 4.3.4) + Fake.DotNet.Paket (5.18.3) + Fake.Core.Process (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + Fake.DotNet.Cli (>= 5.18.3) + Fake.IO.FileSystem (>= 5.18.3) + FSharp.Core (>= 4.7) + Fake.IO.FileSystem (5.18.3) + Fake.Core.String (>= 5.18.3) + FSharp.Core (>= 4.7) + System.Diagnostics.FileVersionInfo (>= 4.3) + System.IO.FileSystem.Watcher (>= 4.3) + Fake.Net.Http (5.18.3) + Fake.Core.Trace (>= 5.18.3) + FSharp.Core (>= 4.7) + System.Net.Http (>= 4.3.4) + Fake.Tools.Git (5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.Process (>= 5.18.3) + Fake.Core.SemVer (>= 5.18.3) + Fake.Core.String (>= 5.18.3) + Fake.Core.Trace (>= 5.18.3) + Fake.IO.FileSystem (>= 5.18.3) + FSharp.Core (>= 4.7) + FParsec (1.0.3) + FSharp.Core (>= 4.2.3) + NETStandard.Library (>= 1.6.1) + FSharp.Compiler.Service (33.0) + FSharp.Core (>= 4.6.2) + System.Collections.Immutable (>= 1.5) + System.Diagnostics.Process (>= 4.1) + System.Diagnostics.TraceSource (>= 4.0) + System.Reflection.Emit (>= 4.3) + System.Reflection.Metadata (>= 1.6) + System.Reflection.TypeExtensions (>= 4.3) + System.Runtime.Loader (>= 4.0) + System.Security.Cryptography.Algorithms (>= 4.3) + FSharp.Control.Reactive (4.2) + FSharp.Core (>= 4.2.3) + System.Reactive (>= 4.0) + FSharp.Core (4.7) + Microsoft.Build (16.3) + Microsoft.Build.Framework (16.3) + System.Runtime.Serialization.Primitives (>= 4.1.1) + System.Threading.Thread (>= 4.0) + Microsoft.Build.Tasks.Core (16.3) + Microsoft.Build.Framework (>= 16.3) + Microsoft.Build.Utilities.Core (>= 16.3) + Microsoft.Win32.Registry (>= 4.3) + System.CodeDom (>= 4.4) + System.Collections.Immutable (>= 1.5) + System.Linq.Parallel (>= 4.0.1) + System.Net.Http (>= 4.3.4) + System.Reflection.Metadata (>= 1.6) + System.Reflection.TypeExtensions (>= 4.1) + System.Resources.Extensions (>= 4.6) + System.Resources.Writer (>= 4.0) + System.Threading.Tasks.Dataflow (>= 4.9) + Microsoft.Build.Utilities.Core (16.3) + Microsoft.Build.Framework (>= 16.3) + Microsoft.Win32.Registry (>= 4.3) + System.Collections.Immutable (>= 1.5) + System.Text.Encoding.CodePages (>= 4.0.1) + Microsoft.NETCore.Platforms (3.0) + Microsoft.NETCore.Targets (3.0) + Microsoft.Win32.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + Microsoft.Win32.Registry (4.6) + System.Buffers (>= 4.5) + System.Memory (>= 4.5.3) + System.Security.AccessControl (>= 4.6) + System.Security.Principal.Windows (>= 4.6) + Mono.Posix.NETStandard (1.0) + MSBuild.StructuredLogger (2.0.152) + Microsoft.Build (>= 15.8.166) + Microsoft.Build.Framework (>= 15.8.166) + Microsoft.Build.Tasks.Core (>= 15.8.166) + Microsoft.Build.Utilities.Core (>= 15.8.166) + NETStandard.Library (2.0.3) + Microsoft.NETCore.Platforms (>= 1.1) + Newtonsoft.Json (12.0.3) + NuGet.Common (5.3.1) + NuGet.Frameworks (>= 5.3.1) + System.Diagnostics.Process (>= 4.3) + System.Threading.Thread (>= 4.3) + NuGet.Configuration (5.3.1) + NuGet.Common (>= 5.3.1) + System.Security.Cryptography.ProtectedData (>= 4.3) + NuGet.Frameworks (5.3.1) + NuGet.Packaging (5.3.1) + Newtonsoft.Json (>= 9.0.1) + NuGet.Configuration (>= 5.3.1) + NuGet.Versioning (>= 5.3.1) + System.Dynamic.Runtime (>= 4.3) + NuGet.Protocol (5.3.1) + NuGet.Packaging (>= 5.3.1) + System.Dynamic.Runtime (>= 4.3) + NuGet.Versioning (5.3.1) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.native.System (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + runtime.native.System.Net.Http (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + runtime.native.System.Security.Cryptography.Apple (4.3.1) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) + runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + System.Buffers (4.5) + System.CodeDom (4.6) + System.Collections (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Collections.Concurrent (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Collections.Immutable (1.6) + System.Memory (>= 4.5.3) + System.Diagnostics.Debug (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Diagnostics.DiagnosticSource (4.6) + System.Memory (>= 4.5.3) + System.Diagnostics.FileVersionInfo (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Reflection.Metadata (>= 1.4.1) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Diagnostics.Process (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.Win32.Primitives (>= 4.3) + Microsoft.Win32.Registry (>= 4.3) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.Encoding.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Thread (>= 4.3) + System.Threading.ThreadPool (>= 4.3) + System.Diagnostics.Tools (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Diagnostics.TraceSource (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Diagnostics.Tracing (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Dynamic.Runtime (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Linq (>= 4.3) + System.Linq.Expressions (>= 4.3) + System.ObjectModel (>= 4.3) + System.Reflection (>= 4.3) + System.Reflection.Emit (>= 4.3) + System.Reflection.Emit.ILGeneration (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Reflection.TypeExtensions (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Globalization (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Globalization.Calendars (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Globalization (>= 4.3) + System.Runtime (>= 4.3) + System.Globalization.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.IO (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.FileSystem (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.FileSystem.Primitives (4.3) + System.Runtime (>= 4.3) + System.IO.FileSystem.Watcher (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.Win32.Primitives (>= 4.3) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Overlapped (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Thread (>= 4.3) + System.Linq (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Linq.Expressions (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Linq (>= 4.3) + System.ObjectModel (>= 4.3) + System.Reflection (>= 4.3) + System.Reflection.Emit (>= 4.3) + System.Reflection.Emit.ILGeneration (>= 4.3) + System.Reflection.Emit.Lightweight (>= 4.3) + System.Reflection.Extensions (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Reflection.TypeExtensions (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Linq.Parallel (4.3) + System.Collections (>= 4.3) + System.Collections.Concurrent (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Linq (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Memory (4.5.3) + System.Buffers (>= 4.4) + System.Numerics.Vectors (>= 4.4) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) + System.Net.Http (4.3.4) + Microsoft.NETCore.Platforms (>= 1.1.1) + runtime.native.System (>= 4.3) + runtime.native.System.Net.Http (>= 4.3) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.DiagnosticSource (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Globalization (>= 4.3) + System.Globalization.Extensions (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.Net.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.OpenSsl (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Security.Cryptography.X509Certificates (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Net.Primitives (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime (>= 4.3.1) + System.Runtime.Handles (>= 4.3) + System.Numerics.Vectors (4.5) + System.ObjectModel (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Reactive (4.2) + System.Runtime.InteropServices.WindowsRuntime (>= 4.3) + System.Threading.Tasks.Extensions (>= 4.5.3) + System.Reactive.Compatibility (4.2) + System.Reactive.Core (>= 4.2) + System.Reactive.Interfaces (>= 4.2) + System.Reactive.Linq (>= 4.2) + System.Reactive.PlatformServices (>= 4.2) + System.Reactive.Providers (>= 4.2) + System.Reactive.Core (4.2) + System.Reactive (>= 4.2) + System.Threading.Tasks.Extensions (>= 4.5.3) + System.Reactive.Interfaces (4.2) + System.Reactive (>= 4.2) + System.Threading.Tasks.Extensions (>= 4.5.3) + System.Reactive.Linq (4.2) + System.Reactive (>= 4.2) + System.Threading.Tasks.Extensions (>= 4.5.3) + System.Reactive.PlatformServices (4.2) + System.Reactive (>= 4.2) + System.Threading.Tasks.Extensions (>= 4.5.3) + System.Reactive.Providers (4.2) + System.Reactive (>= 4.2) + System.Threading.Tasks.Extensions (>= 4.5.3) + System.Reflection (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Emit (4.6) + System.Reflection.Emit.ILGeneration (>= 4.6) + System.Reflection.Emit.ILGeneration (4.6) + System.Reflection.Emit.Lightweight (4.6) + System.Reflection.Emit.ILGeneration (>= 4.6) + System.Reflection.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Metadata (1.7) + System.Collections.Immutable (>= 1.6) + System.Reflection.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Reflection.TypeExtensions (4.6) + System.Resources.Extensions (4.6) + System.Memory (>= 4.5.3) + System.Resources.ResourceManager (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Resources.Writer (4.3) + System.Collections (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Runtime (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime.CompilerServices.Unsafe (4.6) + System.Runtime.Extensions (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime (>= 4.3.1) + System.Runtime.Handles (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Runtime.InteropServices (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Reflection (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices.WindowsRuntime (4.3) + System.Runtime (>= 4.3) + System.Runtime.Loader (4.3) + System.IO (>= 4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Numerics (4.3) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Serialization.Primitives (4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Security.AccessControl (4.6) + System.Security.Principal.Windows (>= 4.6) + System.Security.Cryptography.Algorithms (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + System.Collections (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Runtime.Numerics (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.Cng (4.6) + System.Security.Cryptography.Csp (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.IO (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Security.Cryptography.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Collections (>= 4.3) + System.Collections.Concurrent (>= 4.3) + System.Linq (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.OpenSsl (4.6) + System.Security.Cryptography.Primitives (4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Security.Cryptography.ProtectedData (4.6) + System.Memory (>= 4.5.3) + System.Security.Cryptography.X509Certificates (4.3.2) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System (>= 4.3) + runtime.native.System.Net.Http (>= 4.3) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.Globalization.Calendars (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Runtime.Numerics (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Cng (>= 4.3) + System.Security.Cryptography.Csp (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.OpenSsl (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Security.Principal.Windows (4.6) + System.Text.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding.CodePages (4.6) + System.Runtime.CompilerServices.Unsafe (>= 4.6) + System.Text.Encoding.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.RegularExpressions (4.3.1) + System.Collections (>= 4.3) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3.1) + System.Runtime.Extensions (>= 4.3.1) + System.Threading (>= 4.3) + System.Threading (4.3) + System.Runtime (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Overlapped (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Threading.Tasks (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Threading.Tasks.Dataflow (4.10) + System.Threading.Tasks.Extensions (4.5.3) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) + System.Threading.Thread (4.3) + System.Runtime (>= 4.3) + System.Threading.ThreadPool (4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Xml.ReaderWriter (4.3.1) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.Encoding.Extensions (>= 4.3) + System.Text.RegularExpressions (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Tasks.Extensions (>= 4.3) + System.Xml.XDocument (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tools (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XmlDocument (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XPath (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XPath.XDocument (4.3) + System.Diagnostics.Debug (>= 4.3) + System.Linq (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XDocument (>= 4.3) + System.Xml.XPath (>= 4.3) + System.Xml.XPath.XmlDocument (4.3) + System.Collections (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XmlDocument (>= 4.3) + System.Xml.XPath (>= 4.3) + +GROUP generate +STORAGE: NONE +RESTRICTION: == netstandard2.0 +NUGET + remote: https://api.nuget.org/v3/index.json + Fake.Core (5.16) + Fake.Core.Context (5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.Environment (5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.FakeVar (5.18.3) + Fake.Core.Context (>= 5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.String (5.18.3) + FSharp.Core (>= 4.7) + Fake.Core.Trace (5.18.3) + Fake.Core.Environment (>= 5.18.3) + Fake.Core.FakeVar (>= 5.18.3) + FSharp.Core (>= 4.7) + Fake.IO.FileSystem (5.18.3) + Fake.Core.String (>= 5.18.3) + FSharp.Core (>= 4.7) + System.Diagnostics.FileVersionInfo (>= 4.3) + System.IO.FileSystem.Watcher (>= 4.3) FSharp.Compiler.Service (27.0.1) FSharp.Core (>= 4.5.2) System.Collections.Immutable (>= 1.5) + System.Diagnostics.Process (>= 4.1) + System.Diagnostics.TraceSource (>= 4.0) + System.Reflection.Emit (>= 4.3) System.Reflection.Metadata (>= 1.6) - System.ValueTuple (>= 4.4) - FSharp.Core (4.6.2) - FSharp.Formatting (3.1) + System.Reflection.TypeExtensions (>= 4.3) + System.Runtime.Loader (>= 4.0) + System.Security.Cryptography.Algorithms (>= 4.3) + FSharp.Core (4.7) + FSharp.Literate (3.1) FSharp.Compiler.Service (>= 27.0.1 < 28.0) - Microsoft.AspNet.Razor (>= 3.2.7 < 4.0) System.ValueTuple (>= 4.5 < 5.0) - Microsoft.AspNet.Razor (3.2.7) - System.Collections.Immutable (1.5) - System.Reflection.Metadata (1.6) - System.Collections.Immutable (>= 1.5) + Microsoft.NETCore.Platforms (3.0) + Microsoft.NETCore.Targets (3.0) + Microsoft.Win32.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + Microsoft.Win32.Registry (4.6) + System.Buffers (>= 4.5) + System.Memory (>= 4.5.3) + System.Security.AccessControl (>= 4.6) + System.Security.Principal.Windows (>= 4.6) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.native.System (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + runtime.native.System.Security.Cryptography.Apple (4.3.1) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) + runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + System.Buffers (4.5) + System.Collections (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Collections.Concurrent (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Collections.Immutable (1.6) + System.Memory (>= 4.5.3) + System.Diagnostics.Debug (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Diagnostics.FileVersionInfo (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Reflection.Metadata (>= 1.4.1) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Diagnostics.Process (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.Win32.Primitives (>= 4.3) + Microsoft.Win32.Registry (>= 4.3) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.Encoding.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Thread (>= 4.3) + System.Threading.ThreadPool (>= 4.3) + System.Diagnostics.TraceSource (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Diagnostics.Tracing (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Globalization (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.IO (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.FileSystem (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.FileSystem.Primitives (4.3) + System.Runtime (>= 4.3) + System.IO.FileSystem.Watcher (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.Win32.Primitives (>= 4.3) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Overlapped (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Thread (>= 4.3) + System.Linq (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Memory (4.5.3) + System.Buffers (>= 4.4) + System.Numerics.Vectors (>= 4.4) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) + System.Numerics.Vectors (4.5) + System.Reflection (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Emit (4.6) + System.Reflection.Emit.ILGeneration (>= 4.6) + System.Reflection.Emit.ILGeneration (4.6) + System.Reflection.Metadata (1.7) + System.Collections.Immutable (>= 1.6) + System.Reflection.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Reflection.TypeExtensions (4.6) + System.Resources.ResourceManager (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime.CompilerServices.Unsafe (4.6) + System.Runtime.Extensions (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime (>= 4.3.1) + System.Runtime.Handles (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Runtime.InteropServices (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Reflection (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.Loader (4.3) + System.IO (>= 4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Numerics (4.3) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Security.AccessControl (4.6) + System.Security.Principal.Windows (>= 4.6) + System.Security.Cryptography.Algorithms (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + System.Collections (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Runtime.Numerics (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Collections (>= 4.3) + System.Collections.Concurrent (>= 4.3) + System.Linq (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Security.Principal.Windows (4.6) + System.Text.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (4.3) + System.Runtime (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Overlapped (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Threading.Tasks (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Threading.Thread (4.3) + System.Runtime (>= 4.3) + System.Threading.ThreadPool (4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) System.ValueTuple (4.5) From 521a591fdbff09c17113719910502f213df99196 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Wed, 20 Nov 2019 14:59:13 -0800 Subject: [PATCH 35/51] Remove unnecessary bash script from fcs (#7887) --- fcs/cibuild.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 fcs/cibuild.sh diff --git a/fcs/cibuild.sh b/fcs/cibuild.sh deleted file mode 100755 index ddc49d8ff3..0000000000 --- a/fcs/cibuild.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -# note: expects to run from top directory -./mono/latest-mono-stable.sh -./fcs/build.sh NuGet From 917eb4f1f4f7a81bd65d533becdd52621a8b3743 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Thu, 21 Nov 2019 11:07:57 -0800 Subject: [PATCH 36/51] Pick correct dependencies when scripting on coreclr (#7889) * Pick correct dependencies when scripting on coreclr * Look in pack directory for references --- src/fsharp/CompileOps.fs | 6 +++++- src/fsharp/service/FSharpCheckerResults.fs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 8d06ce14f8..ab20bfcf13 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -2816,7 +2816,11 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) = let facades = Path.Combine(frameworkRootVersion, "Facades") if Directory.Exists facades then yield facades - ] + match frameworkRefsPackDirectory with + | Some path when Directory.Exists(path) -> + yield path + | _ -> () + ] with e -> errorRecovery e range0; [] diff --git a/src/fsharp/service/FSharpCheckerResults.fs b/src/fsharp/service/FSharpCheckerResults.fs index c3990eb132..ab8ee3d216 100644 --- a/src/fsharp/service/FSharpCheckerResults.fs +++ b/src/fsharp/service/FSharpCheckerResults.fs @@ -2209,7 +2209,7 @@ type FsiInteractiveChecker(legacyReferenceResolver, let backgroundDiagnostics = [| |] let reduceMemoryUsage = ReduceMemoryFlag.Yes - let assumeDotNetFramework = true + let assumeDotNetFramework = tcConfig.primaryAssembly = PrimaryAssembly.Mscorlib let applyCompilerOptions tcConfigB = let fsiCompilerOptions = CompileOptions.GetCoreFsiCompilerOptions tcConfigB From 6c2221fb024415c00b4463e95103dae045372b20 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 21 Nov 2019 13:32:33 -0800 Subject: [PATCH 37/51] enable symbol completion for scripting (#7893) --- fcs/.paket/Paket.Restore.targets | 89 +++++++++---------- .../FSharpScript.fs | 20 +++++ .../CompletionTests.fs | 71 +++++++++++++++ ...ompiler.Private.Scripting.UnitTests.fsproj | 2 + .../FSharpScriptTests.fs | 10 --- .../TestHelpers.fs | 19 ++++ 6 files changed, 153 insertions(+), 58 deletions(-) create mode 100644 tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs create mode 100644 tests/FSharp.Compiler.Private.Scripting.UnitTests/TestHelpers.fs diff --git a/fcs/.paket/Paket.Restore.targets b/fcs/.paket/Paket.Restore.targets index dfc4aaec7a..a79555813d 100644 --- a/fcs/.paket/Paket.Restore.targets +++ b/fcs/.paket/Paket.Restore.targets @@ -20,7 +20,7 @@ proj assembly native - /Library/Frameworks/Mono.framework/Commands/mono + /Library/Frameworks/Mono.framework/Commands/mono mono @@ -28,74 +28,67 @@ $(PaketToolsPath)paket.bootstrapper.exe $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ - "$(PaketBootStrapperExePath)" + "$(PaketBootStrapperExePath)" $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + + + + true + true + True - - False - $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) - - + - - - - $(PaketRootPath)paket - $(PaketToolsPath)paket - + + + + + - - - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe + + + dotnet paket - - - - <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) - <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) - <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false - + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + $(PaketToolsPath)paket.exe + $(_PaketBootStrapperExeDir)paket.exe + paket.exe - - - - - + + $(PaketRootPath)paket + $(PaketToolsPath)paket + $(PaketToolsPath)paket - - - <_PaketCommand>dotnet paket - + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe - - - - $(PaketToolsPath)paket - $(PaketBootStrapperExeDir)paket + + $(PaketBootStrapperExeDir)paket.exe - - paket - + + paket - - <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" + dotnet "$(PaketExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + "$(PaketExePath)" + - + diff --git a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs index a7d24b3c9c..306c90194e 100644 --- a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs +++ b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs @@ -3,6 +3,9 @@ namespace FSharp.Compiler.Scripting open System +======= +open System.Threading +open FSharp.Compiler open FSharp.Compiler.Interactive.Shell type FSharpScript(?captureInput: bool, ?captureOutput: bool, ?additionalArgs: string[]) as this = @@ -48,6 +51,23 @@ type FSharpScript(?captureInput: bool, ?captureOutput: bool, ?additionalArgs: st | Choice1Of2 v -> Ok(v), errors | Choice2Of2 ex -> Error(ex), errors + /// Get the available completion symbols from the code at the specified location. + /// + /// The input text on which completions will be calculated + /// The 1-based line index + /// The 0-based column index + member __.GetCompletionSymbols(text: string, line: int, column: int) = + async { + let! parseResults, checkResults, _projectResults = fsi.ParseAndCheckInteraction(text) + let lineText = text.Split('\n').[line - 1] + let partialName = QuickParse.GetPartialLongNameEx(lineText, column - 1) + let! symbolUses = checkResults.GetDeclarationListSymbols(Some parseResults, line, lineText, partialName) + let symbols = symbolUses + |> List.concat + |> List.map (fun s -> s.Symbol) + return symbols + } + interface IDisposable with member __.Dispose() = if captureInput then diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs new file mode 100644 index 0000000000..0ee507a50f --- /dev/null +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.Scripting.UnitTests + +open System +open System.Threading.Tasks +open FSharp.Compiler.Scripting +open NUnit.Framework + +[] +type CompletionTests() = + + [] + member _.``Instance completions in the same submission``() = + async { + use script = new FSharpScript() + let lines = [ "let x = 1" + "x." ] + let! completions = script.GetCompletionSymbols(String.Join("\n", lines), 2, 2) + let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "CompareTo") + Assert.AreEqual(1, List.length matchingCompletions) + } |> Async.StartAsTask :> Task + + [] + member _.``Instance completions from a previous submission``() = + async { + use script = new FSharpScript() + script.Eval("let x = 1") |> ignoreValue + let! completions = script.GetCompletionSymbols("x.", 1, 2) + let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "CompareTo") + Assert.AreEqual(1, List.length matchingCompletions) + } |> Async.StartAsTask :> Task + + [] + member _.``Static member completions``() = + async { + use script = new FSharpScript() + let! completions = script.GetCompletionSymbols("System.String.", 1, 14) + let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "Join") + Assert.GreaterOrEqual(List.length matchingCompletions, 1) + } |> Async.StartAsTask :> Task + + [] + member _.``Type completions from namespace``() = + async { + use script = new FSharpScript() + let! completions = script.GetCompletionSymbols("System.", 1, 7) + let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "String") + Assert.GreaterOrEqual(List.length matchingCompletions, 1) + } |> Async.StartAsTask :> Task + + [] + member _.``Namespace completions``() = + async { + use script = new FSharpScript() + let! completions = script.GetCompletionSymbols("System.", 1, 7) + let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "Collections") + Assert.AreEqual(1, List.length matchingCompletions) + } |> Async.StartAsTask :> Task + + [] + member _.``Extension method completions``() = + async { + use script = new FSharpScript() + let lines = [ "open System.Linq" + "let list = new System.Collections.Generic.List()" + "list." ] + let! completions = script.GetCompletionSymbols(String.Join("\n", lines), 3, 5) + let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "Select") + Assert.AreEqual(1, List.length matchingCompletions) + } |> Async.StartAsTask :> Task diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj index 51beecf2af..7ecca98b7c 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj @@ -11,7 +11,9 @@ + + diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs index dfd66473f0..b2cf415920 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs @@ -7,21 +7,11 @@ open System.IO open System.Threading open FSharp.Compiler.Interactive.Shell open FSharp.Compiler.Scripting -open FSharp.Compiler.SourceCodeServices open NUnit.Framework [] type InteractiveTests() = - let getValue ((value: Result), (errors: FSharpErrorInfo[])) = - if errors.Length > 0 then - failwith <| sprintf "Evaluation returned %d errors:\r\n\t%s" errors.Length (String.Join("\r\n\t", errors)) - match value with - | Ok(value) -> value - | Error ex -> raise ex - - let ignoreValue = getValue >> ignore - [] member __.``Eval object value``() = use script = new FSharpScript() diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/TestHelpers.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/TestHelpers.fs new file mode 100644 index 0000000000..9238ff490a --- /dev/null +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/TestHelpers.fs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.Scripting.UnitTests + +open System +open FSharp.Compiler.Interactive.Shell +open FSharp.Compiler.SourceCodeServices + +[] +module TestHelpers = + + let getValue ((value: Result), (errors: FSharpErrorInfo[])) = + if errors.Length > 0 then + failwith <| sprintf "Evaluation returned %d errors:\r\n\t%s" errors.Length (String.Join("\r\n\t", errors)) + match value with + | Ok(value) -> value + | Error ex -> raise ex + + let ignoreValue = getValue >> ignore From cc161ad9e612c3273a50b392a1188f136d33180b Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Thu, 21 Nov 2019 20:59:11 -0800 Subject: [PATCH 38/51] Be very literal about the LangVersion string (#7895) * Be very literal about the LangVersion string * Skip timing test --- src/fsharp/LanguageFeatures.fs | 46 +++++++++---------- .../FSharpScriptTests.fs | 40 ++++++++++++++++ 2 files changed, 63 insertions(+), 23 deletions(-) diff --git a/src/fsharp/LanguageFeatures.fs b/src/fsharp/LanguageFeatures.fs index 8f6a873e20..0472582f1b 100644 --- a/src/fsharp/LanguageFeatures.fs +++ b/src/fsharp/LanguageFeatures.fs @@ -29,9 +29,8 @@ type LanguageFeature = | ImplicitYield = 7 | OpenStaticClasses = 8 - /// LanguageVersion management -type LanguageVersion (specifiedVersion) = +type LanguageVersion (specifiedVersionAsString) = // When we increment language versions here preview is higher than current RTM version static let languageVersion46 = 4.6m @@ -44,30 +43,34 @@ type LanguageVersion (specifiedVersion) = static let validOptions = [| "preview"; "default"; "latest"; "latestmajor" |] static let languageVersions = set [| languageVersion46; languageVersion47 |] - static let features = dict [| - // Add new LanguageVersions here ... - LanguageFeature.LanguageVersion46, languageVersion46 - LanguageFeature.LanguageVersion47, languageVersion47 - LanguageFeature.PreviewVersion, previewVersion - LanguageFeature.SingleUnderscorePattern, languageVersion47 - LanguageFeature.WildCardInForLoop, languageVersion47 - LanguageFeature.RelaxWhitespace, languageVersion47 - LanguageFeature.NameOf, previewVersion - LanguageFeature.ImplicitYield, languageVersion47 - LanguageFeature.OpenStaticClasses, previewVersion - |] + static let features = + dict [ + // Add new LanguageVersions here ... + LanguageFeature.LanguageVersion46, languageVersion46 + LanguageFeature.LanguageVersion47, languageVersion47 + LanguageFeature.PreviewVersion, previewVersion + + // F# 4.7 + LanguageFeature.SingleUnderscorePattern, languageVersion47 + LanguageFeature.WildCardInForLoop, languageVersion47 + LanguageFeature.RelaxWhitespace, languageVersion47 + LanguageFeature.ImplicitYield, languageVersion47 + + // Add new Language Features here... + LanguageFeature.NameOf, previewVersion + LanguageFeature.OpenStaticClasses, previewVersion + ] let specified = - match specifiedVersion with + match specifiedVersionAsString with | "?" -> 0m | "preview" -> previewVersion | "default" -> defaultVersion | "latest" -> latestVersion | "latestmajor" -> latestMajorVersion - | _ -> - match Decimal.TryParse(specifiedVersion) with - | true, v -> v - | _ -> 0m + | "4.6" -> languageVersion46 + | "4.7" -> languageVersion47 + | _ -> 0m /// Check if this feature is supported by the selected langversion member __.SupportsFeature featureId = @@ -79,10 +82,7 @@ type LanguageVersion (specifiedVersion) = member __.ContainsVersion version = match version with | "?" | "preview" | "default" | "latest" | "latestmajor" -> true - | _ -> - match Decimal.TryParse(specifiedVersion) with - | true, v -> languageVersions.Contains v - | _ -> false + | _ -> languageVersions.Contains specified /// Get a list of valid strings for help text member __.ValidOptions = validOptions diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs index b2cf415920..85a4c5f057 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs @@ -72,3 +72,43 @@ type InteractiveTests() = let _result, errors = script.Eval(sprintf "#r \"%s\"" testAssembly) Assert.AreEqual(1, errors.Length) Assert.False(foundAssemblyReference) + + [] + member _.``Compilation errors report a specific exception``() = + use script = new FSharpScript() + let result, _errors = script.Eval("abc") + match result with + | Ok(_) -> Assert.Fail("expected a failure") + | Error(ex) -> Assert.IsInstanceOf(ex) + + [] + member _.``Runtime exceptions are propagated``() = + use script = new FSharpScript() + let result, errors = script.Eval("System.IO.File.ReadAllText(\"not-a-file-path-that-can-be-found-on-disk.txt\")") + Assert.IsEmpty(errors) + match result with + | Ok(_) -> Assert.Fail("expected a failure") + | Error(ex) -> Assert.IsInstanceOf(ex) + + [] + member _.``Evaluation can be cancelled``() = + use script = new FSharpScript() + let sleepTime = 10000 + let mutable result = None + let mutable wasCancelled = false + use tokenSource = new CancellationTokenSource() + let eval () = + try + result <- Some(script.Eval(sprintf "System.Threading.Thread.Sleep(%d)\n2" sleepTime, tokenSource.Token)) + // if execution gets here (which it shouldn't), the value `2` will be returned + with + | :? OperationCanceledException -> wasCancelled <- true + let sw = Stopwatch.StartNew() + let evalTask = Task.Run(eval) + // cancel and wait for finish + tokenSource.Cancel() + evalTask.GetAwaiter().GetResult() + // ensure we cancelled and didn't complete the sleep or evaluation + Assert.True(wasCancelled) + Assert.LessOrEqual(sw.ElapsedMilliseconds, sleepTime) + Assert.AreEqual(None, result) From c0002cc0acac6097d7924c327338ff43f7893af1 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Fri, 22 Nov 2019 23:20:23 +0200 Subject: [PATCH 39/51] Don't try to print startupRange file contents in debug (#7898) --- src/fsharp/TcGlobals.fs | 2 +- src/fsharp/range.fs | 13 ++++++++++--- src/fsharp/range.fsi | 4 ++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/fsharp/TcGlobals.fs b/src/fsharp/TcGlobals.fs index 38b1e7d1d6..339e8b4b7f 100755 --- a/src/fsharp/TcGlobals.fs +++ b/src/fsharp/TcGlobals.fs @@ -26,7 +26,7 @@ open FSharp.Compiler.Features open Internal.Utilities -let internal DummyFileNameForRangesWithoutASpecificLocation = "startup" +let internal DummyFileNameForRangesWithoutASpecificLocation = startupFileName let private envRange = rangeN DummyFileNameForRangesWithoutASpecificLocation 0 /// Represents an intrinsic value from FSharp.Core known to the compiler diff --git a/src/fsharp/range.fs b/src/fsharp/range.fs index e9b44a6397..2de5498d55 100755 --- a/src/fsharp/range.fs +++ b/src/fsharp/range.fs @@ -200,6 +200,10 @@ let fileOfFileIndex idx = fileIndexTable.IndexToFile idx let mkPos l c = pos (l, c) +let unknownFileName = "unknown" +let startupFileName = "startup" +let commandLineArgsFileName = "commandLineArgs" + [] #if DEBUG [ {DebugCode}")>] @@ -249,6 +253,9 @@ type range(code1:int64, code2: int64) = #if DEBUG member r.DebugCode = + let name = r.FileName + if name = unknownFileName || name = startupFileName || name = commandLineArgsFileName then name else + try let endCol = r.EndColumn - 1 let startCol = r.StartColumn - 1 @@ -323,11 +330,11 @@ let rangeN filename line = mkRange filename (mkPos line 0) (mkPos line 0) let pos0 = mkPos 1 0 -let range0 = rangeN "unknown" 1 +let range0 = rangeN unknownFileName 1 -let rangeStartup = rangeN "startup" 1 +let rangeStartup = rangeN startupFileName 1 -let rangeCmdArgs = rangeN "commandLineArgs" 0 +let rangeCmdArgs = rangeN commandLineArgsFileName 0 let trimRangeToLine (r:range) = let startL, startC = r.StartLine, r.StartColumn diff --git a/src/fsharp/range.fsi b/src/fsharp/range.fsi index 6bc7ddf5b7..fdb63ec2a2 100755 --- a/src/fsharp/range.fsi +++ b/src/fsharp/range.fsi @@ -44,6 +44,10 @@ val mkPos : line:int -> column:int -> pos /// Ordering on positions val posOrder : IComparer +val unknownFileName: string +val startupFileName: string +val commandLineArgsFileName: string + /// Represents a range within a known file [] type range = From 8ac99f86bab24ec37fec576dc1eadb3566f69309 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Fri, 22 Nov 2019 15:37:39 -0800 Subject: [PATCH 40/51] change the type of completion item returned for scripts (#7899) --- .../FSharpScript.fs | 18 +++++----- .../CompletionTests.fs | 36 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs index 306c90194e..db672f5237 100644 --- a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs +++ b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs @@ -45,27 +45,27 @@ type FSharpScript(?captureInput: bool, ?captureOutput: bool, ?additionalArgs: st member __.ErrorProduced = errorProduced.Publish - member __.Eval(code: string) = - let ch, errors = fsi.EvalInteractionNonThrowing code + member __.Fsi = fsi + + member __.Eval(code: string, ?cancellationToken: CancellationToken) = + let cancellationToken = defaultArg cancellationToken CancellationToken.None + let ch, errors = fsi.EvalInteractionNonThrowing(code, cancellationToken) match ch with | Choice1Of2 v -> Ok(v), errors | Choice2Of2 ex -> Error(ex), errors - /// Get the available completion symbols from the code at the specified location. + /// Get the available completion items from the code at the specified location. /// /// The input text on which completions will be calculated /// The 1-based line index /// The 0-based column index - member __.GetCompletionSymbols(text: string, line: int, column: int) = + member __.GetCompletionItems(text: string, line: int, column: int) = async { let! parseResults, checkResults, _projectResults = fsi.ParseAndCheckInteraction(text) let lineText = text.Split('\n').[line - 1] let partialName = QuickParse.GetPartialLongNameEx(lineText, column - 1) - let! symbolUses = checkResults.GetDeclarationListSymbols(Some parseResults, line, lineText, partialName) - let symbols = symbolUses - |> List.concat - |> List.map (fun s -> s.Symbol) - return symbols + let! declarationListInfos = checkResults.GetDeclarationListInfo(Some parseResults, line, lineText, partialName) + return declarationListInfos.Items } interface IDisposable with diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs index 0ee507a50f..cd7da3c7d3 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs @@ -16,9 +16,9 @@ type CompletionTests() = use script = new FSharpScript() let lines = [ "let x = 1" "x." ] - let! completions = script.GetCompletionSymbols(String.Join("\n", lines), 2, 2) - let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "CompareTo") - Assert.AreEqual(1, List.length matchingCompletions) + let! completions = script.GetCompletionItems(String.Join("\n", lines), 2, 2) + let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "CompareTo") + Assert.AreEqual(1, matchingCompletions.Length) } |> Async.StartAsTask :> Task [] @@ -26,36 +26,36 @@ type CompletionTests() = async { use script = new FSharpScript() script.Eval("let x = 1") |> ignoreValue - let! completions = script.GetCompletionSymbols("x.", 1, 2) - let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "CompareTo") - Assert.AreEqual(1, List.length matchingCompletions) + let! completions = script.GetCompletionItems("x.", 1, 2) + let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "CompareTo") + Assert.AreEqual(1, matchingCompletions.Length) } |> Async.StartAsTask :> Task [] member _.``Static member completions``() = async { use script = new FSharpScript() - let! completions = script.GetCompletionSymbols("System.String.", 1, 14) - let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "Join") - Assert.GreaterOrEqual(List.length matchingCompletions, 1) + let! completions = script.GetCompletionItems("System.String.", 1, 14) + let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "Join") + Assert.GreaterOrEqual(matchingCompletions.Length, 1) } |> Async.StartAsTask :> Task [] member _.``Type completions from namespace``() = async { use script = new FSharpScript() - let! completions = script.GetCompletionSymbols("System.", 1, 7) - let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "String") - Assert.GreaterOrEqual(List.length matchingCompletions, 1) + let! completions = script.GetCompletionItems("System.", 1, 7) + let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "String") + Assert.GreaterOrEqual(matchingCompletions.Length, 1) } |> Async.StartAsTask :> Task [] member _.``Namespace completions``() = async { use script = new FSharpScript() - let! completions = script.GetCompletionSymbols("System.", 1, 7) - let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "Collections") - Assert.AreEqual(1, List.length matchingCompletions) + let! completions = script.GetCompletionItems("System.", 1, 7) + let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "Collections") + Assert.AreEqual(1, matchingCompletions.Length) } |> Async.StartAsTask :> Task [] @@ -65,7 +65,7 @@ type CompletionTests() = let lines = [ "open System.Linq" "let list = new System.Collections.Generic.List()" "list." ] - let! completions = script.GetCompletionSymbols(String.Join("\n", lines), 3, 5) - let matchingCompletions = completions |> List.filter (fun s -> s.DisplayName = "Select") - Assert.AreEqual(1, List.length matchingCompletions) + let! completions = script.GetCompletionItems(String.Join("\n", lines), 3, 5) + let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "Select") + Assert.AreEqual(1, matchingCompletions.Length) } |> Async.StartAsTask :> Task From 9f7f2e52d4237fd578e454dc3e029d95a8ea51c8 Mon Sep 17 00:00:00 2001 From: Yusuf Bham <10470872+5FiftySix6@users.noreply.github.com> Date: Thu, 28 Nov 2019 03:29:29 -0500 Subject: [PATCH 41/51] Capitalization (#7908) --- src/fsharp/FSharp.Core/reflect.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Core/reflect.fs b/src/fsharp/FSharp.Core/reflect.fs index f9e0a9daa8..0dd38fe225 100644 --- a/src/fsharp/FSharp.Core/reflect.fs +++ b/src/fsharp/FSharp.Core/reflect.fs @@ -353,7 +353,7 @@ module internal Impl = // // Historically the FSharp.Core reflection utilities get used on implementations of // System.Type that don't have functionality such as .IsEnum and .FullName fully implemented. - // This happens particularly over TypeBuilderInstantiation types in the ProvideTypes implementation of System.TYpe + // This happens particularly over TypeBuilderInstantiation types in the ProvideTypes implementation of System.Type // used in F# type providers. typ.IsGenericType && typ.Namespace = "System" && From 899d210faef797a05435057895ee8dafd6c36335 Mon Sep 17 00:00:00 2001 From: Fraser Waters Date: Thu, 28 Nov 2019 08:43:19 +0000 Subject: [PATCH 42/51] Fix LinkedSubSource leak in Async.Choice (#7892) * Fix LinkedSubSource leak in Async.Choice * ref -> mutable --- src/fsharp/FSharp.Core/async.fs | 57 ++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/src/fsharp/FSharp.Core/async.fs b/src/fsharp/FSharp.Core/async.fs index 1d4eb37ecc..ece4bbe44e 100644 --- a/src/fsharp/FSharp.Core/async.fs +++ b/src/fsharp/FSharp.Core/async.fs @@ -1293,35 +1293,54 @@ namespace Microsoft.FSharp.Control | Choice1Of2 computations -> ProtectedCode ctxt (fun ctxt -> let ctxtWithSync = DelimitSyncContext ctxt - let noneCount = ref 0 - let exnCount = ref 0 + let mutable count = computations.Length + let mutable noneCount = 0 + let mutable someOrExnCount = 0 let innerCts = new LinkedSubSource(ctxtWithSync.token) let scont (result: 'T option) = - match result with - | Some _ -> - if Interlocked.Increment exnCount = 1 then - innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont result) + let result = + match result with + | Some _ -> + if Interlocked.Increment &someOrExnCount = 1 then + innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont result) + else + fake() + + | None -> + if Interlocked.Increment &noneCount = computations.Length then + innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont None) + else + fake() + + if Interlocked.Decrement &count = 0 then + innerCts.Dispose() + + result + + let econt (exn: ExceptionDispatchInfo) = + let result = + if Interlocked.Increment &someOrExnCount = 1 then + innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.econt exn) else fake() - | None -> - if Interlocked.Increment noneCount = computations.Length then - innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont None) + if Interlocked.Decrement &count = 0 then + innerCts.Dispose() + + result + + let ccont (exn: OperationCanceledException) = + let result = + if Interlocked.Increment &someOrExnCount = 1 then + innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.ccont exn) else fake() - let econt (exn: ExceptionDispatchInfo) = - if Interlocked.Increment exnCount = 1 then - innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.econt exn) - else - fake() + if Interlocked.Decrement &count = 0 then + innerCts.Dispose() - let ccont (exn: OperationCanceledException) = - if Interlocked.Increment exnCount = 1 then - innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.ccont exn) - else - fake() + result for c in computations do QueueAsync innerCts.Token scont econt ccont c |> unfake From 0e3d4d126d9545261cbdb79cbc830566cad9ad01 Mon Sep 17 00:00:00 2001 From: Will Smith Date: Thu, 28 Nov 2019 05:45:20 -0800 Subject: [PATCH 43/51] Fixed Literal value in signature (#7901) * Fixed literal sig from breaking subsequent sigs * Added tests for literal sig * Fixed test * Fixed test name --- src/fsharp/pars.fsy | 2 +- tests/fsharp/typecheck/sigs/pos33.fs | 11 +++++++++++ tests/fsharp/typecheck/sigs/pos33.fsi | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 tests/fsharp/typecheck/sigs/pos33.fs create mode 100644 tests/fsharp/typecheck/sigs/pos33.fsi diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 8a4988935c..749c8dd5e3 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -788,7 +788,7 @@ optLiteralValueSpfn: | EQUALS declExpr { Some($2) } - | EQUALS OBLOCKBEGIN declExpr oblockend + | EQUALS OBLOCKBEGIN declExpr oblockend opt_ODECLEND { Some($3) } diff --git a/tests/fsharp/typecheck/sigs/pos33.fs b/tests/fsharp/typecheck/sigs/pos33.fs new file mode 100644 index 0000000000..716dfc54a3 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/pos33.fs @@ -0,0 +1,11 @@ +module Pos33 + +let x = 1 +[] +let y = 1 +let z = 1 +[] +let w = "w" +let q = "q" +[] +let u = "u" \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/pos33.fsi b/tests/fsharp/typecheck/sigs/pos33.fsi new file mode 100644 index 0000000000..3ba98f32d9 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/pos33.fsi @@ -0,0 +1,12 @@ +module Pos33 + +val x : int +[] +val y : int = 1 +val z : int +[] +val w : string = "w" +val q : string +[] +val u : string = + "u" \ No newline at end of file From f8b39c5c1f47dfddc42830f33c7cdcd0300ce723 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2019 11:04:00 -0800 Subject: [PATCH 44/51] [master] Update dependencies from dotnet/arcade (#7891) * Update dependencies from https://github.com/dotnet/arcade build 20191120.6 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19570.6 * Update dependencies from https://github.com/dotnet/arcade build 20191121.10 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19571.10 * Update dependencies from https://github.com/dotnet/arcade build 20191122.5 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19572.5 * Update dependencies from https://github.com/dotnet/arcade build 20191123.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19573.1 * Update dependencies from https://github.com/dotnet/arcade build 20191124.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19574.1 * Update dependencies from https://github.com/dotnet/arcade build 20191125.7 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19575.7 * Update dependencies from https://github.com/dotnet/arcade build 20191126.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19576.2 * don't publish symbols for tools and proto * Update dependencies from https://github.com/dotnet/arcade build 20191127.4 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19577.4 * Update dependencies from https://github.com/dotnet/arcade build 20191128.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19578.1 * Update dependencies from https://github.com/dotnet/arcade build 20191129.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19579.1 * Update dependencies from https://github.com/dotnet/arcade build 20191130.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19580.1 * Update dependencies from https://github.com/dotnet/arcade build 20191201.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19601.1 --- eng/Version.Details.xml | 4 +- eng/build-utils.ps1 | 4 +- eng/common/CheckSymbols.ps1 | 53 ++-- eng/common/SetupNugetSources.ps1 | 57 ++-- eng/common/SetupNugetSources.sh | 2 +- eng/common/SourceLinkValidation.ps1 | 269 +++++++++--------- eng/common/build.ps1 | 101 +++---- eng/common/darc-init.ps1 | 19 +- eng/common/darc-init.sh | 4 +- eng/common/dotnet-install.ps1 | 25 +- eng/common/dotnet-install.sh | 7 +- eng/common/enable-cross-org-publishing.ps1 | 6 +- eng/common/generate-graph-files.ps1 | 49 ++-- eng/common/init-tools-native.ps1 | 34 +-- eng/common/init-tools-native.sh | 5 +- eng/common/internal-feed-operations.ps1 | 28 +- eng/common/internal-feed-operations.sh | 4 +- eng/common/msbuild.ps1 | 5 +- eng/common/native/common-library.sh | 10 +- eng/common/native/install-cmake-test.sh | 4 +- eng/common/native/install-cmake.sh | 4 +- eng/common/native/install-tool.ps1 | 10 +- eng/common/pipeline-logging-functions.ps1 | 70 ++--- eng/common/pipeline-logging-functions.sh | 11 +- eng/common/post-build/darc-gather-drop.ps1 | 15 +- eng/common/post-build/nuget-validation.ps1 | 11 +- eng/common/post-build/post-build-utils.ps1 | 28 +- eng/common/post-build/promote-build.ps1 | 18 +- .../post-build/sourcelink-validation.ps1 | 42 +-- eng/common/post-build/symbols-validation.ps1 | 71 +++-- .../post-build/trigger-subscriptions.ps1 | 87 +++--- eng/common/sdk-task.ps1 | 19 +- eng/common/sdl/execute-all-sdl-tools.ps1 | 128 +++++---- eng/common/sdl/extract-artifact-packages.ps1 | 90 +++--- eng/common/sdl/init-sdl.ps1 | 38 ++- eng/common/sdl/push-gdn.ps1 | 92 +++--- eng/common/sdl/run-sdl.ps1 | 86 +++--- .../templates/post-build/common-variables.yml | 28 +- .../templates/post-build/post-build.yml | 34 ++- eng/common/tools.ps1 | 148 +++++----- eng/common/tools.sh | 13 +- global.json | 2 +- 42 files changed, 930 insertions(+), 805 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d3f59466db..8bd6f3d7de 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - c29c916a0d1736522cfd944fcc06ead33b5e27db + c0b56ff3569e3c7475070486c40543ea4c6f6dc7 diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1 index 772de110ca..000319af33 100644 --- a/eng/build-utils.ps1 +++ b/eng/build-utils.ps1 @@ -237,14 +237,14 @@ function Make-BootstrapBuild() { Create-Directory $dir # prepare FsLex and Fsyacc and AssemblyCheck - Run-MSBuild "$RepoRoot\src\buildtools\buildtools.proj" "/restore /t:Publish" -logFileName "BuildTools" -configuration $bootstrapConfiguration + Run-MSBuild "$RepoRoot\src\buildtools\buildtools.proj" "/restore /t:Publish /p:PublishWindowsPdb=false" -logFileName "BuildTools" -configuration $bootstrapConfiguration Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\fslex" -Force -Recurse Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\fsyacc" -Force -Recurse Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\AssemblyCheck" -Force -Recurse # prepare compiler $projectPath = "$RepoRoot\proto.proj" - Run-MSBuild $projectPath "/restore /t:Publish /p:TargetFramework=$bootstrapTfm;ProtoTargetFramework=$bootstrapTfm" -logFileName "Bootstrap" -configuration $bootstrapConfiguration + Run-MSBuild $projectPath "/restore /t:Publish /p:TargetFramework=$bootstrapTfm;ProtoTargetFramework=$bootstrapTfm /p:PublishWindowsPdb=false" -logFileName "Bootstrap" -configuration $bootstrapConfiguration Copy-Item "$ArtifactsDir\bin\fsc\$bootstrapConfiguration\$bootstrapTfm\publish" -Destination "$dir\fsc" -Force -Recurse Copy-Item "$ArtifactsDir\bin\fsi\$bootstrapConfiguration\$bootstrapTfm\publish" -Destination "$dir\fsi" -Force -Recurse diff --git a/eng/common/CheckSymbols.ps1 b/eng/common/CheckSymbols.ps1 index b8d84607b8..5442eff386 100644 --- a/eng/common/CheckSymbols.ps1 +++ b/eng/common/CheckSymbols.ps1 @@ -5,11 +5,12 @@ param( ) Add-Type -AssemblyName System.IO.Compression.FileSystem +. $PSScriptRoot\pipeline-logging-functions.ps1 function FirstMatchingSymbolDescriptionOrDefault { param( [string] $FullPath, # Full path to the module that has to be checked - [string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols + [string] $TargetServerParameter, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols [string] $SymbolsPath ) @@ -21,36 +22,36 @@ function FirstMatchingSymbolDescriptionOrDefault { # checking and which type of file was uploaded. # The file itself is returned - $SymbolPath = $SymbolsPath + "\" + $FileName + $SymbolPath = $SymbolsPath + '\' + $FileName # PDB file for the module - $PdbPath = $SymbolPath.Replace($Extension, ".pdb") + $PdbPath = $SymbolPath.Replace($Extension, '.pdb') # PDB file for R2R module (created by crossgen) - $NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb") + $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb') # DBG file for a .so library - $SODbg = $SymbolPath.Replace($Extension, ".so.dbg") + $SODbg = $SymbolPath.Replace($Extension, '.so.dbg') # DWARF file for a .dylib - $DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf") + $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf') - .\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null + .\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParameter $FullPath -o $SymbolsPath | Out-Null if (Test-Path $PdbPath) { - return "PDB" + return 'PDB' } elseif (Test-Path $NGenPdb) { - return "NGen PDB" + return 'NGen PDB' } elseif (Test-Path $SODbg) { - return "DBG for SO" + return 'DBG for SO' } elseif (Test-Path $DylibDwarf) { - return "Dwarf for Dylib" + return 'Dwarf for Dylib' } elseif (Test-Path $SymbolPath) { - return "Module" + return 'Module' } else { return $null @@ -68,7 +69,7 @@ function CountMissingSymbols { } # Extensions for which we'll look for symbols - $RelevantExtensions = @(".dll", ".exe", ".so", ".dylib") + $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib') # How many files are missing symbol information $MissingSymbols = 0 @@ -76,7 +77,7 @@ function CountMissingSymbols { $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) $PackageGuid = New-Guid $ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid - $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols" + $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols' [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath) @@ -86,31 +87,31 @@ function CountMissingSymbols { Get-ChildItem -Recurse $ExtractPath | Where-Object {$RelevantExtensions -contains $_.Extension} | ForEach-Object { - if ($_.FullName -Match "\\ref\\") { + if ($_.FullName -Match '\\ref\\') { Write-Host "`t Ignoring reference assembly file" $_.FullName return } - $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath - $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath + $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--microsoft-symbol-server' -SymbolsPath $SymbolsPath + $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--internal-server' -SymbolsPath $SymbolsPath Write-Host -NoNewLine "`t Checking file" $_.FullName "... " if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { - Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")" + Write-Host "Symbols found on MSDL (${$SymbolsOnMSDL}) and SymWeb (${$SymbolsOnSymWeb})" } else { $MissingSymbols++ if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { - Write-Host "No symbols found on MSDL or SymWeb!" + Write-Host 'No symbols found on MSDL or SymWeb!' } else { if ($SymbolsOnMSDL -eq $null) { - Write-Host "No symbols found on MSDL!" + Write-Host 'No symbols found on MSDL!' } else { - Write-Host "No symbols found on SymWeb!" + Write-Host 'No symbols found on SymWeb!' } } } @@ -129,26 +130,26 @@ function CheckSymbolsAvailable { Get-ChildItem "$InputPath\*.nupkg" | ForEach-Object { $FileName = $_.Name - + # These packages from Arcade-Services include some native libraries that # our current symbol uploader can't handle. Below is a workaround until # we get issue: https://github.com/dotnet/arcade/issues/2457 sorted. - if ($FileName -Match "Microsoft\.DotNet\.Darc\.") { + if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') { Write-Host "Ignoring Arcade-services file: $FileName" Write-Host return } - elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") { + elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') { Write-Host "Ignoring Arcade-services file: $FileName" Write-Host return } - + Write-Host "Validating $FileName " $Status = CountMissingSymbols "$InputPath\$FileName" if ($Status -ne 0) { - Write-Error "Missing symbols for $Status modules in the package $FileName" + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName" } Write-Host diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 2cb40c2947..6662e4bc1e 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -94,34 +94,41 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) { } } -if (!(Test-Path $ConfigFile -PathType Leaf)) { - Write-Host "Couldn't find the file NuGet config file: $ConfigFile" - ExitWithExitCode 1 -} +try { + if (!(Test-Path $ConfigFile -PathType Leaf)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile" + ExitWithExitCode 1 + } -# Load NuGet.config -$doc = New-Object System.Xml.XmlDocument -$filename = (Get-Item $ConfigFile).FullName -$doc.Load($filename) + # Load NuGet.config + $doc = New-Object System.Xml.XmlDocument + $filename = (Get-Item $ConfigFile).FullName + $doc.Load($filename) -# Get reference to or create one if none exist already -$sources = $doc.DocumentElement.SelectSingleNode("packageSources") -if ($sources -eq $null) { - $sources = $doc.CreateElement("packageSources") - $doc.DocumentElement.AppendChild($sources) | Out-Null -} + # Get reference to or create one if none exist already + $sources = $doc.DocumentElement.SelectSingleNode("packageSources") + if ($sources -eq $null) { + $sources = $doc.CreateElement("packageSources") + $doc.DocumentElement.AppendChild($sources) | Out-Null + } -# Looks for a node. Create it if none is found. -$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") -if ($creds -eq $null) { - $creds = $doc.CreateElement("packageSourceCredentials") - $doc.DocumentElement.AppendChild($creds) | Out-Null -} + # Looks for a node. Create it if none is found. + $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") + if ($creds -eq $null) { + $creds = $doc.CreateElement("packageSourceCredentials") + $doc.DocumentElement.AppendChild($creds) | Out-Null + } -# Insert credential nodes for Maestro's private feeds -InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password + # Insert credential nodes for Maestro's private feeds + InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password -AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password -AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password + AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password + AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password -$doc.Save($filename) + $doc.Save($filename) +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index 1264521317..55ad70e366 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -42,7 +42,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" . "$scriptroot/tools.sh" if [ ! -f "$ConfigFile" ]; then - echo "Couldn't find the file NuGet config file: $ConfigFile" + Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile" ExitWithExitCode 1 fi diff --git a/eng/common/SourceLinkValidation.ps1 b/eng/common/SourceLinkValidation.ps1 index cb2d28cb99..0e4c349e00 100644 --- a/eng/common/SourceLinkValidation.ps1 +++ b/eng/common/SourceLinkValidation.ps1 @@ -6,140 +6,15 @@ param( [Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages ) -# Cache/HashMap (File -> Exist flag) used to consult whether a file exist -# in the repository at a specific commit point. This is populated by inserting -# all files present in the repo at a specific commit point. -$global:RepoFiles = @{} - -$ValidatePackage = { - param( - [string] $PackagePath # Full path to a Symbols.NuGet package - ) - - # Ensure input file exist - if (!(Test-Path $PackagePath)) { - throw "Input file does not exist: $PackagePath" - } - - # Extensions for which we'll look for SourceLink information - # For now we'll only care about Portable & Embedded PDBs - $RelevantExtensions = @(".dll", ".exe", ".pdb") - - Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... " - - $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) - $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId - $FailedFiles = 0 - - Add-Type -AssemblyName System.IO.Compression.FileSystem - - [System.IO.Directory]::CreateDirectory($ExtractPath); - - $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) - - $zip.Entries | - Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | - ForEach-Object { - $FileName = $_.FullName - $Extension = [System.IO.Path]::GetExtension($_.Name) - $FakeName = -Join((New-Guid), $Extension) - $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName - - # We ignore resource DLLs - if ($FileName.EndsWith(".resources.dll")) { - return - } - - [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) - - $ValidateFile = { - param( - [string] $FullPath, # Full path to the module that has to be checked - [string] $RealPath, - [ref] $FailedFiles - ) - - # Makes easier to reference `sourcelink cli` - Push-Location $using:SourceLinkToolPath - - $SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String - - if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { - $NumFailedLinks = 0 - - # We only care about Http addresses - $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches - - if ($Matches.Count -ne 0) { - $Matches.Value | - ForEach-Object { - $Link = $_ - $CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/") - $FilePath = $Link.Replace($CommitUrl, "") - $Status = 200 - $Cache = $using:RepoFiles - - if ( !($Cache.ContainsKey($FilePath)) ) { - try { - $Uri = $Link -as [System.URI] - - # Only GitHub links are valid - if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") { - $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode - } - else { - $Status = 0 - } - } - catch { - $Status = 0 - } - } - - if ($Status -ne 200) { - if ($NumFailedLinks -eq 0) { - if ($FailedFiles.Value -eq 0) { - Write-Host - } - - Write-Host "`tFile $RealPath has broken links:" - } - - Write-Host "`t`tFailed to retrieve $Link" - - $NumFailedLinks++ - } - } - } - - if ($NumFailedLinks -ne 0) { - $FailedFiles.value++ - $global:LASTEXITCODE = 1 - } - } - - Pop-Location - } - - &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) - } - - $zip.Dispose() - - if ($FailedFiles -eq 0) { - Write-Host "Passed." - } -} - function ValidateSourceLinkLinks { if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) { - Write-Host "GHRepoName should be in the format /" + Write-PipelineTelemetryError -Category "Build" -Message "GHRepoName should be in the format /" $global:LASTEXITCODE = 1 return } if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) { - Write-Host "GHCommit should be a 40 chars hexadecimal string" + Write-PipelineTelemetryError -Category "Build" -Message "GHCommit should be a 40 chars hexadecimal string" $global:LASTEXITCODE = 1 return } @@ -160,7 +35,7 @@ function ValidateSourceLinkLinks { } } catch { - Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL" + Write-PipelineTelemetryError -Category "Build" -Message "Problems downloading the list of files from the repo. Url used: $RepoTreeURL" $global:LASTEXITCODE = 1 return } @@ -181,4 +56,140 @@ function ValidateSourceLinkLinks { } } -Measure-Command { ValidateSourceLinkLinks } +try { + . $PSScriptRoot\pipeline-logging-functions.ps1 + + # Cache/HashMap (File -> Exist flag) used to consult whether a file exist + # in the repository at a specific commit point. This is populated by inserting + # all files present in the repo at a specific commit point. + $global:RepoFiles = @{} + + $ValidatePackage = { + param( + [string] $PackagePath # Full path to a Symbols.NuGet package + ) + + # Ensure input file exist + if (!(Test-Path $PackagePath)) { + throw "Input file does not exist: $PackagePath" + } + + # Extensions for which we'll look for SourceLink information + # For now we'll only care about Portable & Embedded PDBs + $RelevantExtensions = @(".dll", ".exe", ".pdb") + + Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... " + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId + $FailedFiles = 0 + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + [System.IO.Directory]::CreateDirectory($ExtractPath); + + $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) + + $zip.Entries | + Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | + ForEach-Object { + $FileName = $_.FullName + $Extension = [System.IO.Path]::GetExtension($_.Name) + $FakeName = -Join((New-Guid), $Extension) + $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName + + # We ignore resource DLLs + if ($FileName.EndsWith(".resources.dll")) { + return + } + + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) + + $ValidateFile = { + param( + [string] $FullPath, # Full path to the module that has to be checked + [string] $RealPath, + [ref] $FailedFiles + ) + + # Makes easier to reference `sourcelink cli` + Push-Location $using:SourceLinkToolPath + + $SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String + + if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { + $NumFailedLinks = 0 + + # We only care about Http addresses + $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches + + if ($Matches.Count -ne 0) { + $Matches.Value | + ForEach-Object { + $Link = $_ + $CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/") + $FilePath = $Link.Replace($CommitUrl, "") + $Status = 200 + $Cache = $using:RepoFiles + + if ( !($Cache.ContainsKey($FilePath)) ) { + try { + $Uri = $Link -as [System.URI] + + # Only GitHub links are valid + if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") { + $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode + } + else { + $Status = 0 + } + } + catch { + $Status = 0 + } + } + + if ($Status -ne 200) { + if ($NumFailedLinks -eq 0) { + if ($FailedFiles.Value -eq 0) { + Write-Host + } + + Write-Host "`tFile $RealPath has broken links:" + } + + Write-Host "`t`tFailed to retrieve $Link" + + $NumFailedLinks++ + } + } + } + + if ($NumFailedLinks -ne 0) { + $FailedFiles.value++ + $global:LASTEXITCODE = 1 + } + } + + Pop-Location + } + + &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) + } + + $zip.Dispose() + + if ($FailedFiles -eq 0) { + Write-Host "Passed." + } + } + + Measure-Command { ValidateSourceLinkLinks } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'SourceLink' -Message $_ + ExitWithExitCode 1 +} + + diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index 55dff33204..0fd4d9c7f2 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -26,42 +26,40 @@ Param( [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties ) -. $PSScriptRoot\tools.ps1 - function Print-Usage() { - Write-Host "Common settings:" - Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)" - Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild" - Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" - Write-Host " -binaryLog Output binary log (short: -bl)" - Write-Host " -help Print help and exit" - Write-Host "" - - Write-Host "Actions:" - Write-Host " -restore Restore dependencies (short: -r)" - Write-Host " -build Build solution (short: -b)" - Write-Host " -rebuild Rebuild solution" - Write-Host " -deploy Deploy built VSIXes" - Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)" - Write-Host " -test Run all unit tests in the solution (short: -t)" - Write-Host " -integrationTest Run all integration tests in the solution" - Write-Host " -performanceTest Run all performance tests in the solution" - Write-Host " -pack Package build outputs into NuGet packages and Willow components" - Write-Host " -sign Sign build outputs" - Write-Host " -publish Publish artifacts (e.g. symbols)" - Write-Host " -clean Clean the solution" - Write-Host "" - - Write-Host "Advanced settings:" - Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)" - Write-Host " -ci Set when running on CI server" - Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build" - Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" - Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." - Write-Host "" - - Write-Host "Command line arguments not listed above are passed thru to msbuild." - Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)." + Write-Host "Common settings:" + Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)" + Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild" + Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" + Write-Host " -binaryLog Output binary log (short: -bl)" + Write-Host " -help Print help and exit" + Write-Host "" + + Write-Host "Actions:" + Write-Host " -restore Restore dependencies (short: -r)" + Write-Host " -build Build solution (short: -b)" + Write-Host " -rebuild Rebuild solution" + Write-Host " -deploy Deploy built VSIXes" + Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)" + Write-Host " -test Run all unit tests in the solution (short: -t)" + Write-Host " -integrationTest Run all integration tests in the solution" + Write-Host " -performanceTest Run all performance tests in the solution" + Write-Host " -pack Package build outputs into NuGet packages and Willow components" + Write-Host " -sign Sign build outputs" + Write-Host " -publish Publish artifacts (e.g. symbols)" + Write-Host " -clean Clean the solution" + Write-Host "" + + Write-Host "Advanced settings:" + Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)" + Write-Host " -ci Set when running on CI server" + Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build" + Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" + Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." + Write-Host "" + + Write-Host "Command line arguments not listed above are passed thru to msbuild." + Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)." } function InitializeCustomToolset { @@ -69,7 +67,7 @@ function InitializeCustomToolset { return } - $script = Join-Path $EngRoot "restore-toolset.ps1" + $script = Join-Path $EngRoot 'restore-toolset.ps1' if (Test-Path $script) { . $script @@ -80,8 +78,8 @@ function Build { $toolsetBuildProj = InitializeToolset InitializeCustomToolset - $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" } - $platformArg = if ($platform) { "/p:Platform=$platform" } else { "" } + $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' } + $platformArg = if ($platform) { "/p:Platform=$platform" } else { '' } if ($projects) { # Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons. @@ -114,16 +112,23 @@ function Build { @properties } -if ($clean) { - if(Test-Path $ArtifactsDir) { - Remove-Item -Recurse -Force $ArtifactsDir - Write-Host "Artifacts directory deleted." - } - exit 0 -} - try { - if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) { + . $PSScriptRoot\tools.ps1 + + if ($clean) { + if (Test-Path $ArtifactsDir) { + Remove-Item -Recurse -Force $ArtifactsDir + Write-Host 'Artifacts directory deleted.' + } + exit 0 + } + + if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message 'Eng/common/tools.ps1 returned a non-zero exit code.' + ExitWithExitCode $LastExitCode + } + + if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) { Print-Usage exit 0 } @@ -141,7 +146,7 @@ try { } catch { Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_ + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 index 5d7eaa5f94..fc2190365f 100644 --- a/eng/common/darc-init.ps1 +++ b/eng/common/darc-init.ps1 @@ -1,14 +1,14 @@ param ( $darcVersion = $null, - $versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16", - $verbosity = "m", + $versionEndpoint = 'https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16', + $verbosity = 'minimal', $toolpath = $null ) . $PSScriptRoot\tools.ps1 function InstallDarcCli ($darcVersion) { - $darcCliPackageName = "microsoft.dotnet.darc" + $darcCliPackageName = 'microsoft.dotnet.darc' $dotnetRoot = InitializeDotNetCli -install:$true $dotnet = "$dotnetRoot\dotnet.exe" @@ -27,12 +27,19 @@ function InstallDarcCli ($darcVersion) { $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' Write-Host "Installing Darc CLI version $darcVersion..." - Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed." + Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' if (-not $toolpath) { & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g }else { - & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath" + & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath" } } -InstallDarcCli $darcVersion +try { + InstallDarcCli $darcVersion +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Darc' -Message $_ + ExitWithExitCode 1 +} \ No newline at end of file diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index 82b2b57677..d981d7bbf3 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -2,8 +2,8 @@ source="${BASH_SOURCE[0]}" darcVersion='' -versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16" -verbosity=m +versionEndpoint='https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16' +verbosity='minimal' while [[ $# > 0 ]]; do opt="$(echo "$1" | awk '{print tolower($0)}')" diff --git a/eng/common/dotnet-install.ps1 b/eng/common/dotnet-install.ps1 index ec3e739fe8..811f0f717f 100644 --- a/eng/common/dotnet-install.ps1 +++ b/eng/common/dotnet-install.ps1 @@ -1,28 +1,27 @@ [CmdletBinding(PositionalBinding=$false)] Param( - [string] $verbosity = "minimal", - [string] $architecture = "", - [string] $version = "Latest", - [string] $runtime = "dotnet", - [string] $RuntimeSourceFeed = "", - [string] $RuntimeSourceFeedKey = "" + [string] $verbosity = 'minimal', + [string] $architecture = '', + [string] $version = 'Latest', + [string] $runtime = 'dotnet', + [string] $RuntimeSourceFeed = '', + [string] $RuntimeSourceFeedKey = '' ) . $PSScriptRoot\tools.ps1 -$dotnetRoot = Join-Path $RepoRoot ".dotnet" +$dotnetRoot = Join-Path $RepoRoot '.dotnet' $installdir = $dotnetRoot try { - if ($architecture -and $architecture.Trim() -eq "x86") { - $installdir = Join-Path $installdir "x86" + if ($architecture -and $architecture.Trim() -eq 'x86') { + $installdir = Join-Path $installdir 'x86' } - InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey -} + InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey +} catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh index 94ea343882..50bc5e475c 100755 --- a/eng/common/dotnet-install.sh +++ b/eng/common/dotnet-install.sh @@ -11,6 +11,8 @@ while [[ -h "$source" ]]; do done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" +. "$scriptroot/tools.sh" + version='Latest' architecture='' runtime='dotnet' @@ -40,7 +42,7 @@ while [[ $# > 0 ]]; do runtimeSourceFeedKey="$1" ;; *) - echo "Invalid argument: $1" + Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1" exit 1 ;; esac @@ -73,7 +75,6 @@ case $cpuname in ;; esac -. "$scriptroot/tools.sh" dotnetRoot="$repo_root/.dotnet" if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then dotnetRoot="$dotnetRoot/$architecture" @@ -81,7 +82,7 @@ fi InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { local exit_code=$? - echo "dotnet-install.sh failed (exit code '$exit_code')." >&2 + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2 ExitWithExitCode $exit_code } diff --git a/eng/common/enable-cross-org-publishing.ps1 b/eng/common/enable-cross-org-publishing.ps1 index eccbf9f1b1..efa26621db 100644 --- a/eng/common/enable-cross-org-publishing.ps1 +++ b/eng/common/enable-cross-org-publishing.ps1 @@ -2,5 +2,7 @@ param( [string] $token ) -Write-Host "##vso[task.setvariable variable=VSS_NUGET_ACCESSTOKEN]$token" -Write-Host "##vso[task.setvariable variable=VSS_NUGET_URI_PREFIXES]https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/" +. $PSScriptRoot\pipeline-logging-functions.ps1 + +Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token +Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' diff --git a/eng/common/generate-graph-files.ps1 b/eng/common/generate-graph-files.ps1 index b056e4c1ac..7ad26afa69 100644 --- a/eng/common/generate-graph-files.ps1 +++ b/eng/common/generate-graph-files.ps1 @@ -9,33 +9,33 @@ Param( # toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies ) -$ErrorActionPreference = "Stop" -. $PSScriptRoot\tools.ps1 - -Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1") - function CheckExitCode ([string]$stage) { $exitCode = $LASTEXITCODE if ($exitCode -ne 0) { - Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..." + Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..." ExitWithExitCode $exitCode } } try { + $ErrorActionPreference = 'Stop' + . $PSScriptRoot\tools.ps1 + + Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') + Push-Location $PSScriptRoot - Write-Host "Installing darc..." + Write-Host 'Installing darc...' . .\darc-init.ps1 -darcVersion $darcVersion - CheckExitCode "Running darc-init" + CheckExitCode 'Running darc-init' - $engCommonBaseDir = Join-Path $PSScriptRoot "native\" + $engCommonBaseDir = Join-Path $PSScriptRoot 'native\' $graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory - $nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external" - $installBin = Join-Path $graphvizInstallDir "bin" + $nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external' + $installBin = Join-Path $graphvizInstallDir 'bin' - Write-Host "Installing dot..." + Write-Host 'Installing dot...' .\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose $darcExe = "$env:USERPROFILE\.dotnet\tools" @@ -51,37 +51,36 @@ try { $graphVizImageFilePath = "$outputFolder\graph.png" $normalGraphFilePath = "$outputFolder\graph-full.txt" $flatGraphFilePath = "$outputFolder\graph-flat.txt" - $baseOptions = @( "--github-pat", "$gitHubPat", "--azdev-pat", "$azdoPat", "--password", "$barToken" ) + $baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" ) if ($includeToolset) { - Write-Host "Toolsets will be included in the graph..." - $baseOptions += @( "--include-toolset" ) + Write-Host 'Toolsets will be included in the graph...' + $baseOptions += @( '--include-toolset' ) } - Write-Host "Generating standard dependency graph..." + Write-Host 'Generating standard dependency graph...' & "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath - CheckExitCode "Generating normal dependency graph" + CheckExitCode 'Generating normal dependency graph' - Write-Host "Generating flat dependency graph and graphviz file..." + Write-Host 'Generating flat dependency graph and graphviz file...' & "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath - CheckExitCode "Generating flat and graphviz dependency graph" + CheckExitCode 'Generating flat and graphviz dependency graph' Write-Host "Generating graph image $graphVizFilePath" $dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe" & "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath" - CheckExitCode "Generating graphviz image" + CheckExitCode 'Generating graphviz image' Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!" } catch { if (!$includeToolset) { - Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow - Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow + Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow + Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow } - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Arcade' -Message $_ ExitWithExitCode 1 } finally { - Pop-Location + Pop-Location } \ No newline at end of file diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index 0fc0503ab9..f4409f0835 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -35,7 +35,7 @@ File path to global.json file #> [CmdletBinding(PositionalBinding=$false)] Param ( - [string] $BaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external", + [string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external', [string] $InstallDirectory, [switch] $Clean = $False, [switch] $Force = $False, @@ -45,26 +45,27 @@ Param ( ) if (!$GlobalJsonFile) { - $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json" + $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json' } Set-StrictMode -version 2.0 -$ErrorActionPreference="Stop" +$ErrorActionPreference='Stop' -Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1") +. $PSScriptRoot\pipeline-logging-functions.ps1 +Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') try { # Define verbose switch if undefined - $Verbose = $VerbosePreference -Eq "Continue" + $Verbose = $VerbosePreference -Eq 'Continue' - $EngCommonBaseDir = Join-Path $PSScriptRoot "native\" + $EngCommonBaseDir = Join-Path $PSScriptRoot 'native\' $NativeBaseDir = $InstallDirectory if (!$NativeBaseDir) { $NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory } $Env:CommonLibrary_NativeInstallDir = $NativeBaseDir - $InstallBin = Join-Path $NativeBaseDir "bin" - $InstallerPath = Join-Path $EngCommonBaseDir "install-tool.ps1" + $InstallBin = Join-Path $NativeBaseDir 'bin' + $InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1' # Process tools list Write-Host "Processing $GlobalJsonFile" @@ -74,7 +75,7 @@ try { } $NativeTools = Get-Content($GlobalJsonFile) -Raw | ConvertFrom-Json | - Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue + Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue if ($NativeTools) { $NativeTools.PSObject.Properties | ForEach-Object { $ToolName = $_.Name @@ -112,18 +113,19 @@ try { } $toolInstallationFailure = $true } else { - Write-Error $errMsg + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $errMsg exit 1 } } } if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) { + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools bootstrap failed' exit 1 } } else { - Write-Host "No native tools defined in global.json" + Write-Host 'No native tools defined in global.json' exit 0 } @@ -131,18 +133,18 @@ try { exit 0 } if (Test-Path $InstallBin) { - Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin) + Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin) Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)" return $InstallBin } else { - Write-Error "Native tools install directory does not exist, installation failed" + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed' exit 1 } exit 0 } catch { - Write-Host $_ - Write-Host $_.Exception - exit 1 + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_ + ExitWithExitCode 1 } diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh index 4dafaaca13..dbd7cbfdf6 100755 --- a/eng/common/init-tools-native.sh +++ b/eng/common/init-tools-native.sh @@ -12,6 +12,7 @@ retry_wait_time_seconds=30 global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json" declare -A native_assets +. $scriptroot/pipeline-logging-functions.sh . $scriptroot/native/common-library.sh while (($# > 0)); do @@ -120,7 +121,7 @@ else $installer_command if [[ $? != 0 ]]; then - echo "Execution Failed" >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed" exit 1 fi done @@ -134,7 +135,7 @@ if [[ -d $install_bin ]]; then echo "Native tools are available from $install_bin" echo "##vso[task.prependpath]$install_bin" else - echo "Native tools install directory does not exist, installation failed" >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed" exit 1 fi diff --git a/eng/common/internal-feed-operations.ps1 b/eng/common/internal-feed-operations.ps1 index 8b8bafd6a8..db0baac9a4 100644 --- a/eng/common/internal-feed-operations.ps1 +++ b/eng/common/internal-feed-operations.ps1 @@ -6,9 +6,8 @@ param( [switch] $IsFeedPrivate ) -$ErrorActionPreference = "Stop" +$ErrorActionPreference = 'Stop' Set-StrictMode -Version 2.0 - . $PSScriptRoot\tools.ps1 # Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed @@ -21,7 +20,7 @@ function SetupCredProvider { ) # Install the Cred Provider NuGet plugin - Write-Host "Setting up Cred Provider NuGet plugin in the agent..." + Write-Host 'Setting up Cred Provider NuGet plugin in the agent...' Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..." $url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1' @@ -29,18 +28,18 @@ function SetupCredProvider { Write-Host "Writing the contents of 'installcredprovider.ps1' locally..." Invoke-WebRequest $url -OutFile installcredprovider.ps1 - Write-Host "Installing plugin..." + Write-Host 'Installing plugin...' .\installcredprovider.ps1 -Force Write-Host "Deleting local copy of 'installcredprovider.ps1'..." Remove-Item .\installcredprovider.ps1 if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) { - Write-Host "CredProvider plugin was not installed correctly!" + Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!' ExitWithExitCode 1 } else { - Write-Host "CredProvider plugin was installed correctly!" + Write-Host 'CredProvider plugin was installed correctly!' } # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable @@ -49,7 +48,7 @@ function SetupCredProvider { $nugetConfigPath = "$RepoRoot\NuGet.config" if (-Not (Test-Path -Path $nugetConfigPath)) { - Write-Host "NuGet.config file not found in repo's root!" + Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!' ExitWithExitCode 1 } @@ -81,7 +80,7 @@ function SetupCredProvider { } else { - Write-Host "No internal endpoints found in NuGet.config" + Write-Host 'No internal endpoints found in NuGet.config' } } @@ -99,7 +98,7 @@ function InstallDotNetSdkAndRestoreArcade { & $dotnet restore $restoreProjPath - Write-Host "Arcade SDK restored!" + Write-Host 'Arcade SDK restored!' if (Test-Path -Path $restoreProjPath) { Remove-Item $restoreProjPath @@ -113,23 +112,22 @@ function InstallDotNetSdkAndRestoreArcade { try { Push-Location $PSScriptRoot - if ($Operation -like "setup") { + if ($Operation -like 'setup') { SetupCredProvider $AuthToken } - elseif ($Operation -like "install-restore") { + elseif ($Operation -like 'install-restore') { InstallDotNetSdkAndRestoreArcade } else { - Write-Host "Unknown operation '$Operation'!" + Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!" ExitWithExitCode 1 } } catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Arcade' -Message $_ ExitWithExitCode 1 } finally { - Pop-Location + Pop-Location } diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh index 1ff654d2ff..5941ea2833 100755 --- a/eng/common/internal-feed-operations.sh +++ b/eng/common/internal-feed-operations.sh @@ -30,7 +30,7 @@ function SetupCredProvider { rm installcredprovider.sh if [ ! -d "$HOME/.nuget/plugins" ]; then - echo "CredProvider plugin was not installed correctly!" + Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!' ExitWithExitCode 1 else echo "CredProvider plugin was installed correctly!" @@ -42,7 +42,7 @@ function SetupCredProvider { local nugetConfigPath="$repo_root/NuGet.config" if [ ! "$nugetConfigPath" ]; then - echo "NuGet.config file not found in repo's root!" + Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!" ExitWithExitCode 1 fi diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1 index b37fd3d5e9..c640123000 100644 --- a/eng/common/msbuild.ps1 +++ b/eng/common/msbuild.ps1 @@ -1,6 +1,6 @@ [CmdletBinding(PositionalBinding=$false)] Param( - [string] $verbosity = "minimal", + [string] $verbosity = 'minimal', [bool] $warnAsError = $true, [bool] $nodeReuse = $true, [switch] $ci, @@ -18,9 +18,8 @@ try { MSBuild @extraArgs } catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Build' -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/native/common-library.sh b/eng/common/native/common-library.sh index 271bddfac5..bf272dcf55 100755 --- a/eng/common/native/common-library.sh +++ b/eng/common/native/common-library.sh @@ -34,7 +34,7 @@ function ExpandZip { echo "'Force flag enabled, but '$output_directory' exists. Removing directory" rm -rf $output_directory if [[ $? != 0 ]]; then - echo Unable to remove '$output_directory'>&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'" return 1 fi fi @@ -45,7 +45,7 @@ function ExpandZip { echo "Extracting archive" tar -xf $zip_path -C $output_directory if [[ $? != 0 ]]; then - echo "Unable to extract '$zip_path'" >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'" return 1 fi @@ -117,7 +117,7 @@ function DownloadAndExtract { # Download file GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds if [[ $? != 0 ]]; then - echo "Failed to download '$uri' to '$temp_tool_path'." >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'." return 1 fi @@ -125,7 +125,7 @@ function DownloadAndExtract { echo "extracting from $temp_tool_path to $installDir" ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds if [[ $? != 0 ]]; then - echo "Failed to extract '$temp_tool_path' to '$installDir'." >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'." return 1 fi @@ -148,7 +148,7 @@ function NewScriptShim { fi if [[ ! -f $tool_file_path ]]; then - echo "Specified tool file path:'$tool_file_path' does not exist" >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist" return 1 fi diff --git a/eng/common/native/install-cmake-test.sh b/eng/common/native/install-cmake-test.sh index 53ddf4e686..12339a4076 100755 --- a/eng/common/native/install-cmake-test.sh +++ b/eng/common/native/install-cmake-test.sh @@ -101,7 +101,7 @@ fi DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds if [[ $? != 0 ]]; then - echo "Installation failed" >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed' exit 1 fi @@ -110,7 +110,7 @@ fi NewScriptShim $shim_path $tool_file_path true if [[ $? != 0 ]]; then - echo "Shim generation failed" >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed' exit 1 fi diff --git a/eng/common/native/install-cmake.sh b/eng/common/native/install-cmake.sh index 5f1a182fa9..18041be876 100755 --- a/eng/common/native/install-cmake.sh +++ b/eng/common/native/install-cmake.sh @@ -101,7 +101,7 @@ fi DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds if [[ $? != 0 ]]; then - echo "Installation failed" >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed' exit 1 fi @@ -110,7 +110,7 @@ fi NewScriptShim $shim_path $tool_file_path true if [[ $? != 0 ]]; then - echo "Shim generation failed" >&2 + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed' exit 1 fi diff --git a/eng/common/native/install-tool.ps1 b/eng/common/native/install-tool.ps1 index 635ab3fd41..ca180d03ba 100644 --- a/eng/common/native/install-tool.ps1 +++ b/eng/common/native/install-tool.ps1 @@ -46,6 +46,8 @@ Param ( [int] $RetryWaitTimeInSeconds = 30 ) +. $PSScriptRoot\..\pipeline-logging-functions.ps1 + # Import common library modules Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1") @@ -93,7 +95,7 @@ try { -Verbose:$Verbose if ($InstallStatus -Eq $False) { - Write-Error "Installation failed" + Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping" exit 1 } } @@ -117,14 +119,14 @@ try { -Verbose:$Verbose if ($GenerateShimStatus -Eq $False) { - Write-Error "Generate shim failed" + Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping" return 1 } exit 0 } catch { - Write-Host $_ - Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_ exit 1 } diff --git a/eng/common/pipeline-logging-functions.ps1 b/eng/common/pipeline-logging-functions.ps1 index af5f48aace..e065618588 100644 --- a/eng/common/pipeline-logging-functions.ps1 +++ b/eng/common/pipeline-logging-functions.ps1 @@ -12,6 +12,7 @@ $script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%" # TODO: BUG: Escape % ??? # TODO: Add test to verify don't need to escape "=". +# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set function Write-PipelineTelemetryError { [CmdletBinding()] param( @@ -25,49 +26,53 @@ function Write-PipelineTelemetryError { [string]$SourcePath, [string]$LineNumber, [string]$ColumnNumber, - [switch]$AsOutput) + [switch]$AsOutput, + [switch]$Force) - $PSBoundParameters.Remove("Category") | Out-Null + $PSBoundParameters.Remove('Category') | Out-Null $Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message" - $PSBoundParameters.Remove("Message") | Out-Null - $PSBoundParameters.Add("Message", $Message) - + $PSBoundParameters.Remove('Message') | Out-Null + $PSBoundParameters.Add('Message', $Message) Write-PipelineTaskError @PSBoundParameters } +# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set function Write-PipelineTaskError { [CmdletBinding()] param( - [Parameter(Mandatory = $true)] - [string]$Message, - [Parameter(Mandatory = $false)] - [string]$Type = 'error', - [string]$ErrCode, - [string]$SourcePath, - [string]$LineNumber, - [string]$ColumnNumber, - [switch]$AsOutput) - - if(!$ci) { + [Parameter(Mandatory = $true)] + [string]$Message, + [Parameter(Mandatory = $false)] + [string]$Type = 'error', + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput, + [switch]$Force + ) + + if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) { if($Type -eq 'error') { - Write-Host $Message -ForegroundColor Red - return + Write-Host $Message -ForegroundColor Red + return } elseif ($Type -eq 'warning') { - Write-Host $Message -ForegroundColor Yellow - return + Write-Host $Message -ForegroundColor Yellow + return } - } - - if(($Type -ne 'error') -and ($Type -ne 'warning')) { - Write-Host $Message - return - } - if(-not $PSBoundParameters.ContainsKey('Type')) { - $PSBoundParameters.Add('Type', 'error') - } - Write-LogIssue @PSBoundParameters + } + + if(($Type -ne 'error') -and ($Type -ne 'warning')) { + Write-Host $Message + return + } + $PSBoundParameters.Remove('Force') | Out-Null + if(-not $PSBoundParameters.ContainsKey('Type')) { + $PSBoundParameters.Add('Type', 'error') + } + Write-LogIssue @PSBoundParameters } function Write-PipelineSetVariable { @@ -80,7 +85,7 @@ function Write-PipelineTaskError { [switch]$AsOutput, [bool]$IsMultiJobVariable=$true) - if($ci) { + if(-Not (Test-Path variable:ci) -Or !$ci) { Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ 'variable' = $Name 'isSecret' = $Secret @@ -95,7 +100,8 @@ function Write-PipelineTaskError { [Parameter(Mandatory=$true)] [string]$Path, [switch]$AsOutput) - if($ci) { + + if(-Not (Test-Path variable:ci) -Or !$ci) { Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput } } diff --git a/eng/common/pipeline-logging-functions.sh b/eng/common/pipeline-logging-functions.sh index 1c560a5061..33c3f0d807 100755 --- a/eng/common/pipeline-logging-functions.sh +++ b/eng/common/pipeline-logging-functions.sh @@ -2,6 +2,7 @@ function Write-PipelineTelemetryError { local telemetry_category='' + local force=false local function_args=() local message='' while [[ $# -gt 0 ]]; do @@ -11,6 +12,9 @@ function Write-PipelineTelemetryError { telemetry_category=$2 shift ;; + -force|-f) + force=true + ;; -*) function_args+=("$1 $2") shift @@ -22,19 +26,22 @@ function Write-PipelineTelemetryError { shift done - if [[ "$ci" != true ]]; then + if [[ $force != true ]] && [[ "$ci" != true ]]; then echo "$message" >&2 return fi message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message" function_args+=("$message") + if [[ $force == true ]]; then + function_args+=("-force") + fi Write-PipelineTaskError $function_args } function Write-PipelineTaskError { - if [[ "$ci" != true ]]; then + if [[ $force != true ]] && [[ "$ci" != true ]]; then echo "$@" >&2 return fi diff --git a/eng/common/post-build/darc-gather-drop.ps1 b/eng/common/post-build/darc-gather-drop.ps1 index 89854d3c1c..81ff2a4377 100644 --- a/eng/common/post-build/darc-gather-drop.ps1 +++ b/eng/common/post-build/darc-gather-drop.ps1 @@ -2,20 +2,20 @@ param( [Parameter(Mandatory=$true)][int] $BarBuildId, # ID of the build which assets should be downloaded [Parameter(Mandatory=$true)][string] $DropLocation, # Where the assets should be downloaded to [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, # Token used to access Maestro API - [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com", # Maestro API URL - [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16" # Version of Maestro API to use + [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', # Maestro API URL + [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' # Version of Maestro API to use ) -. $PSScriptRoot\post-build-utils.ps1 - try { - Write-Host "Installing DARC ..." + . $PSScriptRoot\post-build-utils.ps1 + + Write-Host 'Installing DARC ...' . $PSScriptRoot\..\darc-init.ps1 $exitCode = $LASTEXITCODE if ($exitCode -ne 0) { - Write-PipelineTaskError "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..." + Write-PipelineTelemetryError -Category "Darc" -Message "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..." ExitWithExitCode $exitCode } @@ -38,8 +38,7 @@ try { --latest-location } catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category "Darc" -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/post-build/nuget-validation.ps1 b/eng/common/post-build/nuget-validation.ps1 index 78ed0d540f..3d6129d72b 100644 --- a/eng/common/post-build/nuget-validation.ps1 +++ b/eng/common/post-build/nuget-validation.ps1 @@ -6,20 +6,19 @@ param( [Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to ) -. $PSScriptRoot\post-build-utils.ps1 - try { - $url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1" + . $PSScriptRoot\post-build-utils.ps1 + + $url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1' - New-Item -ItemType "directory" -Path ${ToolDestinationPath} -Force + New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1 & ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg } catch { - Write-PipelineTaskError "NuGet package validation failed. Please check error logs." - Write-Host $_ Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/post-build/post-build-utils.ps1 b/eng/common/post-build/post-build-utils.ps1 index aa9a025c0b..7d49744795 100644 --- a/eng/common/post-build/post-build-utils.ps1 +++ b/eng/common/post-build/post-build-utils.ps1 @@ -1,17 +1,17 @@ # Most of the functions in this file require the variables `MaestroApiEndPoint`, # `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available. -$ErrorActionPreference = "Stop" +$ErrorActionPreference = 'Stop' Set-StrictMode -Version 2.0 # `tools.ps1` checks $ci to perform some actions. Since the post-build # scripts don't necessarily execute in the same agent that run the # build.ps1/sh script this variable isn't automatically set. $ci = $true -$disableConfigureToolsetImport = "true" +$disableConfigureToolsetImport = $true . $PSScriptRoot\..\tools.ps1 -function Create-MaestroApiRequestHeaders([string]$ContentType = "application/json") { +function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') { Validate-MaestroVars $headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' @@ -51,20 +51,20 @@ function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) { return $result } -function Trigger-Subscription([string]$SubscriptionId) { +function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) { Validate-MaestroVars $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken - $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion" - Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null + $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion" + Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null } -function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) { +function Trigger-Subscription([string]$SubscriptionId) { Validate-MaestroVars $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken - $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion" - Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null + $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion" + Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null } function Validate-MaestroVars { @@ -73,18 +73,18 @@ function Validate-MaestroVars { Get-Variable MaestroApiVersion -Scope Global | Out-Null Get-Variable MaestroApiAccessToken -Scope Global | Out-Null - if (!($MaestroApiEndPoint -Match "^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$")) { - Write-PipelineTaskError "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'" + if (!($MaestroApiEndPoint -Match '^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$')) { + Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'" ExitWithExitCode 1 } - if (!($MaestroApiVersion -Match "^[0-9]{4}-[0-9]{2}-[0-9]{2}$")) { - Write-PipelineTaskError "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'" + if (!($MaestroApiVersion -Match '^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) { + Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'" ExitWithExitCode 1 } } catch { - Write-PipelineTaskError "Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script." + Write-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.' Write-Host $_ ExitWithExitCode 1 } diff --git a/eng/common/post-build/promote-build.ps1 b/eng/common/post-build/promote-build.ps1 index e5ae85f251..ce45635fbd 100644 --- a/eng/common/post-build/promote-build.ps1 +++ b/eng/common/post-build/promote-build.ps1 @@ -2,18 +2,18 @@ param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $ChannelId, [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, - [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com", - [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16" + [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', + [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' ) -. $PSScriptRoot\post-build-utils.ps1 - try { + . $PSScriptRoot\post-build-utils.ps1 + # Check that the channel we are going to promote the build to exist $channelInfo = Get-MaestroChannel -ChannelId $ChannelId if (!$channelInfo) { - Write-Host "Channel with BAR ID $ChannelId was not found in BAR!" + Write-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!" ExitWithExitCode 1 } @@ -21,7 +21,7 @@ try { $buildInfo = Get-MaestroBuild -BuildId $BuildId if (!$buildInfo) { - Write-Host "Build with BAR ID $BuildId was not found in BAR!" + Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "Build with BAR ID $BuildId was not found in BAR!" ExitWithExitCode 1 } @@ -39,10 +39,10 @@ try { Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId - Write-Host "done." + Write-Host 'done.' } catch { - Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'" Write-Host $_ - Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'" + ExitWithExitCode 1 } diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 index bbfdacca13..cc9d059d04 100644 --- a/eng/common/post-build/sourcelink-validation.ps1 +++ b/eng/common/post-build/sourcelink-validation.ps1 @@ -34,9 +34,9 @@ $ValidatePackage = { # Extensions for which we'll look for SourceLink information # For now we'll only care about Portable & Embedded PDBs - $RelevantExtensions = @(".dll", ".exe", ".pdb") + $RelevantExtensions = @('.dll', '.exe', '.pdb') - Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... " + Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...' $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId @@ -58,7 +58,7 @@ $ValidatePackage = { $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName # We ignore resource DLLs - if ($FileName.EndsWith(".resources.dll")) { + if ($FileName.EndsWith('.resources.dll')) { return } @@ -96,7 +96,7 @@ $ValidatePackage = { $Uri = $Link -as [System.URI] # Only GitHub links are valid - if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match "github" -or $Uri.Host -match "githubusercontent")) { + if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) { $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode } else { @@ -143,19 +143,19 @@ $ValidatePackage = { } if ($FailedFiles -eq 0) { - Write-Host "Passed." + Write-Host 'Passed.' return 0 } else { - Write-Host "$PackagePath has broken SourceLink links." + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links." return 1 } } function ValidateSourceLinkLinks { - if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) { - if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) { - Write-PipelineTaskError "GHRepoName should be in the format / or -. '$GHRepoName'" + if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) { + if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format / or -. '$GHRepoName'" ExitWithExitCode 1 } else { @@ -163,14 +163,14 @@ function ValidateSourceLinkLinks { } } - if ($GHCommit -ne "" -and !($GHCommit -Match "^[0-9a-fA-F]{40}$")) { - Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'" + if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'" ExitWithExitCode 1 } - if ($GHRepoName -ne "" -and $GHCommit -ne "") { - $RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1") - $CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript") + if ($GHRepoName -ne '' -and $GHCommit -ne '') { + $RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1') + $CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript') try { # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash @@ -188,8 +188,8 @@ function ValidateSourceLinkLinks { Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching." } } - elseif ($GHRepoName -ne "" -or $GHCommit -ne "") { - Write-Host "For using the http caching mechanism both GHRepoName and GHCommit should be informed." + elseif ($GHRepoName -ne '' -or $GHCommit -ne '') { + Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.' } if (Test-Path $ExtractPath) { @@ -217,18 +217,18 @@ function ValidateSourceLinkLinks { $ValidationFailures = 0 foreach ($Job in @(Get-Job)) { $jobResult = Wait-Job -Id $Job.Id | Receive-Job - if ($jobResult -ne "0") { + if ($jobResult -ne '0') { $ValidationFailures++ } } if ($ValidationFailures -gt 0) { - Write-PipelineTaskError " $ValidationFailures package(s) failed validation." + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation." ExitWithExitCode 1 } } function InstallSourcelinkCli { - $sourcelinkCliPackageName = "sourcelink" + $sourcelinkCliPackageName = 'sourcelink' $dotnetRoot = InitializeDotNetCli -install:$true $dotnet = "$dotnetRoot\dotnet.exe" @@ -239,7 +239,7 @@ function InstallSourcelinkCli { } else { Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..." - Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed." + Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' & "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global } } @@ -250,8 +250,8 @@ try { ValidateSourceLinkLinks } catch { - Write-Host $_ Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'SourceLink' -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1 index 42f5e996bc..6e3e134172 100644 --- a/eng/common/post-build/symbols-validation.ps1 +++ b/eng/common/post-build/symbols-validation.ps1 @@ -4,10 +4,6 @@ param( [Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use ) -. $PSScriptRoot\post-build-utils.ps1 - -Add-Type -AssemblyName System.IO.Compression.FileSystem - function FirstMatchingSymbolDescriptionOrDefault { param( [string] $FullPath, # Full path to the module that has to be checked @@ -23,19 +19,19 @@ function FirstMatchingSymbolDescriptionOrDefault { # checking and which type of file was uploaded. # The file itself is returned - $SymbolPath = $SymbolsPath + "\" + $FileName + $SymbolPath = $SymbolsPath + '\' + $FileName # PDB file for the module - $PdbPath = $SymbolPath.Replace($Extension, ".pdb") + $PdbPath = $SymbolPath.Replace($Extension, '.pdb') # PDB file for R2R module (created by crossgen) - $NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb") + $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb') # DBG file for a .so library - $SODbg = $SymbolPath.Replace($Extension, ".so.dbg") + $SODbg = $SymbolPath.Replace($Extension, '.so.dbg') # DWARF file for a .dylib - $DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf") + $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf') $dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools" $dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe" @@ -43,19 +39,19 @@ function FirstMatchingSymbolDescriptionOrDefault { & $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null if (Test-Path $PdbPath) { - return "PDB" + return 'PDB' } elseif (Test-Path $NGenPdb) { - return "NGen PDB" + return 'NGen PDB' } elseif (Test-Path $SODbg) { - return "DBG for SO" + return 'DBG for SO' } elseif (Test-Path $DylibDwarf) { - return "Dwarf for Dylib" + return 'Dwarf for Dylib' } elseif (Test-Path $SymbolPath) { - return "Module" + return 'Module' } else { return $null @@ -74,7 +70,7 @@ function CountMissingSymbols { } # Extensions for which we'll look for symbols - $RelevantExtensions = @(".dll", ".exe", ".so", ".dylib") + $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib') # How many files are missing symbol information $MissingSymbols = 0 @@ -82,38 +78,38 @@ function CountMissingSymbols { $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) $PackageGuid = New-Guid $ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid - $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols" + $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols' [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath) Get-ChildItem -Recurse $ExtractPath | Where-Object {$RelevantExtensions -contains $_.Extension} | ForEach-Object { - if ($_.FullName -Match "\\ref\\") { - Write-Host "`t Ignoring reference assembly file" $_.FullName + if ($_.FullName -Match '\\ref\\') { + Write-Host "`t Ignoring reference assembly file " $_.FullName return } - $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath - $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath + $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--microsoft-symbol-server' $SymbolsPath + $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--internal-server' $SymbolsPath - Write-Host -NoNewLine "`t Checking file" $_.FullName "... " + Write-Host -NoNewLine "`t Checking file " $_.FullName "... " if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { - Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")" + Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)" } else { $MissingSymbols++ if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { - Write-Host "No symbols found on MSDL or SymWeb!" + Write-Host 'No symbols found on MSDL or SymWeb!' } else { if ($SymbolsOnMSDL -eq $null) { - Write-Host "No symbols found on MSDL!" + Write-Host 'No symbols found on MSDL!' } else { - Write-Host "No symbols found on SymWeb!" + Write-Host 'No symbols found on SymWeb!' } } } @@ -132,27 +128,27 @@ function CheckSymbolsAvailable { Get-ChildItem "$InputPath\*.nupkg" | ForEach-Object { $FileName = $_.Name - + # These packages from Arcade-Services include some native libraries that # our current symbol uploader can't handle. Below is a workaround until # we get issue: https://github.com/dotnet/arcade/issues/2457 sorted. - if ($FileName -Match "Microsoft\.DotNet\.Darc\.") { + if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') { Write-Host "Ignoring Arcade-services file: $FileName" Write-Host return } - elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") { + elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') { Write-Host "Ignoring Arcade-services file: $FileName" Write-Host return } - + Write-Host "Validating $FileName " $Status = CountMissingSymbols "$InputPath\$FileName" - + if ($Status -ne 0) { - Write-PipelineTaskError "Missing symbols for $Status modules in the package $FileName" - ExitWithExitCode $exitCode + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName" + ExitWithExitCode $exitCode } Write-Host @@ -160,7 +156,7 @@ function CheckSymbolsAvailable { } function InstallDotnetSymbol { - $dotnetSymbolPackageName = "dotnet-symbol" + $dotnetSymbolPackageName = 'dotnet-symbol' $dotnetRoot = InitializeDotNetCli -install:$true $dotnet = "$dotnetRoot\dotnet.exe" @@ -171,18 +167,21 @@ function InstallDotnetSymbol { } else { Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..." - Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed." + Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' & "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global } } try { + . $PSScriptRoot\post-build-utils.ps1 + + Add-Type -AssemblyName System.IO.Compression.FileSystem + InstallDotnetSymbol CheckSymbolsAvailable } catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1 index 926d5b4551..55dea518ac 100644 --- a/eng/common/post-build/trigger-subscriptions.ps1 +++ b/eng/common/post-build/trigger-subscriptions.ps1 @@ -2,56 +2,63 @@ param( [Parameter(Mandatory=$true)][string] $SourceRepo, [Parameter(Mandatory=$true)][int] $ChannelId, [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, - [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com", - [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16" + [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', + [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' ) -. $PSScriptRoot\post-build-utils.ps1 +try { + . $PSScriptRoot\post-build-utils.ps1 -# Get all the $SourceRepo subscriptions -$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '') -$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId + # Get all the $SourceRepo subscriptions + $normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '') + $subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId -if (!$subscriptions) { - Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'" - ExitWithExitCode 0 -} + if (!$subscriptions) { + Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'" + ExitWithExitCode 0 + } -$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string] -$failedTriggeredSubscription = $false + $subscriptionsToTrigger = New-Object System.Collections.Generic.List[string] + $failedTriggeredSubscription = $false -# Get all enabled subscriptions that need dependency flow on 'everyBuild' -foreach ($subscription in $subscriptions) { - if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) { - Write-Host "Should trigger this subscription: $subscription.id" - [void]$subscriptionsToTrigger.Add($subscription.id) + # Get all enabled subscriptions that need dependency flow on 'everyBuild' + foreach ($subscription in $subscriptions) { + if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) { + Write-Host "Should trigger this subscription: ${$subscription.id}" + [void]$subscriptionsToTrigger.Add($subscription.id) + } } -} -foreach ($subscriptionToTrigger in $subscriptionsToTrigger) { - try { - Write-Host "Triggering subscription '$subscriptionToTrigger'." - - Trigger-Subscription -SubscriptionId $subscriptionToTrigger - - Write-Host "done." - } - catch - { - Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'" - Write-Host $_ - Write-Host $_.ScriptStackTrace - $failedTriggeredSubscription = $true + foreach ($subscriptionToTrigger in $subscriptionsToTrigger) { + try { + Write-Host "Triggering subscription '$subscriptionToTrigger'." + + Trigger-Subscription -SubscriptionId $subscriptionToTrigger + + Write-Host 'done.' + } + catch + { + Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'" + Write-Host $_ + Write-Host $_.ScriptStackTrace + $failedTriggeredSubscription = $true + } } -} -if ($subscriptionsToTrigger.Count -eq 0) { - Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'." + if ($subscriptionsToTrigger.Count -eq 0) { + Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'." + } + elseif ($failedTriggeredSubscription) { + Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message 'At least one subscription failed to be triggered...' + ExitWithExitCode 1 + } + else { + Write-Host 'All subscriptions were triggered successfully!' + } } -elseif ($failedTriggeredSubscription) { - Write-Host "At least one subscription failed to be triggered..." +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_ ExitWithExitCode 1 } -else { - Write-Host "All subscriptions were triggered successfully!" -} diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index d0eec5163e..3872af59b9 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -1,8 +1,8 @@ [CmdletBinding(PositionalBinding=$false)] Param( - [string] $configuration = "Debug", + [string] $configuration = 'Debug', [string] $task, - [string] $verbosity = "minimal", + [string] $verbosity = 'minimal', [string] $msbuildEngine = $null, [switch] $restore, [switch] $prepareMachine, @@ -32,7 +32,7 @@ function Print-Usage() { } function Build([string]$target) { - $logSuffix = if ($target -eq "Execute") { "" } else { ".$target" } + $logSuffix = if ($target -eq 'Execute') { '' } else { ".$target" } $log = Join-Path $LogDir "$task$logSuffix.binlog" $outputPath = Join-Path $ToolsetDir "$task\\" @@ -46,33 +46,32 @@ function Build([string]$target) { } try { - if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) { + if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) { Print-Usage exit 0 } if ($task -eq "") { - Write-Host "Missing required parameter '-task '" -ForegroundColor Red + Write-PipelineTelemetryError -Category 'Build' -Message "Missing required parameter '-task '" -ForegroundColor Red Print-Usage ExitWithExitCode 1 } $taskProject = GetSdkTaskProject $task if (!(Test-Path $taskProject)) { - Write-Host "Unknown task: $task" -ForegroundColor Red + Write-PipelineTelemetryError -Category 'Build' -Message "Unknown task: $task" -ForegroundColor Red ExitWithExitCode 1 } if ($restore) { - Build "Restore" + Build 'Restore' } - Build "Execute" + Build 'Execute' } catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Build' -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1 index eb21321ba2..9db582f279 100644 --- a/eng/common/sdl/execute-all-sdl-tools.ps1 +++ b/eng/common/sdl/execute-all-sdl-tools.ps1 @@ -5,7 +5,7 @@ Param( [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade) [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located - [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located + [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault [string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code [string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts @@ -22,79 +22,89 @@ Param( [string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs. [string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. [string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. - [string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error + [string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") [string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") ) -$ErrorActionPreference = "Stop" -Set-StrictMode -Version 2.0 -$LASTEXITCODE = 0 +try { + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + $disableConfigureToolsetImport = $true + $LASTEXITCODE = 0 -#Replace repo names to the format of org/repo -if (!($Repository.contains('/'))) { - $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2'; -} -else{ - $RepoName = $Repository; -} + . $PSScriptRoot\..\tools.ps1 -if ($GuardianPackageName) { - $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path "tools" "guardian.cmd")) -} else { - $guardianCliLocation = $GuardianCliLocation -} + #Replace repo names to the format of org/repo + if (!($Repository.contains('/'))) { + $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2'; + } + else{ + $RepoName = $Repository; + } + + if ($GuardianPackageName) { + $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd')) + } else { + $guardianCliLocation = $GuardianCliLocation + } -$workingDirectory = (Split-Path $SourceDirectory -Parent) -$ValidPath = Test-Path $guardianCliLocation + $workingDirectory = (Split-Path $SourceDirectory -Parent) + $ValidPath = Test-Path $guardianCliLocation -if ($ValidPath -eq $False) -{ - Write-Host "Invalid Guardian CLI Location." - exit 1 -} + if ($ValidPath -eq $False) + { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.' + ExitWithExitCode 1 + } -& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel -$gdnFolder = Join-Path $workingDirectory ".gdn" + & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel + $gdnFolder = Join-Path $workingDirectory '.gdn' -if ($TsaOnboard) { - if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) { - Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" - & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel - if ($LASTEXITCODE -ne 0) { - Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE." - exit $LASTEXITCODE + if ($TsaOnboard) { + if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) { + Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" + & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } else { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.' + ExitWithExitCode 1 } - } else { - Write-Host "Could not onboard to TSA -- not all required values ($$TsaCodebaseName, $$TsaNotificationEmail, $$TsaCodebaseAdmin, $$TsaBugAreaPath) were specified." - exit 1 } -} -if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) { - & $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams -} -if ($SourceToolsList -and $SourceToolsList.Count -gt 0) { - & $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams -} + if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) { + & $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams + } + if ($SourceToolsList -and $SourceToolsList.Count -gt 0) { + & $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams + } -if ($UpdateBaseline) { - & (Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Update baseline" -} + if ($UpdateBaseline) { + & (Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Update baseline' + } -if ($TsaPublish) { - if ($TsaBranchName -and $BuildNumber) { - if (-not $TsaRepositoryName) { - $TsaRepositoryName = "$($Repository)-$($BranchName)" - } - Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" - & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel - if ($LASTEXITCODE -ne 0) { - Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE." - exit $LASTEXITCODE + if ($TsaPublish) { + if ($TsaBranchName -and $BuildNumber) { + if (-not $TsaRepositoryName) { + $TsaRepositoryName = "$($Repository)-$($BranchName)" + } + Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" + & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } else { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.' + ExitWithExitCode 1 } - } else { - Write-Host "Could not publish to TSA -- not all required values ($$TsaBranchName, $$BuildNumber) were specified." - exit 1 } } +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + exit 1 +} diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1 index d857ae2197..3c9bf10678 100644 --- a/eng/common/sdl/extract-artifact-packages.ps1 +++ b/eng/common/sdl/extract-artifact-packages.ps1 @@ -3,55 +3,16 @@ param( [Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted ) -$ErrorActionPreference = "Stop" +$ErrorActionPreference = 'Stop' Set-StrictMode -Version 2.0 # `tools.ps1` checks $ci to perform some actions. Since the post-build # scripts don't necessarily execute in the same agent that run the # build.ps1/sh script this variable isn't automatically set. $ci = $true -$disableConfigureToolsetImport = "true" -. $PSScriptRoot\..\tools.ps1 +$disableConfigureToolsetImport = $true -$ExtractPackage = { - param( - [string] $PackagePath # Full path to a NuGet package - ) - - if (!(Test-Path $PackagePath)) { - Write-PipelineTaskError "Input file does not exist: $PackagePath" - ExitWithExitCode 1 - } - - $RelevantExtensions = @(".dll", ".exe", ".pdb") - Write-Host -NoNewLine "Extracting" ([System.IO.Path]::GetFileName($PackagePath)) "... " - - $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) - $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId - - Add-Type -AssemblyName System.IO.Compression.FileSystem - - [System.IO.Directory]::CreateDirectory($ExtractPath); - - try { - $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) - - $zip.Entries | - Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | - ForEach-Object { - $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name - - [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) - } - } - catch { - - } - finally { - $zip.Dispose() - } - } - function ExtractArtifacts { +function ExtractArtifacts { if (!(Test-Path $InputPath)) { Write-Host "Input Path does not exist: $InputPath" ExitWithExitCode 0 @@ -68,11 +29,52 @@ $ExtractPackage = { } try { + . $PSScriptRoot\..\tools.ps1 + + $ExtractPackage = { + param( + [string] $PackagePath # Full path to a NuGet package + ) + + if (!(Test-Path $PackagePath)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath" + ExitWithExitCode 1 + } + + $RelevantExtensions = @('.dll', '.exe', '.pdb') + Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...' + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + [System.IO.Directory]::CreateDirectory($ExtractPath); + + try { + $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) + + $zip.Entries | + Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | + ForEach-Object { + $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name + + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) + } + } + catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 + } + finally { + $zip.Dispose() + } + } Measure-Command { ExtractArtifacts } } catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/sdl/init-sdl.ps1 b/eng/common/sdl/init-sdl.ps1 index c737eb0e71..285f1ccdb0 100644 --- a/eng/common/sdl/init-sdl.ps1 +++ b/eng/common/sdl/init-sdl.ps1 @@ -1,16 +1,19 @@ Param( [string] $GuardianCliLocation, [string] $Repository, - [string] $BranchName="master", + [string] $BranchName='master', [string] $WorkingDirectory, [string] $AzureDevOpsAccessToken, - [string] $GuardianLoggerLevel="Standard" + [string] $GuardianLoggerLevel='Standard' ) -$ErrorActionPreference = "Stop" +$ErrorActionPreference = 'Stop' Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true $LASTEXITCODE = 0 +. $PSScriptRoot\..\tools.ps1 + # Don't display the console progress UI - it's a huge perf hit $ProgressPreference = 'SilentlyContinue' @@ -21,11 +24,10 @@ $uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cf $zipFile = "$WorkingDirectory/gdn.zip" Add-Type -AssemblyName System.IO.Compression.FileSystem -$gdnFolder = (Join-Path $WorkingDirectory ".gdn") -Try -{ +$gdnFolder = (Join-Path $WorkingDirectory '.gdn') +try { # We try to download the zip; if the request fails (e.g. the file doesn't exist), we catch it and init guardian instead - Write-Host "Downloading gdn folder from internal config repostiory..." + Write-Host 'Downloading gdn folder from internal config repostiory...' Invoke-WebRequest -Headers @{ "Accept"="application/zip"; "Authorization"="Basic $encodedPat" } -Uri $uri -OutFile $zipFile if (Test-Path $gdnFolder) { # Remove the gdn folder if it exists (it shouldn't unless there's too much caching; this is just in case) @@ -33,19 +35,29 @@ Try } [System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory) Write-Host $gdnFolder -} Catch [System.Net.WebException] { + ExitWithExitCode 0 +} catch [System.Net.WebException] { } # Catch and ignore webexception +try { # if the folder does not exist, we'll do a guardian init and push it to the remote repository - Write-Host "Initializing Guardian..." + Write-Host 'Initializing Guardian...' Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel" & $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel if ($LASTEXITCODE -ne 0) { - Write-Error "Guardian init failed with exit code $LASTEXITCODE." + Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE } # We create the mainbaseline so it can be edited later Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline" & $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline if ($LASTEXITCODE -ne 0) { - Write-Error "Guardian baseline failed with exit code $LASTEXITCODE." + Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE } - & $(Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Initialize gdn folder" -} \ No newline at end of file + & $(Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Initialize gdn folder' + ExitWithExitCode 0 +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/sdl/push-gdn.ps1 b/eng/common/sdl/push-gdn.ps1 index 79c707d6d8..79d3d355c7 100644 --- a/eng/common/sdl/push-gdn.ps1 +++ b/eng/common/sdl/push-gdn.ps1 @@ -1,51 +1,65 @@ Param( [string] $Repository, - [string] $BranchName="master", + [string] $BranchName='master', [string] $GdnFolder, [string] $AzureDevOpsAccessToken, [string] $PushReason ) -$ErrorActionPreference = "Stop" +$ErrorActionPreference = 'Stop' Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true $LASTEXITCODE = 0 -# We create the temp directory where we'll store the sdl-config repository -$sdlDir = Join-Path $env:TEMP "sdl" -if (Test-Path $sdlDir) { - Remove-Item -Force -Recurse $sdlDir -} +try { + . $PSScriptRoot\..\tools.ps1 -Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir" -git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir -if ($LASTEXITCODE -ne 0) { - Write-Error "Git clone failed with exit code $LASTEXITCODE." -} -# We copy the .gdn folder from our local run into the git repository so it can be committed -$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) ".gdn" -if (Get-Command Robocopy) { - Robocopy /S $GdnFolder $sdlRepositoryFolder -} else { - rsync -r $GdnFolder $sdlRepositoryFolder -} -# cd to the sdl-config directory so we can run git there -Push-Location $sdlDir -# git add . --> git commit --> git push -Write-Host "git add ." -git add . -if ($LASTEXITCODE -ne 0) { - Write-Error "Git add failed with exit code $LASTEXITCODE." -} -Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`"" -git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName" -if ($LASTEXITCODE -ne 0) { - Write-Error "Git commit failed with exit code $LASTEXITCODE." -} -Write-Host "git push" -git push -if ($LASTEXITCODE -ne 0) { - Write-Error "Git push failed with exit code $LASTEXITCODE." -} + # We create the temp directory where we'll store the sdl-config repository + $sdlDir = Join-Path $env:TEMP 'sdl' + if (Test-Path $sdlDir) { + Remove-Item -Force -Recurse $sdlDir + } -# Return to the original directory -Pop-Location \ No newline at end of file + Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir" + git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git clone failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + # We copy the .gdn folder from our local run into the git repository so it can be committed + $sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) '.gdn' + if (Get-Command Robocopy) { + Robocopy /S $GdnFolder $sdlRepositoryFolder + } else { + rsync -r $GdnFolder $sdlRepositoryFolder + } + # cd to the sdl-config directory so we can run git there + Push-Location $sdlDir + # git add . --> git commit --> git push + Write-Host 'git add .' + git add . + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git add failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`"" + git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName" + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git commit failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + Write-Host 'git push' + git push + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git push failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + + # Return to the original directory + Pop-Location +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} \ No newline at end of file diff --git a/eng/common/sdl/run-sdl.ps1 b/eng/common/sdl/run-sdl.ps1 index 9bc25314ae..40a084f796 100644 --- a/eng/common/sdl/run-sdl.ps1 +++ b/eng/common/sdl/run-sdl.ps1 @@ -5,55 +5,65 @@ Param( [string] $GdnFolder, [string[]] $ToolsList, [string] $UpdateBaseline, - [string] $GuardianLoggerLevel="Standard", + [string] $GuardianLoggerLevel='Standard', [string[]] $CrScanAdditionalRunConfigParams, [string[]] $PoliCheckAdditionalRunConfigParams ) -$ErrorActionPreference = "Stop" +$ErrorActionPreference = 'Stop' Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true $LASTEXITCODE = 0 -# We store config files in the r directory of .gdn -Write-Host $ToolsList -$gdnConfigPath = Join-Path $GdnFolder "r" -$ValidPath = Test-Path $GuardianCliLocation +try { + . $PSScriptRoot\..\tools.ps1 -if ($ValidPath -eq $False) -{ - Write-Host "Invalid Guardian CLI Location." - exit 1 -} + # We store config files in the r directory of .gdn + Write-Host $ToolsList + $gdnConfigPath = Join-Path $GdnFolder 'r' + $ValidPath = Test-Path $GuardianCliLocation -$configParam = @("--config") - -foreach ($tool in $ToolsList) { - $gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig" - Write-Host $tool - # We have to manually configure tools that run on source to look at the source directory only - if ($tool -eq "credscan") { - Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})" - & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams}) - if ($LASTEXITCODE -ne 0) { - Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE." - exit $LASTEXITCODE - } + if ($ValidPath -eq $False) + { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location." + ExitWithExitCode 1 } - if ($tool -eq "policheck") { - Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})" - & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams}) - if ($LASTEXITCODE -ne 0) { - Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE." - exit $LASTEXITCODE + + $configParam = @('--config') + + foreach ($tool in $ToolsList) { + $gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig" + Write-Host $tool + # We have to manually configure tools that run on source to look at the source directory only + if ($tool -eq 'credscan') { + Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})" + & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams}) + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } + if ($tool -eq 'policheck') { + Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})" + & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams}) + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } } - } - $configParam+=$gdnConfigFile -} + $configParam+=$gdnConfigFile + } -Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam" -& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam -if ($LASTEXITCODE -ne 0) { - Write-Host "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE." - exit $LASTEXITCODE + Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam" + & $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } } +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} \ No newline at end of file diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index 56134ed44a..9505cf170f 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -4,15 +4,7 @@ variables: - group: DotNet-DotNetCli-Storage - group: DotNet-MSRC-Storage - group: Publish-Build-Assets - - # .NET Core 3.1 Dev - - name: PublicDevRelease_31_Channel_Id - value: 128 - - # .NET Core 5 Dev - - name: NetCore_5_Dev_Channel_Id - value: 131 - + # .NET Core 3.1 Dev - name: PublicDevRelease_31_Channel_Id value: 128 @@ -21,19 +13,19 @@ variables: - name: NetCore_5_Dev_Channel_Id value: 131 - # .NET Tools - Validation - - name: NetCore_Tools_Validation_Channel_Id + # .NET Eng - Validation + - name: Net_Eng_Validation_Channel_Id value: 9 - # .NET Tools - Latest - - name: NetCore_Tools_Latest_Channel_Id + # .NET Eng - Latest + - name: Net_Eng_Latest_Channel_Id value: 2 - # .NET 3 Tools - Validation - - name: NETCore_3_Tools_Validation_Channel_Id + # .NET 3 Eng - Validation + - name: NET_3_Eng_Validation_Channel_Id value: 390 - # .NET 3 Tools - Latest + # .NET 3 Eng - name: NetCore_3_Tools_Channel_Id value: 344 @@ -57,6 +49,10 @@ variables: - name: NetCore_31_Blazor_Features_Channel_Id value: 531 + # .NET Core Experimental + - name: NetCore_Experimental_Channel_Id + value: 562 + # Whether the build is internal or not - name: IsInternalBuild value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 5965cc2005..8a8d84f202 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -137,8 +137,8 @@ stages: dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_Tools_Latest_Publish' - channelName: '.NET Tools - Latest' + stageName: 'Net_Eng_Latest_Publish' + channelName: '.NET Eng - Latest' channelId: 2 transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' @@ -150,8 +150,8 @@ stages: dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'PVR_Publish' - channelName: '.NET Tools - Validation' + stageName: 'Net_Eng_Validation_Publish' + channelName: '.NET Eng - Validation' channelId: 9 transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' @@ -195,3 +195,29 @@ stages: transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NET_Internal_Tooling_Publishing' + channelName: '.NET Internal Tooling' + channelId: 551 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_Experimental_Publishing' + channelName: '.NET Core Experimental' + channelId: 562 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json' diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 42ca33ac33..d762c9f044 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -5,7 +5,7 @@ [bool]$ci = if (Test-Path variable:ci) { $ci } else { $false } # Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names. -[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { "Debug" } +[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { 'Debug' } # Set to true to output binary log from msbuild. Note that emitting binary log slows down the build. # Binary log must be enabled on CI. @@ -24,7 +24,7 @@ [bool]$restore = if (Test-Path variable:restore) { $restore } else { $true } # Adjusts msbuild verbosity level. -[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { "minimal" } +[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { 'minimal' } # Set to true to reuse msbuild nodes. Recommended to not reuse on CI. [bool]$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { !$ci } @@ -41,23 +41,23 @@ # Enable repos to use a particular version of the on-line dotnet-install scripts. # default URL: https://dot.net/v1/dotnet-install.ps1 -[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { "v1" } +[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' } # True to use global NuGet cache instead of restoring packages to repository-local directory. [bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci } # An array of names of processes to stop on script exit if prepareMachine is true. -$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @("msbuild", "dotnet", "vbcscompiler") } +$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @('msbuild', 'dotnet', 'vbcscompiler') } $disableConfigureToolsetImport = if (Test-Path variable:disableConfigureToolsetImport) { $disableConfigureToolsetImport } else { $null } set-strictmode -version 2.0 -$ErrorActionPreference = "Stop" +$ErrorActionPreference = 'Stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 function Create-Directory([string[]] $path) { if (!(Test-Path $path)) { - New-Item -path $path -force -itemType "Directory" | Out-Null + New-Item -path $path -force -itemType 'Directory' | Out-Null } } @@ -121,7 +121,7 @@ function InitializeDotNetCli([bool]$install) { # Find the first path on %PATH% that contains the dotnet.exe if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) { - $dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue + $dotnetCmd = Get-Command 'dotnet.exe' -ErrorAction SilentlyContinue if ($dotnetCmd -ne $null) { $env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent } @@ -134,13 +134,13 @@ function InitializeDotNetCli([bool]$install) { if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) { $dotnetRoot = $env:DOTNET_INSTALL_DIR } else { - $dotnetRoot = Join-Path $RepoRoot ".dotnet" + $dotnetRoot = Join-Path $RepoRoot '.dotnet' if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) { if ($install) { InstallDotNetSdk $dotnetRoot $dotnetSdkVersion } else { - Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'" + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'" ExitWithExitCode 1 } } @@ -163,7 +163,7 @@ function InitializeDotNetCli([bool]$install) { } function GetDotNetInstallScript([string] $dotnetRoot) { - $installScript = Join-Path $dotnetRoot "dotnet-install.ps1" + $installScript = Join-Path $dotnetRoot 'dotnet-install.ps1' if (!(Test-Path $installScript)) { Create-Directory $dotnetRoot $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit @@ -173,17 +173,17 @@ function GetDotNetInstallScript([string] $dotnetRoot) { return $installScript } -function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") { +function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') { InstallDotNet $dotnetRoot $version $architecture } function InstallDotNet([string] $dotnetRoot, [string] $version, - [string] $architecture = "", - [string] $runtime = "", + [string] $architecture = '', + [string] $runtime = '', [bool] $skipNonVersionedFiles = $false, - [string] $runtimeSourceFeed = "", - [string] $runtimeSourceFeedKey = "") { + [string] $runtimeSourceFeed = '', + [string] $runtimeSourceFeedKey = '') { $installScript = GetDotNetInstallScript $dotnetRoot $installParameters = @{ @@ -199,7 +199,7 @@ function InstallDotNet([string] $dotnetRoot, & $installScript @installParameters } catch { - Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from public location." # Only the runtime can be installed from a custom [private] location. if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) { @@ -215,7 +215,7 @@ function InstallDotNet([string] $dotnetRoot, & $installScript @installParameters } catch { - Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'." } } } @@ -238,16 +238,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = } if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } - $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { "15.9" } + $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { '15.9' } $vsMinVersion = [Version]::new($vsMinVersionStr) # Try msbuild command available in the environment. if ($env:VSINSTALLDIR -ne $null) { - $msbuildCmd = Get-Command "msbuild.exe" -ErrorAction SilentlyContinue + $msbuildCmd = Get-Command 'msbuild.exe' -ErrorAction SilentlyContinue if ($msbuildCmd -ne $null) { # Workaround for https://github.com/dotnet/roslyn/issues/35793 # Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+ - $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0]) + $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0]) if ($msbuildVersion -ge $vsMinVersion) { return $global:_MSBuildExe = $msbuildCmd.Path @@ -267,7 +267,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion } else { - if (Get-Member -InputObject $GlobalJson.tools -Name "xcopy-msbuild") { + if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') { $xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild' $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0] } else { @@ -277,7 +277,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install if ($vsInstallDir -eq $null) { - throw "Unable to find Visual Studio that has required version and components installed" + throw 'Unable to find Visual Studio that has required version and components installed' } } @@ -301,7 +301,7 @@ function InstallXCopyMSBuild([string]$packageVersion) { } function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { - $packageName = "RoslynTools.MSBuild" + $packageName = 'RoslynTools.MSBuild' $packageDir = Join-Path $ToolsDir "msbuild\$packageVersion" $packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg" @@ -317,7 +317,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { Unzip $packagePath $packageDir } - return Join-Path $packageDir "tools" + return Join-Path $packageDir 'tools' } # @@ -334,32 +334,32 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { # or $null if no instance meeting the requirements is found on the machine. # function LocateVisualStudio([object]$vsRequirements = $null){ - if (Get-Member -InputObject $GlobalJson.tools -Name "vswhere") { + if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') { $vswhereVersion = $GlobalJson.tools.vswhere } else { - $vswhereVersion = "2.5.2" + $vswhereVersion = '2.5.2' } $vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion" - $vsWhereExe = Join-Path $vsWhereDir "vswhere.exe" + $vsWhereExe = Join-Path $vsWhereDir 'vswhere.exe' if (!(Test-Path $vsWhereExe)) { Create-Directory $vsWhereDir - Write-Host "Downloading vswhere" + Write-Host 'Downloading vswhere' Invoke-WebRequest "https://github.com/Microsoft/vswhere/releases/download/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe } if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } - $args = @("-latest", "-prerelease", "-format", "json", "-requires", "Microsoft.Component.MSBuild", "-products", "*") + $args = @('-latest', '-prerelease', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*') - if (Get-Member -InputObject $vsRequirements -Name "version") { - $args += "-version" + if (Get-Member -InputObject $vsRequirements -Name 'version') { + $args += '-version' $args += $vsRequirements.version } - if (Get-Member -InputObject $vsRequirements -Name "components") { + if (Get-Member -InputObject $vsRequirements -Name 'components') { foreach ($component in $vsRequirements.components) { - $args += "-requires" + $args += '-requires' $args += $component } } @@ -385,27 +385,27 @@ function InitializeBuildTool() { # Initialize dotnet cli if listed in 'tools' $dotnetRoot = $null - if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") { + if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') { $dotnetRoot = InitializeDotNetCli -install:$restore } - if ($msbuildEngine -eq "dotnet") { + if ($msbuildEngine -eq 'dotnet') { if (!$dotnetRoot) { - Write-PipelineTelemetryError -Category "InitializeToolset" -Message "/global.json must specify 'tools.dotnet'." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "/global.json must specify 'tools.dotnet'." ExitWithExitCode 1 } - $buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild"; Tool = "dotnet"; Framework = "netcoreapp2.1" } + $buildTool = @{ Path = Join-Path $dotnetRoot 'dotnet.exe'; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' } } elseif ($msbuildEngine -eq "vs") { try { $msbuildPath = InitializeVisualStudioMSBuild -install:$restore } catch { - Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_ + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ ExitWithExitCode 1 } $buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" } } else { - Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'." ExitWithExitCode 1 } @@ -414,15 +414,15 @@ function InitializeBuildTool() { function GetDefaultMSBuildEngine() { # Presence of tools.vs indicates the repo needs to build using VS msbuild on Windows. - if (Get-Member -InputObject $GlobalJson.tools -Name "vs") { - return "vs" + if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { + return 'vs' } - if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") { - return "dotnet" + if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') { + return 'dotnet' } - Write-PipelineTelemetryError -Category "InitializeToolset" -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." ExitWithExitCode 1 } @@ -431,9 +431,9 @@ function GetNuGetPackageCachePath() { # Use local cache on CI to ensure deterministic build, # use global cache in dev builds to avoid cost of downloading packages. if ($useGlobalNuGetCache) { - $env:NUGET_PACKAGES = Join-Path $env:UserProfile ".nuget\packages" + $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages' } else { - $env:NUGET_PACKAGES = Join-Path $RepoRoot ".packages" + $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages' } } @@ -475,14 +475,14 @@ function InitializeToolset() { } if (-not $restore) { - Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Toolset version $toolsetVersion has not been restored." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Toolset version $toolsetVersion has not been restored." ExitWithExitCode 1 } $buildTool = InitializeBuildTool - $proj = Join-Path $ToolsetDir "restore.proj" - $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" } + $proj = Join-Path $ToolsetDir 'restore.proj' + $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' } '' | Set-Content $proj @@ -504,7 +504,7 @@ function ExitWithExitCode([int] $exitCode) { } function Stop-Processes() { - Write-Host "Killing running build processes..." + Write-Host 'Killing running build processes...' foreach ($processName in $processesToStopOnExit) { Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process } @@ -521,7 +521,7 @@ function MSBuild() { # Work around issues with Azure Artifacts credential provider # https://github.com/dotnet/arcade/issues/3932 - if ($ci -and $buildTool.Tool -eq "dotnet") { + if ($ci -and $buildTool.Tool -eq 'dotnet') { dotnet nuget locals http-cache -c $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20 @@ -532,7 +532,7 @@ function MSBuild() { $toolsetBuildProject = InitializeToolset $path = Split-Path -parent $toolsetBuildProject - $path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll") + $path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll') $args += "/logger:$path" } @@ -547,12 +547,12 @@ function MSBuild() { function MSBuild-Core() { if ($ci) { if (!$binaryLog) { - Write-PipelineTaskError -Message "Binary log must be enabled in CI build." + Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build.' ExitWithExitCode 1 } if ($nodeReuse) { - Write-PipelineTaskError -Message "Node reuse must be disabled in CI build." + Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.' ExitWithExitCode 1 } } @@ -562,10 +562,10 @@ function MSBuild-Core() { $cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci" if ($warnAsError) { - $cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true" + $cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true' } else { - $cmdArgs += " /p:TreatWarningsAsErrors=false" + $cmdArgs += ' /p:TreatWarningsAsErrors=false' } foreach ($arg in $args) { @@ -577,7 +577,7 @@ function MSBuild-Core() { $exitCode = Exec-Process $buildTool.Path $cmdArgs if ($exitCode -ne 0) { - Write-PipelineTaskError -Message "Build failed." + Write-PipelineTelemetryError Category 'Build' -Message 'Build failed.' $buildLog = GetMSBuildBinaryLogCommandLineArgument $args if ($buildLog -ne $null) { @@ -592,12 +592,12 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) { foreach ($argument in $arguments) { if ($argument -ne $null) { $arg = $argument.Trim() - if ($arg.StartsWith("/bl:", "OrdinalIgnoreCase")) { - return $arg.Substring("/bl:".Length) + if ($arg.StartsWith('/bl:', "OrdinalIgnoreCase")) { + return $arg.Substring('/bl:'.Length) } - if ($arg.StartsWith("/binaryLogger:", "OrdinalIgnoreCase")) { - return $arg.Substring("/binaryLogger:".Length) + if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) { + return $arg.Substring('/binaryLogger:'.Length) } } } @@ -607,14 +607,14 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) { . $PSScriptRoot\pipeline-logging-functions.ps1 -$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..") -$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..") -$ArtifactsDir = Join-Path $RepoRoot "artifacts" -$ToolsetDir = Join-Path $ArtifactsDir "toolset" -$ToolsDir = Join-Path $RepoRoot ".tools" -$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration -$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration -$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json +$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..') +$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..') +$ArtifactsDir = Join-Path $RepoRoot 'artifacts' +$ToolsetDir = Join-Path $ArtifactsDir 'toolset' +$ToolsDir = Join-Path $RepoRoot '.tools' +$LogDir = Join-Path (Join-Path $ArtifactsDir 'log') $configuration +$TempDir = Join-Path (Join-Path $ArtifactsDir 'tmp') $configuration +$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | ConvertFrom-Json # true if global.json contains a "runtimes" section $globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false } @@ -631,8 +631,14 @@ Write-PipelineSetVariable -Name 'TMP' -Value $TempDir # Import custom tools configuration, if present in the repo. # Note: Import in global scope so that the script set top-level variables without qualification. if (!$disableConfigureToolsetImport) { - $configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1" + $configureToolsetScript = Join-Path $EngRoot 'configure-toolset.ps1' if (Test-Path $configureToolsetScript) { - . $configureToolsetScript + . $configureToolsetScript + if ((Test-Path variable:failOnConfigureToolsetError) -And $failOnConfigureToolsetError) { + if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) { + Write-PipelineTelemetryError -Category 'Build' -Message 'configure-toolset.ps1 returned a non-zero exit code' + ExitWithExitCode $LastExitCode + } + } } } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 2a18067fbc..864c160664 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -4,7 +4,6 @@ # CI mode - set to true on CI server for PR validation build or official build. ci=${ci:-false} -disable_configure_toolset_import=${disable_configure_toolset_import:-} # Set to true to use the pipelines logger which will enable Azure logging output. # https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md @@ -82,7 +81,7 @@ function ReadGlobalVersion { local pattern="\"$key\" *: *\"(.*)\"" if [[ ! $line =~ $pattern ]]; then - Write-PipelineTelemetryError -category 'InitializeToolset' "Error: Cannot find \"$key\" in $global_json_file" + Write-PipelineTelemetryError -category 'Build' "Error: Cannot find \"$key\" in $global_json_file" ExitWithExitCode 1 fi @@ -334,7 +333,7 @@ function InitializeToolset { local toolset_build_proj=`cat "$toolset_location_file"` if [[ ! -a "$toolset_build_proj" ]]; then - Write-PipelineTelemetryError -category 'InitializeToolset' "Invalid toolset path: $toolset_build_proj" + Write-PipelineTelemetryError -category 'Build' "Invalid toolset path: $toolset_build_proj" ExitWithExitCode 3 fi @@ -384,12 +383,12 @@ function MSBuild { function MSBuild-Core { if [[ "$ci" == true ]]; then if [[ "$binary_log" != true ]]; then - Write-PipelineTaskError "Binary log must be enabled in CI build." + Write-PipelineTelemetryError -category 'Build' "Binary log must be enabled in CI build." ExitWithExitCode 1 fi if [[ "$node_reuse" == true ]]; then - Write-PipelineTaskError "Node reuse must be disabled in CI build." + Write-PipelineTelemetryError -category 'Build' "Node reuse must be disabled in CI build." ExitWithExitCode 1 fi fi @@ -403,7 +402,7 @@ function MSBuild-Core { "$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || { local exit_code=$? - Write-PipelineTaskError "Build failed (exit code '$exit_code')." + Write-PipelineTelemetryError -category 'Build' "Build failed (exit code '$exit_code')." ExitWithExitCode $exit_code } } @@ -446,7 +445,7 @@ Write-PipelineSetVariable -name "Temp" -value "$temp_dir" Write-PipelineSetVariable -name "TMP" -value "$temp_dir" # Import custom tools configuration, if present in the repo. -if [[ -z "$disable_configure_toolset_import" ]]; then +if [ -z "${disable_configure_toolset_import:-}" ]; then configure_toolset_script="$eng_root/configure-toolset.sh" if [[ -a "$configure_toolset_script" ]]; then . "$configure_toolset_script" diff --git a/global.json b/global.json index ca1b0780a7..e0109fb0fe 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19569.6", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19601.1", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 18b73fbfa7230fdf8ccaad5a4e867d7fd348373b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2019 10:26:57 -0800 Subject: [PATCH 45/51] Update dependencies from https://github.com/dotnet/arcade build 20191202.4 (#7923) - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19602.4 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8bd6f3d7de..0288911f9e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - c0b56ff3569e3c7475070486c40543ea4c6f6dc7 + 9d34fd008e754e1ada35c8b6bc3694e7a90b4ed7 diff --git a/global.json b/global.json index e0109fb0fe..707f7b7357 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19601.1", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19602.4", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From d966659a507e0041ec2eba99444fc68974d23a42 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Tue, 3 Dec 2019 14:40:00 -0800 Subject: [PATCH 46/51] fire event when a value is bound at the root of a script evaluation (#7919) * fire event when a value is bound at the root of a script evaluation * simplify event notifying bound values in interactive --- .../FSharpScript.fs | 2 + src/fsharp/fsi/fsi.fs | 11 ++++- src/fsharp/fsi/fsi.fsi | 3 ++ .../FSharpScriptTests.fs | 46 +++++++++++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs index db672f5237..d260bd2ccd 100644 --- a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs +++ b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs @@ -39,6 +39,8 @@ type FSharpScript(?captureInput: bool, ?captureOutput: bool, ?additionalArgs: st member __.AssemblyReferenceAdded = fsi.AssemblyReferenceAdded + member __.ValueBound = fsi.ValueBound + member __.ProvideInput = stdin.ProvideInput member __.OutputProduced = outputProduced.Publish diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs index 78b142bd51..c5e71384f1 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -950,6 +950,7 @@ type internal FsiDynamicCompiler let assemblyName = "FSI-ASSEMBLY" let assemblyReferenceAddedEvent = Control.Event() + let valueBoundEvent = Control.Event<_>() let mutable fragmentId = 0 let mutable prevIt : ValRef option = None @@ -1155,6 +1156,10 @@ type internal FsiDynamicCompiler if v.CompiledName = "it" then itValue <- fsiValueOpt + match fsiValueOpt with + | Some fsiValue -> valueBoundEvent.Trigger(fsiValue.ReflectionValue, fsiValue.ReflectionType, v.CompiledName) + | None -> () + let symbol = FSharpSymbol.Create(cenv, v.Item) let symbolUse = FSharpSymbolUse(tcGlobals, newState.tcState.TcEnvFromImpls.DisplayEnv, symbol, ItemOccurence.Binding, v.DeclarationLocation) fsi.TriggerEvaluation (fsiValueOpt, symbolUse, decl) @@ -1331,6 +1336,8 @@ type internal FsiDynamicCompiler member __.AssemblyReferenceAdded = assemblyReferenceAddedEvent.Publish + member __.ValueBound = valueBoundEvent.Publish + //---------------------------------------------------------------------------- // ctrl-c handling //---------------------------------------------------------------------------- @@ -2222,7 +2229,6 @@ type internal FsiInteractionProcessor let fsiInteractiveChecker = FsiInteractiveChecker(legacyReferenceResolver, checker, tcConfig, istate.tcGlobals, istate.tcImports, istate.tcState) fsiInteractiveChecker.ParseAndCheckInteraction(ctok, SourceText.ofString text) - //---------------------------------------------------------------------------- // Server mode: //---------------------------------------------------------------------------- @@ -2630,6 +2636,9 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i /// Event fires every time an assembly reference is added to the execution environment, e.g., via `#r`. member __.AssemblyReferenceAdded = fsiDynamicCompiler.AssemblyReferenceAdded + + /// Event fires when a root-level value is bound to an identifier, e.g., via `let x = ...`. + member __.ValueBound = fsiDynamicCompiler.ValueBound /// Performs these steps: /// - Load the dummy interaction, if any diff --git a/src/fsharp/fsi/fsi.fsi b/src/fsharp/fsi/fsi.fsi index bed1b74e61..c576a33fbd 100644 --- a/src/fsharp/fsi/fsi.fsi +++ b/src/fsharp/fsi/fsi.fsi @@ -237,6 +237,9 @@ type FsiEvaluationSession = /// Event fires every time an assembly reference is added to the execution environment, e.g., via `#r`. member AssemblyReferenceAdded : IEvent + /// Event fires when a root-level value is bound to an identifier, e.g., via `let x = ...`. + member ValueBound : IEvent + /// Load the dummy interaction, load the initial files, and, /// if interacting, start the background thread to read the standard input. /// diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs index 85a4c5f057..5a57392031 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs @@ -112,3 +112,49 @@ type InteractiveTests() = Assert.True(wasCancelled) Assert.LessOrEqual(sw.ElapsedMilliseconds, sleepTime) Assert.AreEqual(None, result) + + [] + member _.``Values bound at the root trigger an event``() = + let mutable foundX = false + let mutable foundY = false + let mutable foundCount = 0 + use script = new FSharpScript() + script.ValueBound + |> Event.add (fun (value, typ, name) -> + foundX <- foundX || (name = "x" && typ = typeof && value :?> int = 1) + foundY <- foundY || (name = "y" && typ = typeof && value :?> int = 2) + foundCount <- foundCount + 1) + let code = @" +let x = 1 +let y = 2 +" + script.Eval(code) |> ignoreValue + Assert.True(foundX) + Assert.True(foundY) + Assert.AreEqual(2, foundCount) + + [] + member _.``Values re-bound trigger an event``() = + let mutable foundXCount = 0 + use script = new FSharpScript() + script.ValueBound + |> Event.add (fun (_value, typ, name) -> + if name = "x" && typ = typeof then foundXCount <- foundXCount + 1) + script.Eval("let x = 1") |> ignoreValue + script.Eval("let x = 2") |> ignoreValue + Assert.AreEqual(2, foundXCount) + + [] + member _.``Nested let bindings don't trigger event``() = + let mutable foundInner = false + use script = new FSharpScript() + script.ValueBound + |> Event.add (fun (_value, _typ, name) -> + foundInner <- foundInner || name = "inner") + let code = @" +let x = + let inner = 1 + () +" + script.Eval(code) |> ignoreValue + Assert.False(foundInner) From 11ddd6f6ed784a013a9c1f599960edd1061e90ed Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2019 10:58:14 -0800 Subject: [PATCH 47/51] Update dependencies from https://github.com/dotnet/arcade build 20191203.17 (#7933) - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19603.17 --- eng/Version.Details.xml | 4 +- eng/common/SetupNugetSources.ps1 | 65 ++++++++++--------- eng/common/SetupNugetSources.sh | 78 ++++++++++++++++------- eng/common/build.ps1 | 11 +--- eng/common/init-tools-native.ps1 | 6 +- eng/common/native/install-tool.ps1 | 2 +- eng/common/pipeline-logging-functions.ps1 | 2 +- global.json | 2 +- 8 files changed, 103 insertions(+), 67 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index aef250643d..c39e4f27f1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - b449f372df1a3374ebdc85f42ff137dcda08776b + b902fd6b6948e689a5128fa6d94dc7de13e6af84 diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 6662e4bc1e..a5a1e711d7 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -16,7 +16,7 @@ # condition: eq(variables['Agent.OS'], 'Windows_NT') # inputs: # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token +# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) @@ -94,41 +94,48 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) { } } -try { - if (!(Test-Path $ConfigFile -PathType Leaf)) { - Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile" +if (!(Test-Path $ConfigFile -PathType Leaf)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" + ExitWithExitCode 1 +} + +if (!$Password) { + Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT' ExitWithExitCode 1 - } +} - # Load NuGet.config - $doc = New-Object System.Xml.XmlDocument - $filename = (Get-Item $ConfigFile).FullName - $doc.Load($filename) +# Load NuGet.config +$doc = New-Object System.Xml.XmlDocument +$filename = (Get-Item $ConfigFile).FullName +$doc.Load($filename) - # Get reference to or create one if none exist already - $sources = $doc.DocumentElement.SelectSingleNode("packageSources") - if ($sources -eq $null) { - $sources = $doc.CreateElement("packageSources") - $doc.DocumentElement.AppendChild($sources) | Out-Null - } +# Get reference to or create one if none exist already +$sources = $doc.DocumentElement.SelectSingleNode("packageSources") +if ($sources -eq $null) { + $sources = $doc.CreateElement("packageSources") + $doc.DocumentElement.AppendChild($sources) | Out-Null +} - # Looks for a node. Create it if none is found. - $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") - if ($creds -eq $null) { - $creds = $doc.CreateElement("packageSourceCredentials") - $doc.DocumentElement.AppendChild($creds) | Out-Null - } +# Looks for a node. Create it if none is found. +$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") +if ($creds -eq $null) { + $creds = $doc.CreateElement("packageSourceCredentials") + $doc.DocumentElement.AppendChild($creds) | Out-Null +} - # Insert credential nodes for Maestro's private feeds - InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password +# Insert credential nodes for Maestro's private feeds +InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password +$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']") +if ($dotnet3Source -ne $null) { AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password - - $doc.Save($filename) } -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ - ExitWithExitCode 1 + +$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") +if ($dotnet31Source -ne $null) { + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password } + +$doc.Save($filename) diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index 55ad70e366..7d6fef27fe 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -17,7 +17,7 @@ # displayName: Setup Private Feeds Credentials # inputs: # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh -# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token +# arguments: $(Build.SourcesDirectory)/NuGet.config $Token # condition: ne(variables['Agent.OS'], 'Windows_NT') # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) @@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" . "$scriptroot/tools.sh" if [ ! -f "$ConfigFile" ]; then - Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile" + Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" + ExitWithExitCode 1 +fi + +if [ -z "$CredToken" ]; then + Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT" ExitWithExitCode 1 fi @@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then fi # Ensure there is a ... section. -grep -i "" $ConfigFile +grep -i "" $ConfigFile if [ "$?" != "0" ]; then echo "Adding ... section." ConfigNodeHeader="" @@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then fi # Ensure there is a ... section. -grep -i "" $ConfigFile +grep -i "" $ConfigFile if [ "$?" != "0" ]; then echo "Adding ... section." @@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config fi -# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources -grep -i "" $ConfigFile -if [ "$?" != "0" ]; then - echo "Adding dotnet3-internal to the packageSources." +PackageSources=() - PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" +# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present +grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding dotnet3-internal to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3-internal') + + grep -i "" - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3-internal-transport') fi -# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources -grep -i "" $ConfigFile -if [ "$?" != "0" ]; then - echo "Adding dotnet3-internal-transport to the packageSources." +# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present +grep -i "" - PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3.1-internal') + + grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding dotnet3.1-internal-transport to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3.1-internal-transport') fi # I want things split line by line PrevIFS=$IFS IFS=$'\n' -PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') +PackageSources+="$IFS" +PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') IFS=$PrevIFS -PackageSources+=('dotnet3-internal') -PackageSources+=('dotnet3-internal-transport') - for FeedName in ${PackageSources[@]} ; do # Check if there is no existing credential for this FeedName grep -i "<$FeedName>" $ConfigFile @@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do PackageSourceCredentialsNodeFooter="" NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" - sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config + sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile fi done diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index 0fd4d9c7f2..88814514d8 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -62,6 +62,8 @@ function Print-Usage() { Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)." } +. $PSScriptRoot\tools.ps1 + function InitializeCustomToolset { if (-not $restore) { return @@ -113,8 +115,6 @@ function Build { } try { - . $PSScriptRoot\tools.ps1 - if ($clean) { if (Test-Path $ArtifactsDir) { Remove-Item -Recurse -Force $ArtifactsDir @@ -122,12 +122,7 @@ try { } exit 0 } - - if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) { - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message 'Eng/common/tools.ps1 returned a non-zero exit code.' - ExitWithExitCode $LastExitCode - } - + if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) { Print-Usage exit 0 diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index f4409f0835..db830c00a6 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -113,14 +113,16 @@ try { } $toolInstallationFailure = $true } else { - Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $errMsg + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host $errMsg exit 1 } } } if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) { - Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools bootstrap failed' + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host 'Native tools bootstrap failed' exit 1 } } diff --git a/eng/common/native/install-tool.ps1 b/eng/common/native/install-tool.ps1 index ca180d03ba..f397e1c75d 100644 --- a/eng/common/native/install-tool.ps1 +++ b/eng/common/native/install-tool.ps1 @@ -105,7 +105,7 @@ try { Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))" exit 1 } elseif (@($ToolFilePath).Length -Lt 1) { - Write-Error "$ToolName was not found in $ToolFilePath." + Write-Host "$ToolName was not found in $ToolFilePath." exit 1 } diff --git a/eng/common/pipeline-logging-functions.ps1 b/eng/common/pipeline-logging-functions.ps1 index e065618588..2688c389bd 100644 --- a/eng/common/pipeline-logging-functions.ps1 +++ b/eng/common/pipeline-logging-functions.ps1 @@ -85,7 +85,7 @@ function Write-PipelineTaskError { [switch]$AsOutput, [bool]$IsMultiJobVariable=$true) - if(-Not (Test-Path variable:ci) -Or !$ci) { + if((Test-Path variable:ci) -And $ci) { Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ 'variable' = $Name 'isSecret' = $Secret diff --git a/global.json b/global.json index 39f9ea968e..bbe81be30c 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19476.6", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19603.17", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From 1506d3c935de79a9bc945de3790cf803e680d3aa Mon Sep 17 00:00:00 2001 From: Will Smith Date: Sun, 8 Dec 2019 15:09:20 -0800 Subject: [PATCH 48/51] Use MemoryMappedFile API instead of p/invoke win32 calls (#7944) * Remove win32 mmf calls. Use .NET MemoryMappedFile API instead * Use DangerousGetHandle as it's an implementation detail * minor cleanup --- src/absil/ilread.fs | 154 ++++++-------------------------------------- 1 file changed, 21 insertions(+), 133 deletions(-) diff --git a/src/absil/ilread.fs b/src/absil/ilread.fs index cc5c865515..de201333a0 100755 --- a/src/absil/ilread.fs +++ b/src/absil/ilread.fs @@ -14,6 +14,7 @@ open System.Collections.Concurrent open System.Collections.Generic open System.Diagnostics open System.IO +open System.IO.MemoryMappedFiles open System.Runtime.InteropServices open System.Text open Internal.Utilities @@ -184,124 +185,6 @@ type RawMemoryFile(fileName: string, obj: obj, addr: nativeint, length: int) = interface BinaryFile with override __.GetView() = view :>_ -/// Read from memory mapped files. -module MemoryMapping = - - type HANDLE = nativeint - type ADDR = nativeint - type SIZE_T = nativeint - - [] - extern bool CloseHandle (HANDLE _handler) - - [] - extern HANDLE CreateFile (string _lpFileName, - int _dwDesiredAccess, - int _dwShareMode, - HANDLE _lpSecurityAttributes, - int _dwCreationDisposition, - int _dwFlagsAndAttributes, - HANDLE _hTemplateFile) - - [] - extern HANDLE CreateFileMapping (HANDLE _hFile, - HANDLE _lpAttributes, - int _flProtect, - int _dwMaximumSizeLow, - int _dwMaximumSizeHigh, - string _lpName) - - [] - extern ADDR MapViewOfFile (HANDLE _hFileMappingObject, - int _dwDesiredAccess, - int _dwFileOffsetHigh, - int _dwFileOffsetLow, - SIZE_T _dwNumBytesToMap) - - [] - extern bool UnmapViewOfFile (ADDR _lpBaseAddress) - - let INVALID_HANDLE = new IntPtr(-1) - let MAP_READ = 0x0004 - let GENERIC_READ = 0x80000000 - let NULL_HANDLE = IntPtr.Zero - let FILE_SHARE_NONE = 0x0000 - let FILE_SHARE_READ = 0x0001 - let FILE_SHARE_WRITE = 0x0002 - let FILE_SHARE_READ_WRITE = 0x0003 - let CREATE_ALWAYS = 0x0002 - let OPEN_EXISTING = 0x0003 - let OPEN_ALWAYS = 0x0004 - -/// A view over a raw pointer to memory given by a memory mapped file. -/// NOTE: we should do more checking of validity here. -type MemoryMapView(start: nativeint) = - inherit BinaryView() - - override m.ReadByte i = - Marshal.ReadByte(start + nativeint i) - - override m.ReadBytes i n = - let res = Bytes.zeroCreate n - Marshal.Copy(start + nativeint i, res, 0, n) - res - - override m.ReadInt32 i = - Marshal.ReadInt32(start + nativeint i) - - override m.ReadUInt16 i = - uint16(Marshal.ReadInt16(start + nativeint i)) - - override m.CountUtf8String i = - let pStart = start + nativeint i - let mutable p = start - while Marshal.ReadByte p <> 0uy do - p <- p + 1n - int (p - pStart) - - override m.ReadUTF8String i = - let n = m.CountUtf8String i - System.Runtime.InteropServices.Marshal.PtrToStringAnsi(start + nativeint i, n) - -/// Memory maps a file and creates a single view over the entirety of its contents. The -/// lock on the file is only released when the object is disposed. -/// For memory mapping we currently take one view and never release it. -[] -type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HANDLE, hView: nativeint) = - - do stats.memoryMapFileOpenedCount <- stats.memoryMapFileOpenedCount + 1 - let mutable closed = false - static member Create fileName = - let hFile = MemoryMapping.CreateFile (fileName, MemoryMapping.GENERIC_READ, MemoryMapping.FILE_SHARE_READ_WRITE, IntPtr.Zero, MemoryMapping.OPEN_EXISTING, 0, IntPtr.Zero ) - if hFile.Equals MemoryMapping.INVALID_HANDLE then - failwithf "CreateFile(0x%08x)" (Marshal.GetHRForLastWin32Error()) - let protection = 0x00000002 - let hMap = MemoryMapping.CreateFileMapping (hFile, IntPtr.Zero, protection, 0, 0, null ) - ignore(MemoryMapping.CloseHandle hFile) - if hMap.Equals MemoryMapping.NULL_HANDLE then - failwithf "CreateFileMapping(0x%08x)" (Marshal.GetHRForLastWin32Error()) - - let hView = MemoryMapping.MapViewOfFile (hMap, MemoryMapping.MAP_READ, 0, 0, 0n) - - if hView.Equals IntPtr.Zero then - failwithf "MapViewOfFile(0x%08x)" (Marshal.GetHRForLastWin32Error()) - - let view = MemoryMapView hView - - MemoryMapFile(fileName, view, hMap, hView) - - member __.FileName = fileName - - member __.Close() = - stats.memoryMapFileClosedCount <- stats.memoryMapFileClosedCount + 1 - if not closed then - closed <- true - MemoryMapping.UnmapViewOfFile hView |> ignore - MemoryMapping.CloseHandle hMap |> ignore - - interface BinaryFile with - override __.GetView() = (view :> BinaryView) - /// Read file from memory blocks type ByteView(bytes: byte[]) = inherit BinaryView() @@ -3989,19 +3872,24 @@ let createByteFileChunk opts fileName chunk = | Some (start, length) -> File.ReadBinaryChunk(fileName, start, length) ByteFile(fileName, bytes) :> BinaryFile -let tryMemoryMapWholeFile opts fileName = - let file = - try - MemoryMapFile.Create fileName :> BinaryFile - with _ -> - createByteFileChunk opts fileName None - let disposer = - { new IDisposable with - member __.Dispose() = - match file with - | :? MemoryMapFile as m -> m.Close() // Note that the PE file reader is not required after this point for metadata-only reading - | _ -> () } - disposer, file +let createMemoryMapFile fileName = + let mmf, accessor, length = + let fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read) + let length = fileStream.Length + let mmf = MemoryMappedFile.CreateFromFile(fileStream, null, length, MemoryMappedFileAccess.Read, HandleInheritability.None, leaveOpen=false) + mmf, mmf.CreateViewAccessor(0L, fileStream.Length, MemoryMappedFileAccess.Read), length + let safeHolder = + { new obj() with + override x.Finalize() = + (x :?> IDisposable).Dispose() + interface IDisposable with + member x.Dispose() = + GC.SuppressFinalize x + accessor.Dispose() + mmf.Dispose() + stats.memoryMapFileClosedCount <- stats.memoryMapFileClosedCount + 1 } + stats.memoryMapFileOpenedCount <- stats.memoryMapFileOpenedCount + 1 + safeHolder, RawMemoryFile(fileName, safeHolder, accessor.SafeMemoryMappedViewHandle.DangerousGetHandle(), int length) :> BinaryFile let OpenILModuleReaderFromBytes fileName bytes opts = let pefile = ByteFile(fileName, bytes) :> BinaryFile @@ -4067,7 +3955,7 @@ let OpenILModuleReader fileName opts = // For metadata-only, always use a temporary, short-lived PE file reader, preferably over a memory mapped file. // Then use the metadata blob as the long-lived memory resource. - let disposer, pefileEager = tryMemoryMapWholeFile opts fullPath + let disposer, pefileEager = createMemoryMapFile fullPath use _disposer = disposer let (metadataPhysLoc, metadataSize, peinfo, pectxtEager, pevEager, _pdb) = openPEFileReader (fullPath, pefileEager, None, false) let mdfile = @@ -4106,7 +3994,7 @@ let OpenILModuleReader fileName opts = // still use an in-memory ByteFile let _disposer, pefile = if alwaysMemoryMapFSC || stableFileHeuristicApplies fullPath then - tryMemoryMapWholeFile opts fullPath + createMemoryMapFile fullPath else let pefile = createByteFileChunk opts fullPath None let disposer = { new IDisposable with member __.Dispose() = () } From 25db775d3e618ee25f9d4a158c9119db32039c4a Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Mon, 9 Dec 2019 12:12:55 -0600 Subject: [PATCH 49/51] update CI environments --- .travis.yml | 22 +--------------------- appveyor.yml | 2 +- fcs/RELEASE_NOTES.md | 11 +++++++++++ 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 767c16a385..5429fc769e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ mono: - latest - 5.8.0 -dotnet: 2.1.4 +dotnet: 3.0.100 sudo: false @@ -20,24 +20,4 @@ install: script: - ./fcs/build.sh Build -# Woes with doing more build/test on linux -# -# This fails because NUnit gives an exception (!!!!) -# - ./fcs/build.sh Test.NetFx -# -# System.IO.FileNotFoundException: Could not load file or assembly 'nunit.engine.api, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' or one of its dependencies. -# -# This fails because Nuget packaging doesn't like backslashes in the package file, but Windows does -# - ./fcs/build.sh NuGet - -# Fails on Travis OSX too often because there are network outages on that configuration getting the Mono MDK -# Fails on Travis Linux with Mono latest do to a trust issue with certs on package restore? -matrix: - exclude: - - os: osx - mono: 4.4.2 - - os: osx - mono: 4.8.0 - - os: linux - mono: latest diff --git a/appveyor.yml b/appveyor.yml index 8525a84874..23600dbb2b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -os: Visual Studio 2017 +os: Visual Studio 2019 init: - git config --global core.autocrlf input diff --git a/fcs/RELEASE_NOTES.md b/fcs/RELEASE_NOTES.md index 44a9e271df..c9cc93b08f 100644 --- a/fcs/RELEASE_NOTES.md +++ b/fcs/RELEASE_NOTES.md @@ -1,3 +1,14 @@ +#### 33.0.1 + +Integrate dotnet/fsharp from 4f5f08320 to 7b25d7f82. Notable changes include: + +* Addition of the FsharpUnionCase.HasFields property +* FCS builds entirely on .Net Core now +* Better debug information for ranges +* Support for Literal values in signature files +* Using memory-mapped files cross-platform to read IL. + + #### 33.0.0 Integrate dotnet/fsharp from 48f932cf8 to 085985140. Notable changes include: From 06fb47d6b21f6d38771e7951358c8ef72482251d Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Mon, 9 Dec 2019 12:43:53 -0600 Subject: [PATCH 50/51] update CI builds again --- .travis.yml | 6 +++--- appveyor.yml | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5429fc769e..d5baa20a0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,12 @@ os: - linux - osx -osx_image: xcode9 +osx_image: xcode11.2 mono: - weekly - latest - - 5.8.0 + - 6.0.0 dotnet: 3.0.100 @@ -18,6 +18,6 @@ sudo: false install: script: - - ./fcs/build.sh Build + - ./fcs/build.sh TestAndNuget diff --git a/appveyor.yml b/appveyor.yml index 23600dbb2b..b72f230f0e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,5 +9,4 @@ build_script: test: off version: '{build}' artifacts: - - path: release\fcs\*.nupkg - type: NuGetPackage \ No newline at end of file + - path: artifacts\bin\fcs\Release\*.nupkg \ No newline at end of file From 09154ccdfde2109a076daa7908be154ae2d87f9f Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Mon, 9 Dec 2019 13:53:17 -0600 Subject: [PATCH 51/51] just build only for travis right now --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d5baa20a0c..22acb82a11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,6 @@ sudo: false install: script: - - ./fcs/build.sh TestAndNuget + - ./fcs/build.sh