From b81c56c1704786a69bae9d517463899b8a630a81 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 12:17:05 +0000 Subject: [PATCH 1/4] Initial plan From 8c4d7dd543349661a8322ac4ae7514a14ff457d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 12:30:32 +0000 Subject: [PATCH 2/4] Add Bootstrap.targets and update build configuration files - Created eng/targets/Bootstrap.targets with automatic bootstrap detection - Updated Directory.Build.targets to import Bootstrap.targets - Updated proto.proj with NETCORE_ENGINEERING_TELEMETRY property - Simplified .github/workflows/copilot-setup-steps.yml - Updated .github/copilot-instructions.md with new build/test commands Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --- .github/copilot-instructions.md | 20 +++-- .github/workflows/copilot-setup-steps.yml | 19 ++--- Directory.Build.targets | 1 + eng/targets/Bootstrap.targets | 90 +++++++++++++++++++++++ proto.proj | 1 + 5 files changed, 107 insertions(+), 24 deletions(-) create mode 100644 eng/targets/Bootstrap.targets diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a8a2e86df85..5f24351bbdc 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -27,26 +27,24 @@ Plan your task: Always run the core command. Always verify exit codes. No assumptions. -## 1. Core Command +## 1. Build ``` -./build.sh -c Release --testcoreclr +dotnet build FSharp.sln -c Release ``` -Non‑zero → classify & stop. -## 2. Bootstrap (Failure Detection Only) -Two-phase build. No separate bootstrap command. -Early proto/tool errors (e.g. "Error building tools") → `BootstrapFailure` (capture key lines). Stop. +## 2. Test +``` +dotnet test tests/FSharp.Compiler.ComponentTests -c Release +dotnet test tests/FSharp.Compiler.Service.Tests -c Release +``` ## 3. Build Failure -Proto ok but solution build fails → `BuildFailure`. Capture exit code, ≤15 error lines (`error FS`, `error F#`, `error MSB`), binlog path: `artifacts/log/Release/Build.*.binlog`. Do not proceed to tests. -## 4. Tests -Core command runs CoreCLR tests: +## 4. Tests (Full Suite) +Additional CoreCLR tests: - FSharp.Test.Utilities -- FSharp.Compiler.ComponentTests -- FSharp.Compiler.Service.Tests - FSharp.Compiler.Private.Scripting.UnitTests - FSharp.Build.UnitTests - FSharp.Core.UnitTests diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 5e2a8cdd00f..9765f0ae337 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -14,19 +14,12 @@ jobs: # You can define any steps you want, and they will run before the agent starts. # If you do not check out your code, Copilot will do this for you. steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: global-json-file: global.json - - name: Restore the compiler service solution - env: - CI: false - run: ./build.sh -c Release --verbosity quiet || true - - name: Restore the language server solution - env: - CI: false - run: dotnet build ./LSPSolutionSlim.sln -c Release --verbosity quiet || true - - name: Restore dotnet tools - env: - CI: false - run: dotnet tool restore + - name: Restore + run: | + dotnet restore FSharp.sln || true + dotnet restore LSPSolutionSlim.sln || true + dotnet tool restore || true diff --git a/Directory.Build.targets b/Directory.Build.targets index ece21b31c79..a4c4696dec9 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,4 +1,5 @@ + diff --git a/eng/targets/Bootstrap.targets b/eng/targets/Bootstrap.targets new file mode 100644 index 00000000000..67e2bcf6f82 --- /dev/null +++ b/eng/targets/Bootstrap.targets @@ -0,0 +1,90 @@ + + + + + + + $(ArtifactsDir)Bootstrap\ + + + $(BootstrapDir)fslex\fslex.dll + $(BootstrapDir)fsyacc\fsyacc.dll + $(BootstrapDir)fsc\fsc.dll + + + <_SkipBootstrap Condition="'$(Configuration)' == 'Proto'">true + <_SkipBootstrap Condition="'$(DisableCompilerRedirection)' == 'true'">true + <_SkipBootstrap Condition="'$(BUILDING_USING_DOTNET)' == 'true'">true + + + + + + + <_BootstrapNeeded>false + <_BootstrapNeeded Condition="!Exists('$(FsLexBootstrapPath)')">true + <_BootstrapNeeded Condition="!Exists('$(FsYaccBootstrapPath)')">true + <_BootstrapNeeded Condition="!Exists('$(FscBootstrapPath)')">true + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/proto.proj b/proto.proj index 313cf2efdca..b88fff03a8c 100644 --- a/proto.proj +++ b/proto.proj @@ -2,6 +2,7 @@ Bootstrap + Bootstrap From 125f014b95d2b36969086df69de8391262cd1c2b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 12:55:50 +0000 Subject: [PATCH 3/4] Fix Bootstrap.targets command syntax and validate functionality - Removed invalid /clp parameter from dotnet publish command - Tested bootstrap auto-detection and execution - Verified bootstrap skip on subsequent builds - Verified FSharp.Compiler.Service.sln doesn't trigger bootstrap - Verified error handling with proper MSBuild error messages Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --- eng/targets/Bootstrap.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/targets/Bootstrap.targets b/eng/targets/Bootstrap.targets index 67e2bcf6f82..5283ae7aff5 100644 --- a/eng/targets/Bootstrap.targets +++ b/eng/targets/Bootstrap.targets @@ -56,13 +56,13 @@ Target: _RunBootstrap Builds the bootstrap compiler by publishing proto.proj. - Uses minimal verbosity and errors-only console output for clean CI logs. + Uses minimal verbosity for clean CI logs. On failure, emits MSBuild error that stops the build. --> - From 02fff164931ed04941626c5227cfec429bfd53c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 13:59:53 +0000 Subject: [PATCH 4/4] Skip bootstrap for projects under artifacts directory Fixes issue where test projects in artifacts/Temp trigger bootstrap build, causing resource conflicts. Projects under artifacts/ now skip bootstrap since they are build outputs/temporary projects, not source code. Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --- eng/targets/Bootstrap.targets | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/targets/Bootstrap.targets b/eng/targets/Bootstrap.targets index 5283ae7aff5..df383bbcf36 100644 --- a/eng/targets/Bootstrap.targets +++ b/eng/targets/Bootstrap.targets @@ -26,10 +26,12 @@ - Configuration is Proto (we ARE the bootstrap) - DisableCompilerRedirection is true (user wants SDK compiler) - BUILDING_USING_DOTNET is true (FSharp.Compiler.Service.sln uses SDK compiler) + - MSBuildProjectDirectory is under artifacts (test/temp projects, build outputs) --> <_SkipBootstrap Condition="'$(Configuration)' == 'Proto'">true <_SkipBootstrap Condition="'$(DisableCompilerRedirection)' == 'true'">true <_SkipBootstrap Condition="'$(BUILDING_USING_DOTNET)' == 'true'">true + <_SkipBootstrap Condition="$(MSBuildProjectDirectory.StartsWith('$(ArtifactsDir)'))">true