Skip to content

Embed F# metadata trimming rules in compiled assemblies - #20527

Open
T-Gro wants to merge 8 commits into
dotnet:mainfrom
T-Gro:t-gro-metadata-stripping-proof
Open

T-Gro wants to merge 8 commits into
dotnet:mainfrom
T-Gro:t-gro-metadata-stripping-proof

Conversation

@T-Gro

@T-Gro T-Gro commented Sep 11, 2026

Copy link
Copy Markdown
Member

The generated file was added after compiler resource inputs had already been collected. Add it before that collection; existing custom XML takes precedence. Combine only unconditional F# metadata-removal rules when assemblies are linked, preserving other XML unchanged.

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

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

❗ Release notes required

You can open this PR in browser to add release notes: open in github.dev


✅ Found changes and release notes in following paths:

Change path Release notes path Description
`src/Compiler` docs/release-notes/.FSharp.Compiler.Service/11.0.100.md

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added ⚠️ Affects-Design-Time Tooling check: PR touches type providers or dependency manager ⚠️ Affects-Test-Tooling Tooling check: PR touches test framework infrastructure ⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen ⚠️ Affects-Build-Infra Tooling check: PR touches build infrastructure labels Sep 11, 2026
@github-actions

This comment has been minimized.

perf-bundle and others added 2 commits September 11, 2026 16:24
Remove the compiler XML parser, task changes, diagnostic and added fixture. Reuse GenerateILLinkSubstitutions at PrepareForILLink and pass its output as trimmer substitutions. Preserve standalone compilation and user resources without changing compiler code.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@T-Gro T-Gro changed the title Fix automatic F# metadata stripping during trimming Strip F# metadata during trimmed F# publishing Sep 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Tooling Safety Check — Affects-Build-Infra, Affects-Compiler-Output, Affects-Test-Tooling
Affects-Build-Infra: MSBuild target changes trimming-time task execution.
Affects-Compiler-Output: Publishing removes metadata from produced assemblies.
Affects-Test-Tooling: Trimming validation script controls test assertions.

Generated by PR Tooling Safety Check · gpt56 996.3K ·

Keep descriptor generation and trimmer arguments together, remove unnecessary XML quote escaping, and explain the separate input needed when the opt-out changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@T-Gro

T-Gro commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

/azp run fsharp-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@T-Gro
T-Gro requested a review from abonie September 14, 2026 13:59
perf-bundle and others added 3 commits September 14, 2026 16:25
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Embed defaults before compiler resource inputs are collected and let custom descriptors take precedence. Combine only unconditional metadata-removal documents during static linking, including already-combined producer assemblies, and preserve bounded mapped resource payloads.

Consolidate affected test duplication while retaining quotation and reflection coverage; add direct and chained descriptor composition checks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@T-Gro T-Gro changed the title Strip F# metadata during trimmed F# publishing Embed F# metadata trimming rules in compiled assemblies Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ Affects-Build-Infra Tooling check: PR touches build infrastructure ⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen ⚠️ Affects-Design-Time Tooling check: PR touches type providers or dependency manager ⚠️ Affects-Test-Tooling Tooling check: PR touches test framework infrastructure

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant