Skip to content

Fold F# .fsproj ordering into msbuild-antipatterns AP-05 - #577

Merged
ViktorHofer merged 7 commits into
dotnet:mainfrom
T-Gro:feature/fsharp-projects-mgmt
Apr 27, 2026
Merged

Fold F# .fsproj ordering into msbuild-antipatterns AP-05#577
ViktorHofer merged 7 commits into
dotnet:mainfrom
T-Gro:feature/fsharp-projects-mgmt

Conversation

@T-Gro

@T-Gro T-Gro commented Apr 22, 2026

Copy link
Copy Markdown
Member

Replaces #248.

AP-05 tells users to drop explicit <Compile Include> lists — correct for C#, but silently wrong for any order-dependent compiler (F#, and therefore any mixed-language solution). A two-sentence exception in AP-05 (plus ported eval scenarios) covers it inline.

T-Gro and others added 6 commits March 5, 2026 22:53
… files

Teaches agents F# compilation order rules, signature file placement,
and common FS0039/FS0010/FS0034 fixes. Includes eval with three scenarios
(add module, fix broken order, add signature file) and test fixtures.

Validated +64.6% improvement on gpt-4.1 (significant, CI [+17.2%, +63.0%]).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… files

Teaches agents F# compilation order rules, signature file placement,
and common FS0039/FS0010/FS0034 fixes. Includes eval with three scenarios
(add module, fix broken order, add signature file) and test fixtures.

Validated +64.6% improvement on gpt-4.1 (significant, CI [+17.2%, +63.0%]).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Scraps the standalone fsharp-project-structure skill and instead adds a
short F# exception to AP-05 (Manual File Listing in SDK-Style Projects):
F# compilation is order-dependent, so .fsproj files must list Compile
items in dependency order (utilities first, entry point last), and .fsi
signature files must appear immediately before their companion .fs.

The three F# eval scenarios (add module, fix broken order, add signature
file) are ported into tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml
with fixtures isolated under a fsharp/ subfolder (with empty
Directory.Build.{props,targets} to prevent the existing C#-antipattern
fixture files from leaking into the F# builds).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 22, 2026 18:36
@T-Gro
T-Gro requested a review from a team April 22, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the msbuild-antipatterns guidance and eval coverage to account for F#’s order-dependent compilation, avoiding incorrect advice to remove explicit <Compile Include> lists in .fsproj files.

Changes:

  • Add an AP-05 exception documenting F# .fsproj compile-order requirements (including .fsi placement).
  • Add F# fixture projects (OrderService, intentionally-broken BrokenOrder) to support eval scenarios about ordering and signature files.
  • Extend the dotnet-msbuild/msbuild-antipatterns eval suite with F#-specific scenarios.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/OrderService/Domain.fs Adds F# domain types for a “correctly ordered” fixture project.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/OrderService/Services.fs Adds service functions that depend on Domain.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/OrderService/Program.fs Adds a simple executable entrypoint consuming Services/Domain.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/OrderService/OrderService.fsproj Adds an explicitly ordered <Compile Include> list for the F# fixture.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/BrokenOrder/Domain.fs Adds domain types for the intentionally broken-order fixture.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/BrokenOrder/Services.fs Adds code that will fail if compiled before Domain.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/BrokenOrder/Program.fs Adds executable entrypoint for the broken-order fixture.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/BrokenOrder/BrokenOrder.fsproj Deliberately incorrect compile order to trigger ordering diagnostics in eval.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/Directory.Build.props Prevents parent C#-specific props from leaking into F# fixtures.
tests/dotnet-msbuild/msbuild-antipatterns/fsharp/Directory.Build.targets Prevents parent C#-specific targets from leaking into F# fixtures.
tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml Adds new eval scenarios covering F# file ordering and .fsi placement.
plugins/dotnet-msbuild/skills/msbuild-antipatterns/SKILL.md Documents the new AP-05 exception for F# .fsproj ordering/signatures.
agentic-workflows/dotnet-msbuild/shared/compiled/style-and-modernization.lock.md Mirrors the AP-05 exception into the compiled workflow import (but currently appears truncated).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agentic-workflows/dotnet-msbuild/shared/compiled/style-and-modernization.lock.md Outdated
Comment thread tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml
Comment thread tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml
Comment thread tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml
@ViktorHofer

Copy link
Copy Markdown
Member

@T-Gro I just removed the agentic workflow for msbuild. You can reset your changes to that file.

…ects-mgmt

# Conflicts:
#	agentic-workflows/dotnet-msbuild/shared/compiled/style-and-modernization.lock.md
@T-Gro

T-Gro commented Apr 27, 2026

Copy link
Copy Markdown
Member Author

ok, done

@ViktorHofer

Copy link
Copy Markdown
Member

/evaluate

github-actions Bot added a commit that referenced this pull request Apr 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

Skill Scenario Quality Skills Loaded Overfit Verdict
msbuild-antipatterns Review MSBuild files for anti-patterns and style issues 1.0/5 → 1.0/5 ✅ msbuild-antipatterns; tools: skill, glob / ⚠️ NOT ACTIVATED ✅ 0.06 [1]
msbuild-antipatterns Add a module to an F# project 3.0/5 → 3.3/5 🟢 ⚠️ NOT ACTIVATED ✅ 0.06 [2]
msbuild-antipatterns Fix broken file order causing FS0039 3.3/5 → 3.7/5 🟢 ⚠️ NOT ACTIVATED ✅ 0.06 [3]
msbuild-antipatterns Add a signature file to define public API 4.3/5 → 5.0/5 🟢 ⚠️ NOT ACTIVATED ✅ 0.06 [4]

[1] ⚠️ High run-to-run variance (CV=0.74) — consider re-running with --runs 5. (Plugin) Quality unchanged but weighted score is -1.9% due to: tokens (75585 → 111394)
[2] ⚠️ High run-to-run variance (CV=2.03) — consider re-running with --runs 5
[3] ⚠️ High run-to-run variance (CV=0.97) — consider re-running with --runs 5
[4] ⚠️ High run-to-run variance (CV=0.83) — consider re-running with --runs 5. (Isolated) Quality improved but weighted score is -12.8% due to: judgment

Model: claude-opus-4.6 | Judge: claude-opus-4.6

🔍 Full Results - additional metrics and failure investigation steps

▶ Sessions Visualisation -- interactive replay of all evaluation sessions

@ViktorHofer
ViktorHofer merged commit a55227f into dotnet:main Apr 27, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants