From 85f4c5011592727316f50efa12b2d12951d13f35 Mon Sep 17 00:00:00 2001 From: JC Aguilera Date: Wed, 10 Jul 2019 17:16:08 -0700 Subject: [PATCH 01/63] Copy sources from Versions.props to NuGet.config (#7191) --- NuGet.config | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NuGet.config b/NuGet.config index 8f21de1b15b..a8664a73c57 100644 --- a/NuGet.config +++ b/NuGet.config @@ -8,6 +8,20 @@ + + + + + + + + + + + + + + From 5f1a882b73e8c1a846ba7ca593f572987a4b3537 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Thu, 11 Jul 2019 03:11:56 +0200 Subject: [PATCH 02/63] Only check distinct errors (#7140) --- tests/fsharp/Compiler/CompilerAssert.fs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/fsharp/Compiler/CompilerAssert.fs b/tests/fsharp/Compiler/CompilerAssert.fs index 332ad59b8ae..623f7b86c04 100644 --- a/tests/fsharp/Compiler/CompilerAssert.fs +++ b/tests/fsharp/Compiler/CompilerAssert.fs @@ -120,8 +120,12 @@ module CompilerAssert = | FSharpCheckFileAnswer.Aborted _ -> Assert.Fail("Type Checker Aborted") | FSharpCheckFileAnswer.Succeeded(typeCheckResults) -> - Assert.AreEqual(1, typeCheckResults.Errors.Length, sprintf "Expected one type check error: %A" typeCheckResults.Errors) - typeCheckResults.Errors + let errors = + typeCheckResults.Errors + |> Array.distinctBy (fun e -> e.Severity, e.ErrorNumber, e.StartLineAlternate, e.StartColumn, e.EndLineAlternate, e.EndColumn, e.Message) + + Assert.AreEqual(1, errors.Length, sprintf "Expected one type check error: %A" typeCheckResults.Errors) + errors |> Array.iter (fun info -> Assert.AreEqual(FSharpErrorSeverity.Error, info.Severity) Assert.AreEqual(expectedErrorNumber, info.ErrorNumber, "expectedErrorNumber") From d5ae449560f1c01328bd8692be99ac818ab18521 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Thu, 11 Jul 2019 10:12:51 +0200 Subject: [PATCH 03/63] Use 1-based column numbers in tests (#7141) * Use 1-based column numbers in tests * Helper that can check for multiple type errors --- tests/fsharp/Compiler/CompilerAssert.fs | 18 ++++++++++++------ .../Compiler/Language/AnonRecordTests.fs | 9 ++++++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/tests/fsharp/Compiler/CompilerAssert.fs b/tests/fsharp/Compiler/CompilerAssert.fs index 623f7b86c04..133e63c3022 100644 --- a/tests/fsharp/Compiler/CompilerAssert.fs +++ b/tests/fsharp/Compiler/CompilerAssert.fs @@ -110,7 +110,8 @@ module CompilerAssert = Assert.IsEmpty(typeCheckResults.Errors, sprintf "Type Check errors: %A" typeCheckResults.Errors) - let TypeCheckSingleError (source: string) (expectedErrorNumber: int) (expectedErrorRange: int * int * int * int) (expectedErrorMsg: string) = + + let TypeCheckWithErrors (source: string) expectedTypeErrors = lock gate <| fun () -> let parseResults, fileAnswer = checker.ParseAndCheckFileInProject("test.fs", 0, SourceText.ofString source, defaultProjectOptions) |> Async.RunSynchronously @@ -124,15 +125,20 @@ module CompilerAssert = typeCheckResults.Errors |> Array.distinctBy (fun e -> e.Severity, e.ErrorNumber, e.StartLineAlternate, e.StartColumn, e.EndLineAlternate, e.EndColumn, e.Message) - Assert.AreEqual(1, errors.Length, sprintf "Expected one type check error: %A" typeCheckResults.Errors) - errors - |> Array.iter (fun info -> - Assert.AreEqual(FSharpErrorSeverity.Error, info.Severity) + Assert.AreEqual(Array.length expectedTypeErrors, errors.Length, sprintf "Type check errors: %A" typeCheckResults.Errors) + + Array.zip errors expectedTypeErrors + |> Array.iter (fun (info, expectedError) -> + let (expectedServerity: FSharpErrorSeverity, expectedErrorNumber: int, expectedErrorRange: int * int * int * int, expectedErrorMsg: string) = expectedError + Assert.AreEqual(expectedServerity, info.Severity) Assert.AreEqual(expectedErrorNumber, info.ErrorNumber, "expectedErrorNumber") - Assert.AreEqual(expectedErrorRange, (info.StartLineAlternate, info.StartColumn, info.EndLineAlternate, info.EndColumn), "expectedErrorRange") + Assert.AreEqual(expectedErrorRange, (info.StartLineAlternate, info.StartColumn + 1, info.EndLineAlternate, info.EndColumn + 1), "expectedErrorRange") Assert.AreEqual(expectedErrorMsg, info.Message, "expectedErrorMsg") ) + let TypeCheckSingleError (source: string) (expectedServerity: FSharpErrorSeverity) (expectedErrorNumber: int) (expectedErrorRange: int * int * int * int) (expectedErrorMsg: string) = + TypeCheckWithErrors (source: string) [| expectedServerity, expectedErrorNumber, expectedErrorRange, expectedErrorMsg |] + let CompileExe (source: string) = compile true source (fun (errors, _) -> if errors.Length > 0 then diff --git a/tests/fsharp/Compiler/Language/AnonRecordTests.fs b/tests/fsharp/Compiler/Language/AnonRecordTests.fs index 7182e359b19..0a4d1c18d9f 100644 --- a/tests/fsharp/Compiler/Language/AnonRecordTests.fs +++ b/tests/fsharp/Compiler/Language/AnonRecordTests.fs @@ -3,6 +3,7 @@ namespace FSharp.Compiler.UnitTests open NUnit.Framework +open FSharp.Compiler.SourceCodeServices [] module AnonRecordsTests = @@ -30,8 +31,9 @@ let sAnon = StructClass() type RefClass<'a when 'a : not struct>() = class end let rAnon = RefClass() """ + FSharpErrorSeverity.Error 1 - (3, 12, 3, 41) + (3, 13, 3, 42) "A generic construct requires that the type 'struct {|R : int|}' have reference semantics, but it does not, i.e. it is a struct" [] @@ -40,7 +42,8 @@ let rAnon = RefClass() """ type StructClass<'a when 'a : struct>() = class end let sAnon = StructClass<{| S: int |}>() - """ + """ + FSharpErrorSeverity.Error 1 - (3, 12, 3, 37) + (3, 13, 3, 38) "A generic construct requires that the type '{|S : int|}' is a CLI or F# struct type" \ No newline at end of file From 7d95349504cb267473ee920de718db9d32fe1290 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2019 11:42:21 -0700 Subject: [PATCH 04/63] Update dependencies from https://github.com/dotnet/arcade build 20190710.8 (#7200) - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19360.8 --- eng/Version.Details.xml | 4 +- eng/common/SigningValidation.proj | 2 +- eng/common/performance/perfhelixpublish.proj | 77 ++++++++ eng/common/performance/performance-setup.ps1 | 91 +++++++++ eng/common/performance/performance-setup.sh | 176 ++++++++++++++++++ eng/common/pipeline-logging-functions.ps1 | 7 +- .../post-build/trigger-subscriptions.ps1 | 6 +- eng/common/templates/job/performance.yml | 93 +++++++++ .../channels/internal-servicing.yml | 8 +- .../channels/public-dev-release.yml | 1 + .../post-build/channels/public-release.yml | 8 +- .../channels/public-validation-release.yml | 1 + .../templates/post-build/common-variables.yml | 3 + .../templates/steps/perf-send-to-helix.yml | 66 +++++++ eng/common/tools.ps1 | 4 +- global.json | 2 +- 16 files changed, 529 insertions(+), 20 deletions(-) create mode 100644 eng/common/performance/perfhelixpublish.proj create mode 100644 eng/common/performance/performance-setup.ps1 create mode 100644 eng/common/performance/performance-setup.sh create mode 100644 eng/common/templates/job/performance.yml create mode 100644 eng/common/templates/steps/perf-send-to-helix.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0c5078f9f9c..bfb72eca155 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 0f5dd7680174620f31c9a00cdb2ac0b0e70e631f + a6ae1b637ed236354529992729af875f6c8a180a diff --git a/eng/common/SigningValidation.proj b/eng/common/SigningValidation.proj index 7045fb6fb9d..3d0ac80af3f 100644 --- a/eng/common/SigningValidation.proj +++ b/eng/common/SigningValidation.proj @@ -3,7 +3,7 @@ + + + $(WorkItemDirectory) + $(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)" + 4:00 + + + + + $(WorkItemDirectory) + $(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory)" + 4:00 + + + \ No newline at end of file diff --git a/eng/common/performance/performance-setup.ps1 b/eng/common/performance/performance-setup.ps1 new file mode 100644 index 00000000000..7e5441f7974 --- /dev/null +++ b/eng/common/performance/performance-setup.ps1 @@ -0,0 +1,91 @@ +Param( + [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, + [string] $CoreRootDirectory, + [string] $Architecture="x64", + [string] $Framework="netcoreapp3.0", + [string] $CompilationMode="Tiered", + [string] $Repository=$env:BUILD_REPOSITORY_NAME, + [string] $Branch=$env:BUILD_SOURCEBRANCH, + [string] $CommitSha=$env:BUILD_SOURCEVERSION, + [string] $BuildNumber=$env:BUILD_BUILDNUMBER, + [string] $RunCategories="coreclr corefx", + [string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj", + [string] $Kind="micro", + [switch] $Internal, + [string] $Configurations="CompilationMode=$CompilationMode" +) + +$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") +$UseCoreRun = ($CoreRootDirectory -ne [string]::Empty) + +$PayloadDirectory = (Join-Path $SourceDirectory "Payload") +$PerformanceDirectory = (Join-Path $PayloadDirectory "performance") +$WorkItemDirectory = (Join-Path $SourceDirectory "workitem") +$ExtraBenchmarkDotNetArguments = "--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --stopOnFirstError true" +$Creator = $env:BUILD_DEFINITIONNAME +$PerfLabArguments = "" +$HelixSourcePrefix = "pr" + +$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open" + +if ($Framework.StartsWith("netcoreapp")) { + $Queue = "Windows.10.Amd64.ClientRS4.Open" +} + +if ($Internal) { + $Queue = "Windows.10.Amd64.ClientRS5.Perf" + $PerfLabArguments = "--upload-to-perflab-container" + $ExtraBenchmarkDotNetArguments = "" + $Creator = "" + $HelixSourcePrefix = "official" +} + +$CommonSetupArguments="--frameworks $Framework --queue $Queue --build-number $BuildNumber --build-configs $Configurations" +$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments" + +if ($RunFromPerformanceRepo) { + $SetupArguments = "--perf-hash $CommitSha $CommonSetupArguments" + + robocopy $SourceDirectory $PerformanceDirectory /E /XD $PayloadDirectory $SourceDirectory\artifacts $SourceDirectory\.git +} +else { + git clone --branch master --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory +} + +if ($UseCoreRun) { + $NewCoreRoot = (Join-Path $PayloadDirectory "Core_Root") + Move-Item -Path $CoreRootDirectory -Destination $NewCoreRoot +} + +$DocsDir = (Join-Path $PerformanceDirectory "docs") +robocopy $DocsDir $WorkItemDirectory + +# Set variables that we will need to have in future steps +$ci = $true + +. "$PSScriptRoot\..\pipeline-logging-functions.ps1" + +# Directories +Write-PipelineSetVariable -Name 'PayloadDirectory' -Value "$PayloadDirectory" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'PerformanceDirectory' -Value "$PerformanceDirectory" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'WorkItemDirectory' -Value "$WorkItemDirectory" -IsMultiJobVariable $false + +# Script Arguments +Write-PipelineSetVariable -Name 'Python' -Value "py -3" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'ExtraBenchmarkDotNetArguments' -Value "$ExtraBenchmarkDotNetArguments" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'SetupArguments' -Value "$SetupArguments" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'PerfLabArguments' -Value "$PerfLabArguments" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'BDNCategories' -Value "$RunCategories" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'TargetCsproj' -Value "$Csproj" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'Kind' -Value "$Kind" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'Architecture' -Value "$Architecture" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'UseCoreRun' -Value "$UseCoreRun" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRepo" -IsMultiJobVariable $false + +# Helix Arguments +Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'Queue' -Value "$Queue" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'HelixSourcePrefix' -Value "$HelixSourcePrefix" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name '_BuildConfig' -Value "$Architecture.$Kind.$Framework" -IsMultiJobVariable $false + +exit 0 \ No newline at end of file diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh new file mode 100644 index 00000000000..126da5f76d4 --- /dev/null +++ b/eng/common/performance/performance-setup.sh @@ -0,0 +1,176 @@ +#!/usr/bin/env bash + +source_directory=$BUILD_SOURCESDIRECTORY +core_root_directory= +architecture=x64 +framework=netcoreapp3.0 +compilation_mode=tiered +repository=$BUILD_REPOSITORY_NAME +branch=$BUILD_SOURCEBRANCH +commit_sha=$BUILD_SOURCEVERSION +build_number=$BUILD_BUILDNUMBER +internal=false +kind="micro" +run_categories="coreclr corefx" +csproj="src\benchmarks\micro\MicroBenchmarks.csproj" +configurations= +run_from_perf_repo=false +use_core_run=true + +while (($# > 0)); do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + --sourcedirectory) + source_directory=$2 + shift 2 + ;; + --corerootdirectory) + core_root_directory=$2 + shift 2 + ;; + --architecture) + architecture=$2 + shift 2 + ;; + --framework) + framework=$2 + shift 2 + ;; + --compilationmode) + compilation_mode=$2 + shift 2 + ;; + --repository) + repository=$2 + shift 2 + ;; + --branch) + branch=$2 + shift 2 + ;; + --commitsha) + commit_sha=$2 + shift 2 + ;; + --buildnumber) + build_number=$2 + shift 2 + ;; + --kind) + kind=$2 + shift 2 + ;; + --runcategories) + run_categories=$2 + shift 2 + ;; + --csproj) + csproj=$2 + shift 2 + ;; + --internal) + internal=true + shift 1 + ;; + --configurations) + configurations=$2 + shift 2 + ;; + --help) + echo "Common settings:" + echo " --corerootdirectory Directory where Core_Root exists, if running perf testing with --corerun" + echo " --architecture Architecture of the testing being run" + echo " --configurations List of key=value pairs that will be passed to perf testing infrastructure." + echo " ex: --configurations \"CompilationMode=Tiered OptimzationLevel=PGO\"" + echo " --help Print help and exit" + echo "" + echo "Advanced settings:" + echo " --framework The framework to run, if not running in master" + echo " --compliationmode The compilation mode if not passing --configurations" + echo " --sourcedirectory The directory of the sources. Defaults to env:BUILD_SOURCESDIRECTORY" + echo " --repository The name of the repository in the / format. Defaults to env:BUILD_REPOSITORY_NAME" + echo " --branch The name of the branch. Defaults to env:BUILD_SOURCEBRANCH" + echo " --commitsha The commit sha1 to run against. Defaults to env:BUILD_SOURCEVERSION" + echo " --buildnumber The build number currently running. Defaults to env:BUILD_BUILDNUMBER" + echo " --csproj The relative path to the benchmark csproj whose tests should be run. Defaults to src\benchmarks\micro\MicroBenchmarks.csproj" + echo " --kind Related to csproj. The kind of benchmarks that should be run. Defaults to micro" + echo " --runcategories Related to csproj. Categories of benchmarks to run. Defaults to \"coreclr corefx\"" + echo " --internal If the benchmarks are running as an official job." + echo "" + exit 0 + ;; + esac +done + +if [[ "$repository" == "dotnet/performance" ]]; then + run_from_perf_repo=true +fi + +if [ -z "$configurations" ]; then + configurations="CompliationMode=$compilation_mode" +fi + +if [ -z "$core_root_directory" ]; then + use_core_run=false +fi + +payload_directory=$source_directory/Payload +performance_directory=$payload_directory/performance +workitem_directory=$source_directory/workitem +extra_benchmark_dotnet_arguments="--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --stopOnFirstError true" +perflab_arguments= +queue=Ubuntu.1804.Amd64.Open +creator=$BUILD_DEFINITIONNAME +helix_source_prefix="pr" + +if [[ "$internal" == true ]]; then + perflab_arguments="--upload-to-perflab-container" + helix_source_prefix="official" + creator= + extra_benchmark_dotnet_arguments= + + if [[ "$architecture" = "arm64" ]]; then + queue=Ubuntu.1804.Arm64.Perf + else + queue=Ubuntu.1804.Amd64.Perf + fi +fi + +common_setup_arguments="--frameworks $framework --queue $queue --build-number $build_number --build-configs $configurations" +setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments" + +if [[ "$run_from_perf_repo" = true ]]; then + payload_directory= + workitem_directory=$source_directory + performance_directory=$workitem_directory + setup_arguments="--perf-hash $commit_sha $common_setup_arguments" +else + git clone --branch master --depth 1 --quiet https://github.com/dotnet/performance $performance_directory + + docs_directory=$performance_directory/docs + mv $docs_directory $workitem_directory +fi + +if [[ "$use_core_run" = true ]]; then + new_core_root=$payload_directory/Core_Root + mv $core_root_directory $new_core_root +fi + +# Make sure all of our variables are available for future steps +echo "##vso[task.setvariable variable=UseCoreRun]$use_core_run" +echo "##vso[task.setvariable variable=Architecture]$architecture" +echo "##vso[task.setvariable variable=PayloadDirectory]$payload_directory" +echo "##vso[task.setvariable variable=PerformanceDirectory]$performance_directory" +echo "##vso[task.setvariable variable=WorkItemDirectory]$workitem_directory" +echo "##vso[task.setvariable variable=Queue]$queue" +echo "##vso[task.setvariable variable=SetupArguments]$setup_arguments" +echo "##vso[task.setvariable variable=Python]python3" +echo "##vso[task.setvariable variable=PerfLabArguments]$perflab_arguments" +echo "##vso[task.setvariable variable=ExtraBenchmarkDotNetArguments]$extra_benchmark_dotnet_arguments" +echo "##vso[task.setvariable variable=BDNCategories]$run_categories" +echo "##vso[task.setvariable variable=TargetCsproj]$csproj" +echo "##vso[task.setvariable variable=RunFromPerfRepo]$run_from_perf_repo" +echo "##vso[task.setvariable variable=Creator]$creator" +echo "##vso[task.setvariable variable=HelixSourcePrefix]$helix_source_prefix" +echo "##vso[task.setvariable variable=Kind]$kind" +echo "##vso[task.setvariable variable=_BuildConfig]$architecture.$kind.$framework" \ No newline at end of file diff --git a/eng/common/pipeline-logging-functions.ps1 b/eng/common/pipeline-logging-functions.ps1 index 7b61376f8aa..af5f48aaceb 100644 --- a/eng/common/pipeline-logging-functions.ps1 +++ b/eng/common/pipeline-logging-functions.ps1 @@ -77,13 +77,14 @@ function Write-PipelineTaskError { [string]$Name, [string]$Value, [switch]$Secret, - [switch]$AsOutput) - + [switch]$AsOutput, + [bool]$IsMultiJobVariable=$true) + if($ci) { Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ 'variable' = $Name 'isSecret' = $Secret - 'isOutput' = 'true' + 'isOutput' = $IsMultiJobVariable } -AsOutput:$AsOutput } } diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1 index db8a839457a..1a91dab0371 100644 --- a/eng/common/post-build/trigger-subscriptions.ps1 +++ b/eng/common/post-build/trigger-subscriptions.ps1 @@ -19,14 +19,14 @@ function Get-Headers([string]$accept, [string]$barToken) { } # Get all the $SourceRepo subscriptions -$normalizedSurceRepo = $SourceRepo.Replace('dnceng@', '') -$getSubscriptionsApiEndpoint = "$maestroEndpoint/api/subscriptions?sourceRepository=$normalizedSurceRepo&api-version=$apiVersion" +$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '') +$getSubscriptionsApiEndpoint = "$maestroEndpoint/api/subscriptions?sourceRepository=$normalizedSourceRepo&api-version=$apiVersion" $headers = Get-Headers 'application/json' $barToken $subscriptions = Invoke-WebRequest -Uri $getSubscriptionsApiEndpoint -Headers $headers | ConvertFrom-Json if (!$subscriptions) { - Write-Host "No subscriptions found for source repo '$normalizedSurceRepo' in channel '$ChannelId'" + Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'" return } diff --git a/eng/common/templates/job/performance.yml b/eng/common/templates/job/performance.yml new file mode 100644 index 00000000000..ef809253d1a --- /dev/null +++ b/eng/common/templates/job/performance.yml @@ -0,0 +1,93 @@ +parameters: + steps: [] # optional -- any additional steps that need to happen before pulling down the performance repo and sending the performance benchmarks to helix (ie building your repo) + variables: [] # optional -- list of additional variables to send to the template + jobName: '' # required -- job name + displayName: '' # optional -- display name for the job. Will use jobName if not passed + pool: '' # required -- name of the Build pool + container: '' # required -- name of the container + extraSetupParameters: '' # optional -- extra arguments to pass to the setup script + frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against + continueOnError: 'false' # optional -- determines whether to continue the build if the step errors + dependsOn: '' # optional -- dependencies of the job + timeoutInMinutes: 320 # optional -- timeout for the job + enableTelemetry: false # optional -- enable for telemetry + +jobs: +- template: ../jobs/jobs.yml + parameters: + dependsOn: ${{ parameters.dependsOn }} + enableTelemetry: ${{ parameters.enableTelemetry }} + enablePublishBuildArtifacts: true + continueOnError: ${{ parameters.continueOnError }} + + jobs: + - job: '${{ parameters.jobName }}' + + ${{ if ne(parameters.displayName, '') }}: + displayName: '${{ parameters.displayName }}' + ${{ if eq(parameters.displayName, '') }}: + displayName: '${{ parameters.jobName }}' + + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + + variables: + + - ${{ each variable in parameters.variables }}: + - ${{ if ne(variable.name, '') }}: + - name: ${{ variable.name }} + value: ${{ variable.value }} + - ${{ if ne(variable.group, '') }}: + - group: ${{ variable.group }} + + - IsInternal: '' + - HelixApiAccessToken: '' + - HelixPreCommand: '' + + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if eq(variables['Agent.Os'], 'Windows_NT') }}: + - HelixPreCommand: 'set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"' + - IsInternal: -Internal + - ${{ if ne(variables['Agent.Os'], 'Windows_NT') }}: + - HelixPreCommand: 'export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' + - IsInternal: --internal + - group: DotNet-HelixApi-Access + - group: dotnet-benchview + + workspace: + clean: all + pool: + ${{ parameters.pool }} + container: ${{ parameters.container }} + strategy: + matrix: + ${{ each framework in parameters.frameworks }}: + ${{ framework }}: + _Framework: ${{ framework }} + steps: + - checkout: self + clean: true + # Run all of the steps to setup repo + - ${{ each step in parameters.steps }}: + - ${{ step }} + - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal) -Framework $(_Framework) ${{ parameters.extraSetupParameters }} + displayName: Performance Setup (Windows) + condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal) --framework $(_Framework) ${{ parameters.extraSetupParameters }} + displayName: Performance Setup (Unix) + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) + displayName: Run ci setup script + # Run perf testing in helix + - template: /eng/common/templates/steps/perf-send-to-helix.yml + parameters: + HelixSource: '$(HelixSourcePrefix)/$(Build.Repository.Name)/$(Build.SourceBranch)' # sources must start with pr/, official/, prodcon/, or agent/ + HelixType: 'test/performance/$(Kind)/$(_Framework)/$(Architecture)' + HelixAccessToken: $(HelixApiAccessToken) + HelixTargetQueues: $(Queue) + HelixPreCommands: $(HelixPreCommand) + Creator: $(Creator) + WorkItemTimeout: 4:00 # 4 hours + WorkItemDirectory: '$(WorkItemDirectory)' # WorkItemDirectory can not be empty, so we send it some docs to keep it happy + CorrelationPayloadDirectory: '$(PayloadDirectory)' # it gets checked out to a folder with shorter path than WorkItemDirectory so we can avoid file name too long exceptions \ No newline at end of file diff --git a/eng/common/templates/post-build/channels/internal-servicing.yml b/eng/common/templates/post-build/channels/internal-servicing.yml index 808d46b17f2..50ad724fc0c 100644 --- a/eng/common/templates/post-build/channels/internal-servicing.yml +++ b/eng/common/templates/post-build/channels/internal-servicing.yml @@ -81,10 +81,10 @@ stages: /p:IsInternalBuild=$(IsInternalBuild) /p:RepositoryName=$(Build.Repository.Name) /p:CommitSha=$(Build.SourceVersion) + /p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName) + /p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1) + /p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url) /p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)' - /p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' /p:BARBuildId=$(BARBuildId) /p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com' /p:BuildAssetRegistryToken='$(MaestroAccessToken)' @@ -167,4 +167,4 @@ stages: - template: ../promote-build.yml parameters: - ChannelId: ${{ variables.InternalServicing_30_Channel_Id }} \ No newline at end of file + ChannelId: ${{ variables.InternalServicing_30_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/public-dev-release.yml b/eng/common/templates/post-build/channels/public-dev-release.yml index 94a767bb857..47cc2125450 100644 --- a/eng/common/templates/post-build/channels/public-dev-release.yml +++ b/eng/common/templates/post-build/channels/public-dev-release.yml @@ -77,6 +77,7 @@ stages: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet /p:ChannelId=$(PublicDevRelease_30_Channel_Id) + /p:ArtifactsCategory=.NetCore /p:IsStableBuild=$(IsStableBuild) /p:IsInternalBuild=$(IsInternalBuild) /p:RepositoryName=$(Build.Repository.Name) diff --git a/eng/common/templates/post-build/channels/public-release.yml b/eng/common/templates/post-build/channels/public-release.yml index 25923020df8..574cb1c2b92 100644 --- a/eng/common/templates/post-build/channels/public-release.yml +++ b/eng/common/templates/post-build/channels/public-release.yml @@ -81,10 +81,10 @@ stages: /p:IsInternalBuild=$(IsInternalBuild) /p:RepositoryName=$(Build.Repository.Name) /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(Agent.BuildDirectory)/Nuget/NuGet.exe - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)' - /p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' + /p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName) + /p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1) + /p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url) + /p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe /p:BARBuildId=$(BARBuildId) /p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com' /p:BuildAssetRegistryToken='$(MaestroAccessToken)' 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 114477d3adb..f12f402ad9a 100644 --- a/eng/common/templates/post-build/channels/public-validation-release.yml +++ b/eng/common/templates/post-build/channels/public-validation-release.yml @@ -48,6 +48,7 @@ stages: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet /p:ChannelId=$(PublicValidationRelease_30_Channel_Id) + /p:ArtifactsCategory=.NetCoreValidation /p:IsStableBuild=$(IsStableBuild) /p:IsInternalBuild=$(IsInternalBuild) /p:RepositoryName=$(Build.Repository.Name) diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index 82834673520..42df4ae77e3 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -14,5 +14,8 @@ variables: # Whether the build is internal or not IsInternalBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} + # Storage account name for proxy-backed feeds + ProxyBackedFeedsAccountName: dotnetfeed + SourceLinkCLIVersion: 3.0.0 SymbolToolVersion: 1.0.1 diff --git a/eng/common/templates/steps/perf-send-to-helix.yml b/eng/common/templates/steps/perf-send-to-helix.yml new file mode 100644 index 00000000000..b3ea9acf1f1 --- /dev/null +++ b/eng/common/templates/steps/perf-send-to-helix.yml @@ -0,0 +1,66 @@ +# Please remember to update the documentation if you make changes to these parameters! +parameters: + HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ + HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' + HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number + HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues + HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group + HelixPreCommands: '' # optional -- commands to run before Helix work item execution + HelixPostCommands: '' # optional -- commands to run after Helix work item execution + WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects + CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload + IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion + DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json + DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json + EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control + WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." + Creator: '' # optional -- if the build is external, use this to specify who is sending the job + DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO + condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() + continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false + +steps: + - powershell: $(Build.SourcesDirectory)\eng\common\msbuild.ps1 $(Build.SourcesDirectory)\eng\common\performance\perfhelixpublish.proj /restore /t:Test /bl:$(Build.SourcesDirectory)\artifacts\log\$env:BuildConfig\SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} (Windows) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/performance/perfhelixpublish.proj /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} (Unix) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 60741f03901..9abaac015fb 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -84,7 +84,7 @@ function Exec-Process([string]$command, [string]$commandArgs) { return $global:LASTEXITCODE = $process.ExitCode } finally { - # If we didn't finish then an error occured or the user hit ctrl-c. Either + # If we didn't finish then an error occurred or the user hit ctrl-c. Either # way kill the process if (-not $finished) { $process.Kill() @@ -147,7 +147,7 @@ function InitializeDotNetCli([bool]$install) { # It also ensures that VS msbuild will use the downloaded sdk targets. $env:PATH = "$dotnetRoot;$env:PATH" - # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build + # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build Write-PipelinePrependPath -Path $dotnetRoot Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0' Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1' diff --git a/global.json b/global.json index 4c66387e58e..60dbe5efe92 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19359.6", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19360.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From ef339d51795a130ee55bf8af118c730627cb5ec0 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 12 Jul 2019 09:49:49 -0700 Subject: [PATCH 05/63] wip --- FSharp.Profiles.props | 4 ++++ .../FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj | 2 +- src/fsharp/service/ServiceInterfaceStubGenerator.fs | 7 ++----- src/fsharp/service/ServiceInterfaceStubGenerator.fsi | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/FSharp.Profiles.props b/FSharp.Profiles.props index 6b473ce7eea..094b5ac69fd 100644 --- a/FSharp.Profiles.props +++ b/FSharp.Profiles.props @@ -19,7 +19,11 @@ $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION $(DefineConstants);FX_NO_WIN_REGISTRY $(DefineConstants);FX_NO_WINFORMS +<<<<<<< HEAD $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER +======= + $(DefineConstants);FX_REDUCED_EXCEPTIONS +>>>>>>> wip $(DefineConstants);FX_RESHAPED_REFEMIT $(DefineConstants);FX_RESHAPED_MSBUILD $(OtherFlags) --simpleresolution diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index e6e08434db6..328cf848663 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -4,7 +4,7 @@ Library - net472;netstandard2.0 + netstandard2.0 netstandard2.0 FSharp.Compiler.Private $(NoWarn);45;55;62;75;1204 diff --git a/src/fsharp/service/ServiceInterfaceStubGenerator.fs b/src/fsharp/service/ServiceInterfaceStubGenerator.fs index d6e46783e74..765d8304a38 100644 --- a/src/fsharp/service/ServiceInterfaceStubGenerator.fs +++ b/src/fsharp/service/ServiceInterfaceStubGenerator.fs @@ -3,6 +3,8 @@ namespace FSharp.Compiler.SourceCodeServices open System +open System.IO +open System.CodeDom.Compiler open System.Diagnostics open FSharp.Compiler open FSharp.Compiler.Ast @@ -10,12 +12,8 @@ open FSharp.Compiler.Range open FSharp.Compiler.SourceCodeServices open FSharp.Compiler.AbstractIL.Internal.Library -#if !FX_NO_INDENTED_TEXT_WRITER [] module internal CodeGenerationUtils = - open System.IO - open System.CodeDom.Compiler - type ColumnIndentedTextWriter() = let stringWriter = new StringWriter() @@ -918,4 +916,3 @@ module InterfaceStubGenerator = None | ParsedInput.ImplFile input -> walkImplFileInput input -#endif diff --git a/src/fsharp/service/ServiceInterfaceStubGenerator.fsi b/src/fsharp/service/ServiceInterfaceStubGenerator.fsi index 4212449408f..74323b7c42a 100644 --- a/src/fsharp/service/ServiceInterfaceStubGenerator.fsi +++ b/src/fsharp/service/ServiceInterfaceStubGenerator.fsi @@ -6,7 +6,6 @@ open FSharp.Compiler.Ast open FSharp.Compiler.Range open FSharp.Compiler.SourceCodeServices -#if !FX_NO_INDENTED_TEXT_WRITER /// Capture information about an interface in ASTs [] type InterfaceData = @@ -38,4 +37,3 @@ module InterfaceStubGenerator = /// Find corresponding interface declaration at a given position val tryFindInterfaceDeclaration: pos -> parsedInput: ParsedInput -> InterfaceData option -#endif From 04c8453036ec359f4f304a6add81f8d2c956fb2a Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 12 Jul 2019 10:09:55 -0700 Subject: [PATCH 06/63] wip --- .../Microsoft.FSharp.Compiler.MSBuild.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj index cc9d75a2887..d3d87317e95 100644 --- a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj +++ b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj @@ -51,7 +51,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\%(_XlfLanguages.Identity)" file source="$(ArtifactsBinDir)FSharp.Build\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Build.resources.dll" file source="$(ArtifactsBinDir)FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Interactive.Settings.resources.dll" - file source="$(ArtifactsBinDir)FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Private.resources.dll" + file source="$(ArtifactsBinDir)FSharp.Compiler.Private\$(Configuration)\netstandard2.0\%(_XlfLanguages.Identity)\FSharp.Compiler.Private.resources.dll" file source="$(ArtifactsBinDir)FSharp.Core\$(Configuration)\net45\%(_XlfLanguages.Identity)\FSharp.Core.resources.dll" ]]> @@ -93,7 +93,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp" file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsiAnyCpu.exe" file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe.config" file source="$(BinariesFolder)\FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Interactive.Settings.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\netstandard2.0\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Compiler.Server.Shared\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.optdata" @@ -106,7 +106,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.Utilities.Core.dll" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Portable.FSharp.Targets" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\System.Collections.Immutable.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\System.Reflection.Metadata.dll" + file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\netstandard2.0\System.Reflection.Metadata.dll" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.NetSdk.props" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.NetSdk.targets" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.Overrides.NetSdk.targets" From 72812eb08866f11da0ed5c38f68a6cf02fe53e62 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 12 Jul 2019 13:31:52 -0700 Subject: [PATCH 07/63] WIP --- .../Microsoft.FSharp.Compiler.MSBuild.csproj | 7 ---- .../FSharp.Compiler.Private.fsproj | 33 +------------------ 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj index d3d87317e95..325886de242 100644 --- a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj +++ b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj @@ -100,13 +100,6 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp" file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.sigdata" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\FSharp.Build.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(NuGetPackageRoot)\Microsoft.VisualFSharp.Type.Providers.Redist\$(MicrosoftVisualFSharpTypeProvidersRedistVersion)\content\$(FSharpDataTypeProvidersVersion)\FSharp.Data.TypeProviders.dll" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.dll" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.Framework.dll" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.Tasks.Core.dll" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.Utilities.Core.dll" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Portable.FSharp.Targets" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\System.Collections.Immutable.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\netstandard2.0\System.Reflection.Metadata.dll" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.NetSdk.props" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.NetSdk.targets" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.Overrides.NetSdk.targets" diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index 328cf848663..d56042a03eb 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -5,7 +5,6 @@ Library netstandard2.0 - netstandard2.0 FSharp.Compiler.Private $(NoWarn);45;55;62;75;1204 true @@ -16,28 +15,10 @@ true - - true - - true - - - $(BaseOutputPath)\$(Configuration)\$(TargetFramework) - - - - - - - - - - - @@ -704,20 +685,8 @@ - - - - - - - - - - - - - + From 7043092200011602a326e806d156e6110732176e Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 22 Jul 2019 13:21:47 -0700 Subject: [PATCH 08/63] Feedback --- .../Microsoft.FSharp.Compiler.MSBuild.csproj | 4 ++-- .../FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj index 325886de242..f504be423eb 100644 --- a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj +++ b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj @@ -51,7 +51,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\%(_XlfLanguages.Identity)" file source="$(ArtifactsBinDir)FSharp.Build\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Build.resources.dll" file source="$(ArtifactsBinDir)FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Interactive.Settings.resources.dll" - file source="$(ArtifactsBinDir)FSharp.Compiler.Private\$(Configuration)\netstandard2.0\%(_XlfLanguages.Identity)\FSharp.Compiler.Private.resources.dll" + file source="$(ArtifactsBinDir)FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Private.resources.dll" file source="$(ArtifactsBinDir)FSharp.Core\$(Configuration)\net45\%(_XlfLanguages.Identity)\FSharp.Core.resources.dll" ]]> @@ -93,7 +93,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp" file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsiAnyCpu.exe" file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe.config" file source="$(BinariesFolder)\FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Interactive.Settings.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\netstandard2.0\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Compiler.Server.Shared\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.optdata" diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index d56042a03eb..aea80160d63 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -4,7 +4,7 @@ Library - netstandard2.0 + netstandard2.0 FSharp.Compiler.Private $(NoWarn);45;55;62;75;1204 true From fad8d8701904f9fec68228f6e3c07fbc7ed31c1a Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 22 Jul 2019 13:43:10 -0700 Subject: [PATCH 09/63] progress --- vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj index 68b8b5e1122..9d2eb32e86f 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj @@ -82,7 +82,7 @@ All 2 True - TargetFramework=$(DependencyTargetFramework) + TargetFramework=netstandard2.0 {DED3BBD7-53F4-428A-8C9F-27968E768605} From c76f6be09203664973aca3ebce3023722d1c5a6a Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 22 Jul 2019 15:29:50 -0700 Subject: [PATCH 10/63] simplify defineconstants --- .../FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index aea80160d63..d6f13be8e13 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -8,9 +8,7 @@ FSharp.Compiler.Private $(NoWarn);45;55;62;75;1204 true - $(DefineConstants);COMPILER - $(DefineConstants);MSBUILD_AT_LEAST_15 - $(DefineConstants);LOCALIZATION_FCOMP + $(DefineConstants);COMPILER;MSBUILD_AT_LEAST_15; $(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1 true From b79635f1859ecb68813ae16fb7542900f90051ec Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 22 Jul 2019 16:43:46 -0700 Subject: [PATCH 11/63] More progress --- eng/build-utils.ps1 | 2 +- .../Microsoft.FSharp.Compiler.MSBuild.csproj | 4 ++-- src/fsharp/FSharp.Build/FSharp.Build.fsproj | 2 +- src/fsharp/fsc/fsc.fsproj | 2 +- src/fsharp/fsi/fsi.fsproj | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1 index fcda1a58e26..05a86f09b32 100644 --- a/eng/build-utils.ps1 +++ b/eng/build-utils.ps1 @@ -243,7 +243,7 @@ function Make-BootstrapBuild() { # 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:ProtoTargetFramework=$bootstrapTfm" -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/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj index f504be423eb..325886de242 100644 --- a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj +++ b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj @@ -51,7 +51,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\%(_XlfLanguages.Identity)" file source="$(ArtifactsBinDir)FSharp.Build\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Build.resources.dll" file source="$(ArtifactsBinDir)FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Interactive.Settings.resources.dll" - file source="$(ArtifactsBinDir)FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Private.resources.dll" + file source="$(ArtifactsBinDir)FSharp.Compiler.Private\$(Configuration)\netstandard2.0\%(_XlfLanguages.Identity)\FSharp.Compiler.Private.resources.dll" file source="$(ArtifactsBinDir)FSharp.Core\$(Configuration)\net45\%(_XlfLanguages.Identity)\FSharp.Core.resources.dll" ]]> @@ -93,7 +93,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp" file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsiAnyCpu.exe" file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe.config" file source="$(BinariesFolder)\FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Interactive.Settings.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\netstandard2.0\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Compiler.Server.Shared\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.optdata" diff --git a/src/fsharp/FSharp.Build/FSharp.Build.fsproj b/src/fsharp/FSharp.Build/FSharp.Build.fsproj index 76b9c7043e9..e7fe7891248 100644 --- a/src/fsharp/FSharp.Build/FSharp.Build.fsproj +++ b/src/fsharp/FSharp.Build/FSharp.Build.fsproj @@ -4,7 +4,7 @@ Library - $(ProtoTargetFramework) + $(ProtoTargetFramework) net472;netcoreapp2.1 netcoreapp2.1 FSharp.Build diff --git a/src/fsharp/fsc/fsc.fsproj b/src/fsharp/fsc/fsc.fsproj index 7bddcb9dfd3..7d72d29e85b 100644 --- a/src/fsharp/fsc/fsc.fsproj +++ b/src/fsharp/fsc/fsc.fsproj @@ -4,7 +4,7 @@ Exe - $(ProtoTargetFramework) + $(ProtoTargetFramework) net472;netcoreapp2.1 netcoreapp2.1 .exe diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj index 5b4978679b2..9d3b879cadc 100644 --- a/src/fsharp/fsi/fsi.fsproj +++ b/src/fsharp/fsi/fsi.fsproj @@ -4,7 +4,7 @@ Exe - $(ProtoTargetFramework) + $(ProtoTargetFramework) net472;netcoreapp2.1 netcoreapp2.1 .exe From acedd565128e1c28a1580843a2adab09c896b696 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 16:52:11 -0700 Subject: [PATCH 12/63] no FS_RESHAPED_REFLECTION --- FSharp.Profiles.props | 5 +---- src/absil/illib.fs | 4 +++- src/absil/ilwrite.fs | 1 + src/fsharp/FSharp.Core/prim-types.fs | 6 +++++- src/fsharp/FSharp.Core/quotations.fs | 2 +- src/fsharp/FSharp.Core/reflect.fs | 2 -- src/fsharp/FSharp.Core/seq.fs | 1 - src/utils/sformat.fs | 12 ++++-------- src/utils/sformat.fsi | 1 - .../Microsoft.FSharp.Reflection/FSharpReflection.fs | 2 +- tests/FSharp.Core.UnitTests/LibraryTestFx.fs | 2 +- tests/fsharp/core/quotes/test.fsx | 12 ++++++++++++ tests/fsharp/core/subtype/test.fsx | 3 +++ 13 files changed, 32 insertions(+), 21 deletions(-) diff --git a/FSharp.Profiles.props b/FSharp.Profiles.props index 094b5ac69fd..dbb87ef8c14 100644 --- a/FSharp.Profiles.props +++ b/FSharp.Profiles.props @@ -19,12 +19,9 @@ $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION $(DefineConstants);FX_NO_WIN_REGISTRY $(DefineConstants);FX_NO_WINFORMS -<<<<<<< HEAD - $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER -======= $(DefineConstants);FX_REDUCED_EXCEPTIONS ->>>>>>> wip $(DefineConstants);FX_RESHAPED_REFEMIT + $(DefineConstants);FX_RESHAPED_GLOBALIZATION $(DefineConstants);FX_RESHAPED_MSBUILD $(OtherFlags) --simpleresolution diff --git a/src/absil/illib.fs b/src/absil/illib.fs index 68b7c8d40a8..d6062bb451d 100644 --- a/src/absil/illib.fs +++ b/src/absil/illib.fs @@ -253,7 +253,10 @@ module Option = let attempt (f: unit -> 'T) = try Some (f()) with _ -> None module List = +<<<<<<< HEAD +======= +>>>>>>> no FS_RESHAPED_REFLECTION let sortWithOrder (c: IComparer<'T>) elements = List.sortWith (Order.toFunction c) elements let splitAfter n l = @@ -1261,7 +1264,6 @@ type LayeredMultiMap<'Key, 'Value when 'Key : equality and 'Key : comparison>(co [] module Shim = - type IFileSystem = /// A shim over File.ReadAllBytes diff --git a/src/absil/ilwrite.fs b/src/absil/ilwrite.fs index 38f9fcfe39f..b94c80866a5 100644 --- a/src/absil/ilwrite.fs +++ b/src/absil/ilwrite.fs @@ -3035,6 +3035,7 @@ module FileSystemUtilites = open System open System.Reflection open System.Globalization + let progress = try System.Environment.GetEnvironmentVariable("FSharp_DebugSetFilePermissions") <> null with _ -> false let setExecutablePermission (filename: string) = diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs index a656e8e8088..2baedc58552 100644 --- a/src/fsharp/FSharp.Core/prim-types.fs +++ b/src/fsharp/FSharp.Core/prim-types.fs @@ -527,6 +527,10 @@ namespace Microsoft.FSharp.Core (# "throw" (e :> System.Exception) : nativeptr<'T> #) open IntrinsicOperators +<<<<<<< HEAD +======= + +>>>>>>> no FS_RESHAPED_REFLECTION [] // nested module OK module IntrinsicFunctions = @@ -4483,7 +4487,7 @@ namespace Microsoft.FSharp.Core module OperatorIntrinsics = open System.Collections - + let notStarted() = raise (new System.InvalidOperationException(SR.GetString(SR.enumerationNotStarted))) let alreadyFinished() = raise (new System.InvalidOperationException(SR.GetString(SR.enumerationAlreadyFinished))) diff --git a/src/fsharp/FSharp.Core/quotations.fs b/src/fsharp/FSharp.Core/quotations.fs index 974e32c7678..8507104169a 100644 --- a/src/fsharp/FSharp.Core/quotations.fs +++ b/src/fsharp/FSharp.Core/quotations.fs @@ -1127,7 +1127,7 @@ module Patterns = let argtyps : Type list = argTypes |> inst tyargs let retType : Type = retType |> inst tyargs |> removeVoid typ.GetProperty(propName, staticOrInstanceBindingFlags, null, retType, Array.ofList argtyps, null) |> checkNonNullResult ("propName", String.Format(SR.GetString(SR.QfailedToBindProperty), propName)) // fxcop may not see "propName" as an arg - + let bindField (tc, fldName, tyargs) = let typ = mkNamedType (tc, tyargs) typ.GetField(fldName, staticOrInstanceBindingFlags) |> checkNonNullResult ("fldName", String.Format(SR.GetString(SR.QfailedToBindField), fldName)) // fxcop may not see "fldName" as an arg diff --git a/src/fsharp/FSharp.Core/reflect.fs b/src/fsharp/FSharp.Core/reflect.fs index f9e0a9daa8e..23dd7af2899 100644 --- a/src/fsharp/FSharp.Core/reflect.fs +++ b/src/fsharp/FSharp.Core/reflect.fs @@ -26,7 +26,6 @@ module internal ReflectionUtils = [] module internal Impl = - let getBindingFlags allowAccess = ReflectionUtils.toBindingFlags (defaultArg allowAccess false) let inline checkNonNull argName (v: 'T) = @@ -62,7 +61,6 @@ module internal Impl = match getInstancePropertyInfo(typ, propName, bindingFlags) with | null -> None | prop -> Some(fun (obj: obj) -> prop.GetValue (obj, instancePropertyFlags ||| bindingFlags, null, null, null)) - //----------------------------------------------------------------- // ATTRIBUTE DECOMPILATION diff --git a/src/fsharp/FSharp.Core/seq.fs b/src/fsharp/FSharp.Core/seq.fs index 97326e7315a..25551484c65 100644 --- a/src/fsharp/FSharp.Core/seq.fs +++ b/src/fsharp/FSharp.Core/seq.fs @@ -1159,7 +1159,6 @@ namespace Microsoft.FSharp.Collections [] let countBy (projection:'T->'Key) (source:seq<'T>) = checkNonNull "source" source - if typeof<'Key>.IsValueType then mkDelayedSeq (fun () -> countByValueType projection source) else mkDelayedSeq (fun () -> countByRefType projection source) diff --git a/src/utils/sformat.fs b/src/utils/sformat.fs index 0c8cc5fc2f4..f8095620dbb 100644 --- a/src/utils/sformat.fs +++ b/src/utils/sformat.fs @@ -386,7 +386,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // Analyze an object to see if it the representation // of an F# value. - let GetValueInfoOfObject (bindingFlags:BindingFlags) (obj : obj) = + let GetValueInfoOfObject (bindingFlags:BindingFlags) (obj : obj) = match obj with | null -> ObjectValue(obj) | _ -> @@ -454,7 +454,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let string_of_int (i:int) = i.ToString() let typeUsesSystemObjectToString (ty:System.Type) = - try + try let methInfo = ty.GetMethod("ToString",BindingFlags.Public ||| BindingFlags.Instance,null,[| |],null) methInfo.DeclaringType = typeof with e -> false @@ -1127,7 +1127,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let basicL = LayoutOps.objL obj // This buries an obj in the layout, rendered at squash time via a leafFormatter. // If the leafFormatter was directly here, then layout leaves could store strings. match obj with - | _ when opts.ShowProperties -> + | _ when opts.ShowProperties -> let props = ty.GetProperties(BindingFlags.GetField ||| BindingFlags.Instance ||| BindingFlags.Public) let fields = ty.GetFields(BindingFlags.Instance ||| BindingFlags.Public) |> Array.map (fun i -> i :> MemberInfo) let propsAndFields = @@ -1143,11 +1143,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // massively reign in deep printing of properties let nDepth = depthLim/10 -#if NETSTANDARD - Array.Sort((propsAndFields),{ new IComparer with member this.Compare(p1,p2) = compare (p1.Name) (p2.Name) } ) -#else - Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } ) -#endif + Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } ); if propsAndFields.Length = 0 || (nDepth <= 0) then basicL else basicL --- diff --git a/src/utils/sformat.fsi b/src/utils/sformat.fsi index e6ff9762bb5..a3f722afdbc 100644 --- a/src/utils/sformat.fsi +++ b/src/utils/sformat.fsi @@ -336,7 +336,6 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl val output_any: writer:TextWriter -> value:'T * Type -> unit #if FSHARP_CORE // FSharp.Core.dll: Most functions aren't needed in FSharp.Core.dll, but we add one entry for printf - val anyToStringForPrintf: options:FormatOptions -> bindingFlags:System.Reflection.BindingFlags -> value:'T * Type -> string #else val asTaggedTextWriter: writer: TextWriter -> TaggedTextWriter diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs index 21df908745d..8bbc20da6ff 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs @@ -1032,7 +1032,7 @@ type FSharpTypeTests() = // Regression for 5588, Reflection: unit is still treated as a record type, but only if you pass BindingFlags.NonPublic [] - member __.``IsRecord.Regression5588``() = + member __.``IsRecord.Regression5588``() = // negative Assert.IsFalse(FSharpType.IsRecord(typeof)) Assert.IsFalse( FSharpType.IsRecord(typeof, System.Reflection.BindingFlags.NonPublic) ) diff --git a/tests/FSharp.Core.UnitTests/LibraryTestFx.fs b/tests/FSharp.Core.UnitTests/LibraryTestFx.fs index 77a9b2a3e60..8cfc6e16f4a 100644 --- a/tests/FSharp.Core.UnitTests/LibraryTestFx.fs +++ b/tests/FSharp.Core.UnitTests/LibraryTestFx.fs @@ -67,7 +67,7 @@ module SurfaceArea = // get current FSharp.Core let asm = typeof.Assembly - + // public types only let types = asm.GetExportedTypes() diff --git a/tests/fsharp/core/quotes/test.fsx b/tests/fsharp/core/quotes/test.fsx index 8be5e210971..46279396ba5 100644 --- a/tests/fsharp/core/quotes/test.fsx +++ b/tests/fsharp/core/quotes/test.fsx @@ -2309,16 +2309,28 @@ module ReflectedDefinitionOnTypesWithImplicitCodeGen = // This type has an implicit IComparable implementation, it is not accessible as a reflected definition type U = A of int | B of string | C of System.DateTime +<<<<<<< HEAD +======= + +>>>>>>> no FS_RESHAPED_REFLECTION for m in typeof.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do check "celnwer33" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true // This type has some implicit codegen exception X of string * int +<<<<<<< HEAD +======= + +>>>>>>> no FS_RESHAPED_REFLECTION for m in typeof.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do check "celnwer34" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true // This type has an implicit IComparable implementation, it is not accessible as a reflected definition [] type SR = { x:int; y:string; z:System.DateTime } +<<<<<<< HEAD +======= + +>>>>>>> no FS_RESHAPED_REFLECTION for m in typeof.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do check "celnwer35" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true diff --git a/tests/fsharp/core/subtype/test.fsx b/tests/fsharp/core/subtype/test.fsx index 9751d03e6e3..afb4753903c 100644 --- a/tests/fsharp/core/subtype/test.fsx +++ b/tests/fsharp/core/subtype/test.fsx @@ -1725,7 +1725,10 @@ module InliningOnSubTypes1 = (x1, x2) do check "clkewlijwlkw" (f()) (13, 17) +<<<<<<< HEAD +======= +>>>>>>> no FS_RESHAPED_REFLECTION module StructUnionSingleCase = [] type S = S From cc011408bfe5f2619b826892056d43b960133ae0 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 16:57:15 -0700 Subject: [PATCH 13/63] more remove FX_RESHAPED_REFLECTION --- .../FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj | 3 +++ src/utils/sformat.fsi | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index d6f13be8e13..577fdde30f1 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -42,6 +42,9 @@ Logger.fs + + Reflection\reshapedmsbuild.fs + ErrorText\sformat.fsi diff --git a/src/utils/sformat.fsi b/src/utils/sformat.fsi index a3f722afdbc..ca392b3802d 100644 --- a/src/utils/sformat.fsi +++ b/src/utils/sformat.fsi @@ -337,14 +337,13 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl #if FSHARP_CORE // FSharp.Core.dll: Most functions aren't needed in FSharp.Core.dll, but we add one entry for printf val anyToStringForPrintf: options:FormatOptions -> bindingFlags:System.Reflection.BindingFlags -> value:'T * Type -> string -#else +#endif val asTaggedTextWriter: writer: TextWriter -> TaggedTextWriter val any_to_layout : options:FormatOptions -> value:'T * Type -> Layout val squash_layout : options:FormatOptions -> layout:Layout -> Layout val output_layout_tagged : options:FormatOptions -> writer:TaggedTextWriter -> layout:Layout -> unit val output_layout : options:FormatOptions -> writer:TextWriter -> layout:Layout -> unit val layout_as_string: options:FormatOptions -> value:'T * Type -> string -#endif /// Convert any value to a layout using the given formatting options. The /// layout can then be processed using formatting display engines such as From 5b0bb1e0a8120e74500dfe591d00654cef0833dd Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 17:13:23 -0700 Subject: [PATCH 14/63] fixing stuff --- src/fsharp/FSharp.Core/prim-types.fs | 4 ---- src/utils/sformat.fsi | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs index 2baedc58552..86afc2ccf1f 100644 --- a/src/fsharp/FSharp.Core/prim-types.fs +++ b/src/fsharp/FSharp.Core/prim-types.fs @@ -527,10 +527,6 @@ namespace Microsoft.FSharp.Core (# "throw" (e :> System.Exception) : nativeptr<'T> #) open IntrinsicOperators -<<<<<<< HEAD -======= - ->>>>>>> no FS_RESHAPED_REFLECTION [] // nested module OK module IntrinsicFunctions = diff --git a/src/utils/sformat.fsi b/src/utils/sformat.fsi index ca392b3802d..0a4b736341c 100644 --- a/src/utils/sformat.fsi +++ b/src/utils/sformat.fsi @@ -337,7 +337,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl #if FSHARP_CORE // FSharp.Core.dll: Most functions aren't needed in FSharp.Core.dll, but we add one entry for printf val anyToStringForPrintf: options:FormatOptions -> bindingFlags:System.Reflection.BindingFlags -> value:'T * Type -> string -#endif +#else val asTaggedTextWriter: writer: TextWriter -> TaggedTextWriter val any_to_layout : options:FormatOptions -> value:'T * Type -> Layout val squash_layout : options:FormatOptions -> layout:Layout -> Layout @@ -350,7 +350,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl /// those in the LayoutOps module. any_to_string and output_any are /// built using any_to_layout with default format options. val layout_to_string: options:FormatOptions -> layout:Layout -> string - +#endif #if COMPILER val fsi_any_to_layout : options:FormatOptions -> value:'T * Type -> Layout From 0bf729515ef4cc439d043caa1fb8a34814f3aeda Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 17:21:13 -0700 Subject: [PATCH 15/63] more --- src/absil/illib.fs | 4 ---- tests/fsharp/core/quotes/test.fsx | 12 ------------ tests/fsharp/core/subtype/test.fsx | 4 ---- 3 files changed, 20 deletions(-) diff --git a/src/absil/illib.fs b/src/absil/illib.fs index d6062bb451d..dde3ca69e62 100644 --- a/src/absil/illib.fs +++ b/src/absil/illib.fs @@ -253,10 +253,6 @@ module Option = let attempt (f: unit -> 'T) = try Some (f()) with _ -> None module List = -<<<<<<< HEAD - -======= ->>>>>>> no FS_RESHAPED_REFLECTION let sortWithOrder (c: IComparer<'T>) elements = List.sortWith (Order.toFunction c) elements let splitAfter n l = diff --git a/tests/fsharp/core/quotes/test.fsx b/tests/fsharp/core/quotes/test.fsx index 46279396ba5..8be5e210971 100644 --- a/tests/fsharp/core/quotes/test.fsx +++ b/tests/fsharp/core/quotes/test.fsx @@ -2309,28 +2309,16 @@ module ReflectedDefinitionOnTypesWithImplicitCodeGen = // This type has an implicit IComparable implementation, it is not accessible as a reflected definition type U = A of int | B of string | C of System.DateTime -<<<<<<< HEAD -======= - ->>>>>>> no FS_RESHAPED_REFLECTION for m in typeof.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do check "celnwer33" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true // This type has some implicit codegen exception X of string * int -<<<<<<< HEAD -======= - ->>>>>>> no FS_RESHAPED_REFLECTION for m in typeof.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do check "celnwer34" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true // This type has an implicit IComparable implementation, it is not accessible as a reflected definition [] type SR = { x:int; y:string; z:System.DateTime } -<<<<<<< HEAD -======= - ->>>>>>> no FS_RESHAPED_REFLECTION for m in typeof.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do check "celnwer35" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true diff --git a/tests/fsharp/core/subtype/test.fsx b/tests/fsharp/core/subtype/test.fsx index afb4753903c..cc521ec6a84 100644 --- a/tests/fsharp/core/subtype/test.fsx +++ b/tests/fsharp/core/subtype/test.fsx @@ -1725,10 +1725,6 @@ module InliningOnSubTypes1 = (x1, x2) do check "clkewlijwlkw" (f()) (13, 17) -<<<<<<< HEAD - -======= ->>>>>>> no FS_RESHAPED_REFLECTION module StructUnionSingleCase = [] type S = S From 0417edffd72d5e3389acc0af44568f01f21107b2 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 17:28:56 -0700 Subject: [PATCH 16/63] doopty --- src/fsharp/FSharp.Core/quotations.fs | 2 +- src/utils/sformat.fsi | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fsharp/FSharp.Core/quotations.fs b/src/fsharp/FSharp.Core/quotations.fs index 8507104169a..1a7d7a15b09 100644 --- a/src/fsharp/FSharp.Core/quotations.fs +++ b/src/fsharp/FSharp.Core/quotations.fs @@ -206,7 +206,7 @@ and [] x.Tree.GetHashCode() override x.ToString() = x.ToString false - + member x.ToString full = Microsoft.FSharp.Text.StructuredPrintfImpl.Display.layout_to_string Microsoft.FSharp.Text.StructuredPrintfImpl.FormatOptions.Default (x.GetLayout full) diff --git a/src/utils/sformat.fsi b/src/utils/sformat.fsi index 0a4b736341c..21cdfa41d61 100644 --- a/src/utils/sformat.fsi +++ b/src/utils/sformat.fsi @@ -344,13 +344,12 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl val output_layout_tagged : options:FormatOptions -> writer:TaggedTextWriter -> layout:Layout -> unit val output_layout : options:FormatOptions -> writer:TextWriter -> layout:Layout -> unit val layout_as_string: options:FormatOptions -> value:'T * Type -> string - +#endif /// Convert any value to a layout using the given formatting options. The /// layout can then be processed using formatting display engines such as /// those in the LayoutOps module. any_to_string and output_any are /// built using any_to_layout with default format options. val layout_to_string: options:FormatOptions -> layout:Layout -> string -#endif #if COMPILER val fsi_any_to_layout : options:FormatOptions -> value:'T * Type -> Layout From 7f567574049106cb5fc18a07648e4b8f4bc12422 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 17:38:55 -0700 Subject: [PATCH 17/63] Update common-variables.yml --- eng/common/templates/post-build/common-variables.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index 82e4c5723a7..34294385164 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -32,6 +32,7 @@ variables: value: $(MaestroAccessToken) - name: MaestroApiVersion value: "2019-01-16" + - name: SourceLinkCLIVersion value: 3.0.0 - name: SymbolToolVersion From c54e3fe16d94bc01d9283a0efd5940819dc9ce8d Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 17:39:15 -0700 Subject: [PATCH 18/63] Update common-variables.yml --- eng/common/templates/post-build/common-variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index 34294385164..bd0bc5e4daa 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -32,7 +32,7 @@ variables: value: $(MaestroAccessToken) - name: MaestroApiVersion value: "2019-01-16" - + - name: SourceLinkCLIVersion value: 3.0.0 - name: SymbolToolVersion From 539049934149c35a26b5d0864bce8da2f7e0cb64 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:23:58 -0700 Subject: [PATCH 19/63] Update illib.fs --- src/absil/illib.fs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/absil/illib.fs b/src/absil/illib.fs index dde3ca69e62..8f04a899f39 100644 --- a/src/absil/illib.fs +++ b/src/absil/illib.fs @@ -252,7 +252,8 @@ module Option = let attempt (f: unit -> 'T) = try Some (f()) with _ -> None -module List = +module List = + let sortWithOrder (c: IComparer<'T>) elements = List.sortWith (Order.toFunction c) elements let splitAfter n l = @@ -1259,7 +1260,8 @@ type LayeredMultiMap<'Key, 'Value when 'Key : equality and 'Key : comparison>(co static member Empty : LayeredMultiMap<'Key, 'Value> = LayeredMultiMap LayeredMap.Empty [] -module Shim = +module Shim + type IFileSystem = /// A shim over File.ReadAllBytes From 64fa17382746b81b53ad9a75a2f1bdd38c212610 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:24:57 -0700 Subject: [PATCH 20/63] Update illib.fs --- src/absil/illib.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/absil/illib.fs b/src/absil/illib.fs index 8f04a899f39..68b7c8d40a8 100644 --- a/src/absil/illib.fs +++ b/src/absil/illib.fs @@ -252,7 +252,7 @@ module Option = let attempt (f: unit -> 'T) = try Some (f()) with _ -> None -module List = +module List = let sortWithOrder (c: IComparer<'T>) elements = List.sortWith (Order.toFunction c) elements @@ -1260,7 +1260,7 @@ type LayeredMultiMap<'Key, 'Value when 'Key : equality and 'Key : comparison>(co static member Empty : LayeredMultiMap<'Key, 'Value> = LayeredMultiMap LayeredMap.Empty [] -module Shim +module Shim = type IFileSystem = From ad9cd1d164277f2acbbea9860e597abdda3c50a1 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:26:54 -0700 Subject: [PATCH 21/63] Update prim-types.fs --- src/fsharp/FSharp.Core/prim-types.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs index 86afc2ccf1f..a656e8e8088 100644 --- a/src/fsharp/FSharp.Core/prim-types.fs +++ b/src/fsharp/FSharp.Core/prim-types.fs @@ -4483,7 +4483,7 @@ namespace Microsoft.FSharp.Core module OperatorIntrinsics = open System.Collections - + let notStarted() = raise (new System.InvalidOperationException(SR.GetString(SR.enumerationNotStarted))) let alreadyFinished() = raise (new System.InvalidOperationException(SR.GetString(SR.enumerationAlreadyFinished))) From b7d459c65d7adbd07fd6124718899997d237dbab Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:27:29 -0700 Subject: [PATCH 22/63] Update quotations.fs --- src/fsharp/FSharp.Core/quotations.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fsharp/FSharp.Core/quotations.fs b/src/fsharp/FSharp.Core/quotations.fs index 1a7d7a15b09..974e32c7678 100644 --- a/src/fsharp/FSharp.Core/quotations.fs +++ b/src/fsharp/FSharp.Core/quotations.fs @@ -206,7 +206,7 @@ and [] x.Tree.GetHashCode() override x.ToString() = x.ToString false - + member x.ToString full = Microsoft.FSharp.Text.StructuredPrintfImpl.Display.layout_to_string Microsoft.FSharp.Text.StructuredPrintfImpl.FormatOptions.Default (x.GetLayout full) @@ -1127,7 +1127,7 @@ module Patterns = let argtyps : Type list = argTypes |> inst tyargs let retType : Type = retType |> inst tyargs |> removeVoid typ.GetProperty(propName, staticOrInstanceBindingFlags, null, retType, Array.ofList argtyps, null) |> checkNonNullResult ("propName", String.Format(SR.GetString(SR.QfailedToBindProperty), propName)) // fxcop may not see "propName" as an arg - + let bindField (tc, fldName, tyargs) = let typ = mkNamedType (tc, tyargs) typ.GetField(fldName, staticOrInstanceBindingFlags) |> checkNonNullResult ("fldName", String.Format(SR.GetString(SR.QfailedToBindField), fldName)) // fxcop may not see "fldName" as an arg From b3a8c118f96bd73d31338e3453f7f22d5814635a Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:28:00 -0700 Subject: [PATCH 23/63] Update reflect.fs --- src/fsharp/FSharp.Core/reflect.fs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fsharp/FSharp.Core/reflect.fs b/src/fsharp/FSharp.Core/reflect.fs index 23dd7af2899..f9e0a9daa8e 100644 --- a/src/fsharp/FSharp.Core/reflect.fs +++ b/src/fsharp/FSharp.Core/reflect.fs @@ -26,6 +26,7 @@ module internal ReflectionUtils = [] module internal Impl = + let getBindingFlags allowAccess = ReflectionUtils.toBindingFlags (defaultArg allowAccess false) let inline checkNonNull argName (v: 'T) = @@ -61,6 +62,7 @@ module internal Impl = match getInstancePropertyInfo(typ, propName, bindingFlags) with | null -> None | prop -> Some(fun (obj: obj) -> prop.GetValue (obj, instancePropertyFlags ||| bindingFlags, null, null, null)) + //----------------------------------------------------------------- // ATTRIBUTE DECOMPILATION From 81827314da8f44ee628d7146cb0c8c800e6192dd Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:28:30 -0700 Subject: [PATCH 24/63] Update seq.fs --- src/fsharp/FSharp.Core/seq.fs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fsharp/FSharp.Core/seq.fs b/src/fsharp/FSharp.Core/seq.fs index 25551484c65..97326e7315a 100644 --- a/src/fsharp/FSharp.Core/seq.fs +++ b/src/fsharp/FSharp.Core/seq.fs @@ -1159,6 +1159,7 @@ namespace Microsoft.FSharp.Collections [] let countBy (projection:'T->'Key) (source:seq<'T>) = checkNonNull "source" source + if typeof<'Key>.IsValueType then mkDelayedSeq (fun () -> countByValueType projection source) else mkDelayedSeq (fun () -> countByRefType projection source) From 67e833abf00c0eeca666a4d04110122304b7139f Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:29:41 -0700 Subject: [PATCH 25/63] Update sformat.fs --- src/utils/sformat.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/sformat.fs b/src/utils/sformat.fs index 8d7adfa9515..7d26581c4c6 100644 --- a/src/utils/sformat.fs +++ b/src/utils/sformat.fs @@ -386,7 +386,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // Analyze an object to see if it the representation // of an F# value. - let GetValueInfoOfObject (bindingFlags:BindingFlags) (obj : obj) = + let GetValueInfoOfObject (bindingFlags:BindingFlags) (obj : obj) = match obj with | null -> ObjectValue(obj) | _ -> @@ -454,7 +454,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let string_of_int (i:int) = i.ToString() let typeUsesSystemObjectToString (ty:System.Type) = - try + try let methInfo = ty.GetMethod("ToString",BindingFlags.Public ||| BindingFlags.Instance,null,[| |],null) methInfo.DeclaringType = typeof with e -> false @@ -1123,7 +1123,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let basicL = LayoutOps.objL obj // This buries an obj in the layout, rendered at squash time via a leafFormatter. // If the leafFormatter was directly here, then layout leaves could store strings. match obj with - | _ when opts.ShowProperties -> + | _ when opts.ShowProperties -> let props = ty.GetProperties(BindingFlags.GetField ||| BindingFlags.Instance ||| BindingFlags.Public) let fields = ty.GetFields(BindingFlags.Instance ||| BindingFlags.Public) |> Array.map (fun i -> i :> MemberInfo) let propsAndFields = From fb96871c53a33d20fa5b4e00ce98ec34b3026c1d Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:30:23 -0700 Subject: [PATCH 26/63] Update sformat.fs --- src/utils/sformat.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/sformat.fs b/src/utils/sformat.fs index 7d26581c4c6..6cb0e8620f8 100644 --- a/src/utils/sformat.fs +++ b/src/utils/sformat.fs @@ -1139,7 +1139,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // massively reign in deep printing of properties let nDepth = depthLim/10 - Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } ); + Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } ) if propsAndFields.Length = 0 || (nDepth <= 0) then basicL else basicL --- From b4852928d1bb54cecfe1bb23c215f43d034952b7 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:31:23 -0700 Subject: [PATCH 27/63] Update sformat.fsi --- src/utils/sformat.fsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/sformat.fsi b/src/utils/sformat.fsi index 21cdfa41d61..e6ff9762bb5 100644 --- a/src/utils/sformat.fsi +++ b/src/utils/sformat.fsi @@ -336,6 +336,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl val output_any: writer:TextWriter -> value:'T * Type -> unit #if FSHARP_CORE // FSharp.Core.dll: Most functions aren't needed in FSharp.Core.dll, but we add one entry for printf + val anyToStringForPrintf: options:FormatOptions -> bindingFlags:System.Reflection.BindingFlags -> value:'T * Type -> string #else val asTaggedTextWriter: writer: TextWriter -> TaggedTextWriter @@ -345,12 +346,14 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl val output_layout : options:FormatOptions -> writer:TextWriter -> layout:Layout -> unit val layout_as_string: options:FormatOptions -> value:'T * Type -> string #endif + /// Convert any value to a layout using the given formatting options. The /// layout can then be processed using formatting display engines such as /// those in the LayoutOps module. any_to_string and output_any are /// built using any_to_layout with default format options. val layout_to_string: options:FormatOptions -> layout:Layout -> string + #if COMPILER val fsi_any_to_layout : options:FormatOptions -> value:'T * Type -> Layout #endif From 8b874904b2ac2459e1a35fc7a10dacc9f089b0eb Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:33:21 -0700 Subject: [PATCH 28/63] Update sformat.fs --- src/utils/sformat.fs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/sformat.fs b/src/utils/sformat.fs index 6cb0e8620f8..42cb18fa8d0 100644 --- a/src/utils/sformat.fs +++ b/src/utils/sformat.fs @@ -1139,7 +1139,11 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // massively reign in deep printing of properties let nDepth = depthLim/10 +#if NETSTANDARD + Array.Sort((propsAndFields),{ new IComparer with member this.Compare(p1,p2) = compare (p1.Name) (p2.Name) } ) +#else Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } ) +#endif if propsAndFields.Length = 0 || (nDepth <= 0) then basicL else basicL --- From 9d326faedc4e54e305c0844bddb2c58354d486ce Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:33:52 -0700 Subject: [PATCH 29/63] Update FSharpReflection.fs --- .../FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs index 8bbc20da6ff..21df908745d 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs @@ -1032,7 +1032,7 @@ type FSharpTypeTests() = // Regression for 5588, Reflection: unit is still treated as a record type, but only if you pass BindingFlags.NonPublic [] - member __.``IsRecord.Regression5588``() = + member __.``IsRecord.Regression5588``() = // negative Assert.IsFalse(FSharpType.IsRecord(typeof)) Assert.IsFalse( FSharpType.IsRecord(typeof, System.Reflection.BindingFlags.NonPublic) ) From db858bf80e999b2a15c5f4d5b74c9f5f458abab6 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:34:19 -0700 Subject: [PATCH 30/63] Update LibraryTestFx.fs --- tests/FSharp.Core.UnitTests/LibraryTestFx.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/FSharp.Core.UnitTests/LibraryTestFx.fs b/tests/FSharp.Core.UnitTests/LibraryTestFx.fs index 8cfc6e16f4a..0dbe2ee1476 100644 --- a/tests/FSharp.Core.UnitTests/LibraryTestFx.fs +++ b/tests/FSharp.Core.UnitTests/LibraryTestFx.fs @@ -67,7 +67,6 @@ module SurfaceArea = // get current FSharp.Core let asm = typeof.Assembly - // public types only let types = asm.GetExportedTypes() From fe5a3930c693951dde9c8b2c910b401f5379b2f5 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:34:38 -0700 Subject: [PATCH 31/63] Update LibraryTestFx.fs --- tests/FSharp.Core.UnitTests/LibraryTestFx.fs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/FSharp.Core.UnitTests/LibraryTestFx.fs b/tests/FSharp.Core.UnitTests/LibraryTestFx.fs index 0dbe2ee1476..77a9b2a3e60 100644 --- a/tests/FSharp.Core.UnitTests/LibraryTestFx.fs +++ b/tests/FSharp.Core.UnitTests/LibraryTestFx.fs @@ -67,6 +67,7 @@ module SurfaceArea = // get current FSharp.Core let asm = typeof.Assembly + // public types only let types = asm.GetExportedTypes() From e554f51bc0d91801a7e1e0ba43c93eab8ed1dc55 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 16 Aug 2019 18:35:03 -0700 Subject: [PATCH 32/63] Update test.fsx --- tests/fsharp/core/subtype/test.fsx | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fsharp/core/subtype/test.fsx b/tests/fsharp/core/subtype/test.fsx index cc521ec6a84..9751d03e6e3 100644 --- a/tests/fsharp/core/subtype/test.fsx +++ b/tests/fsharp/core/subtype/test.fsx @@ -1725,6 +1725,7 @@ module InliningOnSubTypes1 = (x1, x2) do check "clkewlijwlkw" (f()) (13, 17) + module StructUnionSingleCase = [] type S = S From 349461958637c3609cb47efa305b2ebd1bf2524a Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Sat, 17 Aug 2019 09:21:03 -0700 Subject: [PATCH 33/63] Update FSharp.Profiles.props --- FSharp.Profiles.props | 2 -- 1 file changed, 2 deletions(-) diff --git a/FSharp.Profiles.props b/FSharp.Profiles.props index dbb87ef8c14..f8160b9dd91 100644 --- a/FSharp.Profiles.props +++ b/FSharp.Profiles.props @@ -19,9 +19,7 @@ $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION $(DefineConstants);FX_NO_WIN_REGISTRY $(DefineConstants);FX_NO_WINFORMS - $(DefineConstants);FX_REDUCED_EXCEPTIONS $(DefineConstants);FX_RESHAPED_REFEMIT - $(DefineConstants);FX_RESHAPED_GLOBALIZATION $(DefineConstants);FX_RESHAPED_MSBUILD $(OtherFlags) --simpleresolution From cb5eafc037a97dde69546f67c1ccb502292fbe1b Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Sat, 17 Aug 2019 09:22:59 -0700 Subject: [PATCH 34/63] Update FSharp.Compiler.Private.fsproj --- .../FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index e9b2a30053f..8121deb20b3 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -42,9 +42,6 @@ Logger.fs - - Reflection\reshapedmsbuild.fs - ErrorText\sformat.fsi From e3dcfb2b5af1c6ff787dc40463b5dd72d41e0c6d Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 19 Aug 2019 14:13:40 -0700 Subject: [PATCH 35/63] tryit --- proto.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto.proj b/proto.proj index 23d7525d13e..61d8c4c77e4 100644 --- a/proto.proj +++ b/proto.proj @@ -5,7 +5,7 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - + From 23ec0708e239a1538314882c82041bdf4e3b6252 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 19 Aug 2019 15:18:27 -0700 Subject: [PATCH 36/63] nope --- proto.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto.proj b/proto.proj index 61d8c4c77e4..23d7525d13e 100644 --- a/proto.proj +++ b/proto.proj @@ -5,7 +5,7 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - + From e7b838050a991c632062eff671900303dc690556 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 19 Aug 2019 16:47:41 -0700 Subject: [PATCH 37/63] try it --- src/fsharp/FSharp.Build/FSharp.Build.fsproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Build/FSharp.Build.fsproj b/src/fsharp/FSharp.Build/FSharp.Build.fsproj index e7fe7891248..3a872939ab4 100644 --- a/src/fsharp/FSharp.Build/FSharp.Build.fsproj +++ b/src/fsharp/FSharp.Build/FSharp.Build.fsproj @@ -6,7 +6,7 @@ Library $(ProtoTargetFramework) net472;netcoreapp2.1 - netcoreapp2.1 + netcoreapp2.1 FSharp.Build $(NoWarn);45;55;62;75;1204 true From 1250697245866e2c2e435e491b91b10d2149c9cd Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 19 Aug 2019 17:10:21 -0700 Subject: [PATCH 38/63] Print the value for now --- eng/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/build.sh b/eng/build.sh index 7f6a88128c6..ef0eb6dcd22 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -220,6 +220,9 @@ function BuildSolution { # build bootstrap tools bootstrap_config=Proto + + echo "$bootstrap_config = ${!bootstrap_config}" + bootstrap_dir=$artifacts_dir/Bootstrap if [[ "$force_bootstrap" == true ]]; then rm -fr $bootstrap_dir From dfc9c88e0fcba219bdcece75b5e08a9854191a89 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 19 Aug 2019 17:15:24 -0700 Subject: [PATCH 39/63] Print the value for now --- eng/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/build.sh b/eng/build.sh index ef0eb6dcd22..ec4075fdcb3 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -221,7 +221,7 @@ function BuildSolution { # build bootstrap tools bootstrap_config=Proto - echo "$bootstrap_config = ${!bootstrap_config}" + echo "$bootstrap_config = $(bootstrap_config)" bootstrap_dir=$artifacts_dir/Bootstrap if [[ "$force_bootstrap" == true ]]; then From 5620512afee8c3f6d329b98262bdae9c7fb9de86 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 19 Aug 2019 17:23:55 -0700 Subject: [PATCH 40/63] Try emulating build-utils.ps1 --- eng/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eng/build.sh b/eng/build.sh index ec4075fdcb3..96f370acef6 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -219,9 +219,7 @@ function BuildSolution { node_reuse=false # build bootstrap tools - bootstrap_config=Proto - - echo "$bootstrap_config = $(bootstrap_config)" + bootstrap_config="ProtoTargetFramework=net472" bootstrap_dir=$artifacts_dir/Bootstrap if [[ "$force_bootstrap" == true ]]; then From bed411b8ab321be03e081cd5ff7aeeb81f095c0c Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 19 Aug 2019 17:31:22 -0700 Subject: [PATCH 41/63] maybe this --- eng/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/build.sh b/eng/build.sh index 96f370acef6..bdbd74737c6 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -219,7 +219,7 @@ function BuildSolution { node_reuse=false # build bootstrap tools - bootstrap_config="ProtoTargetFramework=net472" + bootstrap_config=Proto bootstrap_dir=$artifacts_dir/Bootstrap if [[ "$force_bootstrap" == true ]]; then @@ -238,7 +238,8 @@ function BuildSolution { if [ ! -f "$bootstrap_dir/fsc.exe" ]; then MSBuild "$repo_root/proto.proj" \ /restore \ - /p:Configuration=$bootstrap_config \ + /p:ProtoTargetFramework=net472 + /p:Configuration=bootstrap_config \ /t:Publish cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/netcoreapp2.1/publish $bootstrap_dir/fsc From fce2bfb0851ef60bb375418b296b6bd8100894d8 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Mon, 19 Aug 2019 17:36:55 -0700 Subject: [PATCH 42/63] Add /bl maybe idk --- eng/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/build.sh b/eng/build.sh index bdbd74737c6..f310817780c 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -237,6 +237,7 @@ function BuildSolution { fi if [ ! -f "$bootstrap_dir/fsc.exe" ]; then MSBuild "$repo_root/proto.proj" \ + $bl \ /restore \ /p:ProtoTargetFramework=net472 /p:Configuration=bootstrap_config \ From ec6d4ca56b9ba9ee6dbfc01a50a39edf429bd039 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 11:36:07 -0700 Subject: [PATCH 43/63] get log with no changes to MSBuild shell out --- eng/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/build.sh b/eng/build.sh index f310817780c..1685580c043 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -239,7 +239,6 @@ function BuildSolution { MSBuild "$repo_root/proto.proj" \ $bl \ /restore \ - /p:ProtoTargetFramework=net472 /p:Configuration=bootstrap_config \ /t:Publish From 5c9118a6803b382c28066979848f600b70b505af Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 11:44:38 -0700 Subject: [PATCH 44/63] derp --- eng/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/build.sh b/eng/build.sh index 1685580c043..2a778a3bf35 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -239,7 +239,7 @@ function BuildSolution { MSBuild "$repo_root/proto.proj" \ $bl \ /restore \ - /p:Configuration=bootstrap_config \ + /p:Configuration=$bootstrap_config \ /t:Publish cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/netcoreapp2.1/publish $bootstrap_dir/fsc From b96429f9c629c1d7c2d7e589db1b664285cc6da0 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 11:53:18 -0700 Subject: [PATCH 45/63] Remove seemingly useless TargetFrameworkS --- src/fsharp/fsc/fsc.fsproj | 2 +- src/fsharp/fsi/fsi.fsproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fsharp/fsc/fsc.fsproj b/src/fsharp/fsc/fsc.fsproj index 7d72d29e85b..e3202e69afc 100644 --- a/src/fsharp/fsc/fsc.fsproj +++ b/src/fsharp/fsc/fsc.fsproj @@ -6,7 +6,7 @@ Exe $(ProtoTargetFramework) net472;netcoreapp2.1 - netcoreapp2.1 + netcoreapp2.1 .exe $(NoWarn);45;55;62;75;1204 true diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj index 9d3b879cadc..92455f0774c 100644 --- a/src/fsharp/fsi/fsi.fsproj +++ b/src/fsharp/fsi/fsi.fsproj @@ -6,7 +6,7 @@ Exe $(ProtoTargetFramework) net472;netcoreapp2.1 - netcoreapp2.1 + netcoreapp2.1 .exe $(NoWarn);45;55;62;75;1204 true From 9ae3d66058ea4959fcb7d62dfe84191b43f176a6 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 12:06:45 -0700 Subject: [PATCH 46/63] let's try this --- proto.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto.proj b/proto.proj index 23d7525d13e..61d8c4c77e4 100644 --- a/proto.proj +++ b/proto.proj @@ -5,7 +5,7 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - + From 52879b277508a74f390c97706304e203756ffc2e Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 12:11:03 -0700 Subject: [PATCH 47/63] whatever --- proto.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto.proj b/proto.proj index 61d8c4c77e4..23d7525d13e 100644 --- a/proto.proj +++ b/proto.proj @@ -5,7 +5,7 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - + From 327e81852723b4928cf784e9114201a49be02ae7 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 12:37:12 -0700 Subject: [PATCH 48/63] lol if this works --- proto.proj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proto.proj b/proto.proj index 23d7525d13e..59681f5bb0c 100644 --- a/proto.proj +++ b/proto.proj @@ -15,6 +15,11 @@ TargetFramework=netcoreapp2.1 + + + + TargetFramework=netstandard2.0 + From 679eb49eb1273d622ca05a48cc415e3a4c38f023 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 12:42:28 -0700 Subject: [PATCH 49/63] thought so --- proto.proj | 5 ----- 1 file changed, 5 deletions(-) diff --git a/proto.proj b/proto.proj index 59681f5bb0c..23d7525d13e 100644 --- a/proto.proj +++ b/proto.proj @@ -15,11 +15,6 @@ TargetFramework=netcoreapp2.1 - - - - TargetFramework=netstandard2.0 - From ea5c87048a83030279270e3079e0ba1f1f5d0e4a Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 14:01:45 -0700 Subject: [PATCH 50/63] . --- proto.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto.proj b/proto.proj index 23d7525d13e..61d8c4c77e4 100644 --- a/proto.proj +++ b/proto.proj @@ -5,7 +5,7 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - + From deee13598a133f83e80ccefb7172aa8ae1cffaa0 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 14:10:41 -0700 Subject: [PATCH 51/63] . --- proto.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto.proj b/proto.proj index 61d8c4c77e4..23d7525d13e 100644 --- a/proto.proj +++ b/proto.proj @@ -5,7 +5,7 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - + From 9031d37c154474c47aae9508c40d97f9d6c9c470 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 14:12:48 -0700 Subject: [PATCH 52/63] tryit --- proto.proj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto.proj b/proto.proj index 23d7525d13e..8a23018ebb5 100644 --- a/proto.proj +++ b/proto.proj @@ -7,13 +7,13 @@ - TargetFramework=netcoreapp2.1 + TargetFramework=net472 - TargetFramework=netcoreapp2.1 + TargetFramework=net472 - TargetFramework=netcoreapp2.1 + TargetFramework=net472 From 7a047a25f67099766f83d7a558bf510b7d3a3ae9 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 14:25:26 -0700 Subject: [PATCH 53/63] revert --- proto.proj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto.proj b/proto.proj index 8a23018ebb5..23d7525d13e 100644 --- a/proto.proj +++ b/proto.proj @@ -7,13 +7,13 @@ - TargetFramework=net472 + TargetFramework=netcoreapp2.1 - TargetFramework=net472 + TargetFramework=netcoreapp2.1 - TargetFramework=net472 + TargetFramework=netcoreapp2.1 From 8446c3ea45a0dfca729c1632d84a28112cc83735 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 14:43:22 -0700 Subject: [PATCH 54/63] jojo --- eng/build.sh | 1 + proto.proj | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/build.sh b/eng/build.sh index 2a778a3bf35..4915fa1ed5d 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -239,6 +239,7 @@ function BuildSolution { MSBuild "$repo_root/proto.proj" \ $bl \ /restore \ + /p:Configuration="ProtoTargetFramework=net472" /p:Configuration=$bootstrap_config \ /t:Publish diff --git a/proto.proj b/proto.proj index 23d7525d13e..61d8c4c77e4 100644 --- a/proto.proj +++ b/proto.proj @@ -5,7 +5,7 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - + From e1c98b4b08c153ca5511fd354e856ecbdf7b8089 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 14:44:55 -0700 Subject: [PATCH 55/63] jotaru --- proto.proj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proto.proj b/proto.proj index 61d8c4c77e4..696c38bc2ec 100644 --- a/proto.proj +++ b/proto.proj @@ -5,17 +5,17 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - - TargetFramework=netcoreapp2.1 + - TargetFramework=netcoreapp2.1 + - --> + From 029f4798d59383afc2e3b2bd68d1e6ff23fd70fd Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 14:56:35 -0700 Subject: [PATCH 56/63] joseph joestar --- eng/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/build.sh b/eng/build.sh index 4915fa1ed5d..2a778a3bf35 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -239,7 +239,6 @@ function BuildSolution { MSBuild "$repo_root/proto.proj" \ $bl \ /restore \ - /p:Configuration="ProtoTargetFramework=net472" /p:Configuration=$bootstrap_config \ /t:Publish From dfca2e58dd13b6c8b95356f94bdf59edeb11a29b Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 15:46:58 -0700 Subject: [PATCH 57/63] closer, based joseph --- proto.proj | 13 ++++--------- src/buildtools/AssemblyCheck/AssemblyCheck.fs | 8 ++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/proto.proj b/proto.proj index 696c38bc2ec..589eded62a4 100644 --- a/proto.proj +++ b/proto.proj @@ -6,15 +6,10 @@ - - - - - - - - - + diff --git a/src/buildtools/AssemblyCheck/AssemblyCheck.fs b/src/buildtools/AssemblyCheck/AssemblyCheck.fs index c6bd035a673..8dd9ab9b5f9 100644 --- a/src/buildtools/AssemblyCheck/AssemblyCheck.fs +++ b/src/buildtools/AssemblyCheck/AssemblyCheck.fs @@ -73,6 +73,14 @@ module AssemblyCheck = else printfn "All shipping assemblies had an appropriate version number." + printfn "\n\n\n----------BEGIN JOSEPH JOESTAR----------\n" + + printfn "F# Assmeblies:\n%A" fsharpAssemblies + printfn "F# Assmeblies filtered:\n%A" (fsharpAssemblies |> List.filter (fun p -> not (p.Contains(@"\FSharpSdk\"))) + + + printfn "\n\n\n----------END JOSEPH JOESTAR----------\n" + // verify that all assemblies have a commit hash let failedCommitHash = fsharpAssemblies From 3808796cba0618b40475ddf884825395e415f502 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 15:58:06 -0700 Subject: [PATCH 58/63] it's okay joseph, I got you bae --- src/buildtools/AssemblyCheck/AssemblyCheck.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildtools/AssemblyCheck/AssemblyCheck.fs b/src/buildtools/AssemblyCheck/AssemblyCheck.fs index 8dd9ab9b5f9..1f6a5ae3dbc 100644 --- a/src/buildtools/AssemblyCheck/AssemblyCheck.fs +++ b/src/buildtools/AssemblyCheck/AssemblyCheck.fs @@ -76,7 +76,7 @@ module AssemblyCheck = printfn "\n\n\n----------BEGIN JOSEPH JOESTAR----------\n" printfn "F# Assmeblies:\n%A" fsharpAssemblies - printfn "F# Assmeblies filtered:\n%A" (fsharpAssemblies |> List.filter (fun p -> not (p.Contains(@"\FSharpSdk\"))) + printfn "F# Assmeblies filtered:\n%A" (fsharpAssemblies |> List.filter (fun p -> not (p.Contains(@"\FSharpSdk\")))) printfn "\n\n\n----------END JOSEPH JOESTAR----------\n" From 83232ab94956444bcc2a3fdddd24f11cc7757b10 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 16:04:15 -0700 Subject: [PATCH 59/63] hahahahahaha --- proto.proj | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/proto.proj b/proto.proj index 589eded62a4..d2860f40d9e 100644 --- a/proto.proj +++ b/proto.proj @@ -6,10 +6,9 @@ - + + + From df0c68992fe2cb70e50125f13d67c268700a43cc Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 16:15:14 -0700 Subject: [PATCH 60/63] c'mon jojo --- src/buildtools/AssemblyCheck/AssemblyCheck.fs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/buildtools/AssemblyCheck/AssemblyCheck.fs b/src/buildtools/AssemblyCheck/AssemblyCheck.fs index 1f6a5ae3dbc..23570ec15db 100644 --- a/src/buildtools/AssemblyCheck/AssemblyCheck.fs +++ b/src/buildtools/AssemblyCheck/AssemblyCheck.fs @@ -73,20 +73,14 @@ module AssemblyCheck = else printfn "All shipping assemblies had an appropriate version number." - printfn "\n\n\n----------BEGIN JOSEPH JOESTAR----------\n" - - printfn "F# Assmeblies:\n%A" fsharpAssemblies - printfn "F# Assmeblies filtered:\n%A" (fsharpAssemblies |> List.filter (fun p -> not (p.Contains(@"\FSharpSdk\")))) - - - printfn "\n\n\n----------END JOSEPH JOESTAR----------\n" - // verify that all assemblies have a commit hash let failedCommitHash = fsharpAssemblies |> List.filter (fun p -> not (p.Contains(@"\FSharpSdk\"))) |> List.filter (fun a -> let fileProductVersion = FileVersionInfo.GetVersionInfo(a).ProductVersion + if (isNull fileProductVersion) then + printfn "Null product version: %s" a not (commitHashPattern.IsMatch(fileProductVersion) || devVersionPattern.IsMatch(fileProductVersion))) if failedCommitHash.Length > 0 then From aa471cba4cf1c785bdf55d269aa52ebdca996133 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 16:41:50 -0700 Subject: [PATCH 61/63] Set possibly null value to empty so we get better failures in the regex match, JoJo --- src/buildtools/AssemblyCheck/AssemblyCheck.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/buildtools/AssemblyCheck/AssemblyCheck.fs b/src/buildtools/AssemblyCheck/AssemblyCheck.fs index 23570ec15db..ebfcb50fd9f 100644 --- a/src/buildtools/AssemblyCheck/AssemblyCheck.fs +++ b/src/buildtools/AssemblyCheck/AssemblyCheck.fs @@ -78,9 +78,9 @@ module AssemblyCheck = fsharpAssemblies |> List.filter (fun p -> not (p.Contains(@"\FSharpSdk\"))) |> List.filter (fun a -> - let fileProductVersion = FileVersionInfo.GetVersionInfo(a).ProductVersion - if (isNull fileProductVersion) then - printfn "Null product version: %s" a + let fileProductVersion = + let v = FileVersionInfo.GetVersionInfo(a).ProductVersion + if isNull v then String.Empty else v not (commitHashPattern.IsMatch(fileProductVersion) || devVersionPattern.IsMatch(fileProductVersion))) if failedCommitHash.Length > 0 then From 2a454da1644f33e7566a3be0fccce9699e1e6449 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 21:37:10 -0700 Subject: [PATCH 62/63] build log not needed --- eng/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/build.sh b/eng/build.sh index 2a778a3bf35..acb76975e4c 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -237,7 +237,6 @@ function BuildSolution { fi if [ ! -f "$bootstrap_dir/fsc.exe" ]; then MSBuild "$repo_root/proto.proj" \ - $bl \ /restore \ /p:Configuration=$bootstrap_config \ /t:Publish From 64127c946d8af0275bd42fa6b01e4d5ec5813da4 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Tue, 20 Aug 2019 21:37:26 -0700 Subject: [PATCH 63/63] Update build.sh --- eng/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/build.sh b/eng/build.sh index acb76975e4c..7f6a88128c6 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -220,7 +220,6 @@ function BuildSolution { # build bootstrap tools bootstrap_config=Proto - bootstrap_dir=$artifacts_dir/Bootstrap if [[ "$force_bootstrap" == true ]]; then rm -fr $bootstrap_dir