From 12a327703fe900ec4028fc80222ad6f445fc45fb Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Tue, 30 Apr 2024 01:45:49 -0700 Subject: [PATCH] Redo compile before - add fail on plainbuild error (#17103) * Redo compile before - add fail on plainbuild error * temp * dotnet build it --- azure-pipelines-PR.yml | 6 +-- src/FSharp.Build/Microsoft.FSharp.Targets | 32 +++++++++++--- src/FSharp.Core/FSharp.Core.fsproj | 13 ++++++ .../tests/CompileOrder - BeforeAndAfter.proj | 42 +++++++++++++++++++ tests/fsharp/SDKTests/tests/ToolsTest.targets | 5 ++- 5 files changed, 89 insertions(+), 9 deletions(-) create mode 100644 tests/fsharp/SDKTests/tests/CompileOrder - BeforeAndAfter.proj diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 16f245bf82e..2733bc0d56e 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -713,7 +713,7 @@ stages: - script: dotnet build .\FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln - continueOnError: true + continueOnError: false condition: always() # Plain FCS build Linux @@ -739,7 +739,7 @@ stages: - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln - continueOnError: true + continueOnError: false condition: always() # Plain FCS build Mac @@ -765,7 +765,7 @@ stages: - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" workingDirectory: $(Build.SourcesDirectory) displayName: Regular rebuild of FSharp.Compiler.Service.sln - continueOnError: true + continueOnError: false condition: always() # Build and run fast benchmarks diff --git a/src/FSharp.Build/Microsoft.FSharp.Targets b/src/FSharp.Build/Microsoft.FSharp.Targets index 3e5e347d12f..26999e6a646 100644 --- a/src/FSharp.Build/Microsoft.FSharp.Targets +++ b/src/FSharp.Build/Microsoft.FSharp.Targets @@ -235,7 +235,7 @@ this file. - + @@ -247,7 +247,7 @@ this file. - + @@ -255,6 +255,27 @@ this file. + + + + <__Sources Remove="@(__Sources)" /> + <__Sources Include="@(Compile->WithMetadataValue('CompileOrder', 'CompileFirst'))" /> + <__Sources Include="@(CompileBefore)" /> + <__Sources Include="@(Compile->WithMetadataValue('CompileOrder', 'CompileBefore'))" /> + <__Sources Include="@(Compile->WithMetadataValue('CompileOrder', ''))" /> + <__Sources Include="@(Compile->WithMetadataValue('CompileOrder', 'CompileAfter'))" /> + <__Sources Include="@(CompileAfter)" /> + <__Sources Include="@(Compile->WithMetadataValue('CompileOrder', 'CompileLast'))" /> + + + + + + + + + + + --simpleresolution $(OtherFlags) @@ -371,7 +393,7 @@ this file. Resources="@(ActualEmbeddedResources)" SkipCompilerExecution="$(SkipCompilerExecution)" SourceLink="$(SourceLink)" - Sources="@(CompileBefore);@(Compile);@(CompileAfter)" + Sources="@(Compile)" SubsystemVersion="$(SubsystemVersion)" Tailcalls="$(Tailcalls)" TargetType="$(OutputType)" @@ -434,7 +456,7 @@ this file. Overwrite="true"/> - + CompileBefore <_FsGeneratedTfmAttributesSource Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" /> diff --git a/src/FSharp.Core/FSharp.Core.fsproj b/src/FSharp.Core/FSharp.Core.fsproj index 0f9fe0fb624..da433ca2293 100644 --- a/src/FSharp.Core/FSharp.Core.fsproj +++ b/src/FSharp.Core/FSharp.Core.fsproj @@ -61,12 +61,25 @@ + + + Primitives/prim-types-prelude.fsi Primitives/prim-types-prelude.fs + + + + Primitives/prim-types-prelude.fsi + + + Primitives/prim-types-prelude.fs + + + Primitives/prim-types.fsi diff --git a/tests/fsharp/SDKTests/tests/CompileOrder - BeforeAndAfter.proj b/tests/fsharp/SDKTests/tests/CompileOrder - BeforeAndAfter.proj new file mode 100644 index 00000000000..55134523861 --- /dev/null +++ b/tests/fsharp/SDKTests/tests/CompileOrder - BeforeAndAfter.proj @@ -0,0 +1,42 @@ + + + + + + + + + + true + /Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/ + fscAnyCpu.exe + _VsInstallRoot_/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/ + + One;Two;Three;Four;Five;Six;Seven;Eight;Nine;Ten;Eleven;Twelve;Thirteen;Fourteen + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/fsharp/SDKTests/tests/ToolsTest.targets b/tests/fsharp/SDKTests/tests/ToolsTest.targets index 7a4138e5eed..3e68a5af856 100644 --- a/tests/fsharp/SDKTests/tests/ToolsTest.targets +++ b/tests/fsharp/SDKTests/tests/ToolsTest.targets @@ -4,10 +4,11 @@ - + + @@ -17,6 +18,8 @@ + +