diff --git a/src/SourceBuild/tarball/patches/fsharp/0001-Disable-apphost-for-fsi-fsc-for-source-build.patch b/src/SourceBuild/tarball/patches/fsharp/0001-Disable-apphost-for-fsi-fsc-for-source-build.patch deleted file mode 100644 index 2e078b165..000000000 --- a/src/SourceBuild/tarball/patches/fsharp/0001-Disable-apphost-for-fsi-fsc-for-source-build.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Davis Goodin -Date: Tue, 19 Oct 2021 16:11:51 -0500 -Subject: [PATCH] Disable apphost for 'fsi', 'fsc' for source-build - -Creating an apphost for a net5.0 project while building with a net6.0 SDK downloads the apphost pack as a prebuilt. Stopping the project from creating the apphost removes the prebuilt for source-build. ---- - src/fsharp/fsc/fsc.fsproj | 1 + - src/fsharp/fsi/fsi.fsproj | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/fsharp/fsc/fsc.fsproj b/src/fsharp/fsc/fsc.fsproj -index 7fa31fc21..04025c297 100644 ---- a/src/fsharp/fsc/fsc.fsproj -+++ b/src/fsharp/fsc/fsc.fsproj -@@ -12,6 +12,7 @@ - $(OtherFlags) --maxerrors:20 --extraoptimizationloops:1 - true - true -+ false - - - -diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj -index 9fd9b1333..eace6c166 100644 ---- a/src/fsharp/fsi/fsi.fsproj -+++ b/src/fsharp/fsi/fsi.fsproj -@@ -13,6 +13,7 @@ - fsi.res - true - true -+ false - - - diff --git a/src/SourceBuild/tarball/patches/fsharp/0002-Remove-apphost-pack-prebuilts-during-source-build.patch b/src/SourceBuild/tarball/patches/fsharp/0001-Disable-apphost-on-downlevel-frameworks-during-sourc.patch similarity index 69% rename from src/SourceBuild/tarball/patches/fsharp/0002-Remove-apphost-pack-prebuilts-during-source-build.patch rename to src/SourceBuild/tarball/patches/fsharp/0001-Disable-apphost-on-downlevel-frameworks-during-sourc.patch index e88e10cea..d9a483852 100644 --- a/src/SourceBuild/tarball/patches/fsharp/0002-Remove-apphost-pack-prebuilts-during-source-build.patch +++ b/src/SourceBuild/tarball/patches/fsharp/0001-Disable-apphost-on-downlevel-frameworks-during-sourc.patch @@ -1,18 +1,34 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Davis Goodin -Date: Tue, 19 Oct 2021 19:34:11 -0500 -Subject: [PATCH] Remove apphost pack prebuilts during source-build +Date: Tue, 19 Oct 2021 16:11:51 -0500 +Subject: [PATCH] Disable apphost on downlevel frameworks during source-build -Add a check to eng/build.sh to avoid running the bootstrapping twice: once in the outer build and again in the inner build. +During source-build, disable apphost build for 'fsi' and 'fsc', and +'fsyacc', 'fslex', and 'AssemblyCheck' during the bootstrap build. -Sets UseAppHost=false during source-build for the projects that build during bootstrapping. Pass the DotNetBuildFromSource property through the environment in eng/SourceBuild.props so it takes effect. +Creating an apphost for a net5.0 project while building with a net6.0 +SDK downloads the apphost pack as a prebuilt. Stopping the projects from +creating the apphost removes the prebuilt for source-build. + +To make disabling the apphost work in the bootstrapping build, add a +check to eng/build.sh to skip the bootstrap build if we're currently +running the "outer" source-build. That gives source-build the ability to +run bootstrapping on its own terms. Now, when eng/SourceBuild.props runs +bootstrapping, it can pass the DotNetBuildFromSource property through +the environment so it takes effect. + +See: https://github.com/dotnet/fsharp/issues/12282 + +PR: https://github.com/dotnet/fsharp/pull/12286 --- eng/SourceBuild.props | 2 +- eng/build.sh | 51 ++++++++++--------- .../AssemblyCheck/AssemblyCheck.fsproj | 1 + src/buildtools/fslex/fslex.fsproj | 1 + src/buildtools/fsyacc/fsyacc.fsproj | 1 + - 5 files changed, 32 insertions(+), 24 deletions(-) + src/fsharp/fsc/fsc.fsproj | 1 + + src/fsharp/fsi/fsi.fsproj | 1 + + 7 files changed, 34 insertions(+), 24 deletions(-) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 22c929f28..903ee00d3 100644 @@ -125,3 +141,27 @@ index 5d1b7141f..63b63c5de 100644 +diff --git a/src/fsharp/fsc/fsc.fsproj b/src/fsharp/fsc/fsc.fsproj +index 7fa31fc21..04025c297 100644 +--- a/src/fsharp/fsc/fsc.fsproj ++++ b/src/fsharp/fsc/fsc.fsproj +@@ -12,6 +12,7 @@ + $(OtherFlags) --maxerrors:20 --extraoptimizationloops:1 + true + true ++ false + + + +diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj +index 9fd9b1333..eace6c166 100644 +--- a/src/fsharp/fsi/fsi.fsproj ++++ b/src/fsharp/fsi/fsi.fsproj +@@ -13,6 +13,7 @@ + fsi.res + true + true ++ false + + + diff --git a/src/SourceBuild/tarball/patches/roslyn/0004-Disable-apphost-build-of-csi-vbi-for-source-build.patch b/src/SourceBuild/tarball/patches/roslyn/0004-Disable-apphost-build-of-csi-vbi-for-source-build.patch index 528517fb8..f94119820 100644 --- a/src/SourceBuild/tarball/patches/roslyn/0004-Disable-apphost-build-of-csi-vbi-for-source-build.patch +++ b/src/SourceBuild/tarball/patches/roslyn/0004-Disable-apphost-build-of-csi-vbi-for-source-build.patch @@ -3,7 +3,13 @@ From: Davis Goodin Date: Tue, 19 Oct 2021 19:38:52 -0500 Subject: [PATCH] Disable apphost build of 'csi', 'vbi' for source-build -Creating an apphost for a netcoreapp3.1 project uses the apphost pack as a prebuilt. Stopping these projects from creating the apphost removes the prebuilt for source-build. +Creating an apphost for a netcoreapp3.1 project uses the apphost pack as a +prebuilt. Stopping these projects from creating the apphost removes the prebuilt +for source-build. + +See: https://github.com/dotnet/roslyn/issues/57233 + +PR: https://github.com/dotnet/roslyn/pull/57306 --- src/Interactive/csi/csi.csproj | 1 + src/Interactive/vbi/vbi.vbproj | 1 +