Skip to content

Checker: do not copy inferred file signature - #20524

Open
auduchinok wants to merge 4 commits into
dotnet:mainfrom
auduchinok:no-inferred-signature-copy
Open

Checker: do not copy inferred file signature#20524
auduchinok wants to merge 4 commits into
dotnet:mainfrom
auduchinok:no-inferred-signature-copy

Conversation

@auduchinok

Copy link
Copy Markdown
Member

Continues #20478.

Removes extra copying of inferred signature which prevents extra work and reuses the symbols from the analysis in the signature.

@github-actions

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:

Warning

No PR link found in some release notes, please consider adding it.

Change path Release notes path Description
`src/Compiler` docs/release-notes/.FSharp.Compiler.Service/11.0.100.md No current pull request URL (#20524) found, please consider adding it

@github-actions github-actions Bot added the ⚠️ Affects-Design-Time Tooling check: PR touches type providers or dependency manager label Sep 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Tooling Safety Check — Affects-Design-Time
Affects-Design-Time: Changes background and transparent compiler analysis paths.

Generated by PR Tooling Safety Check · gpt56 835.2K ·

@T-Gro T-Gro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 🕵️ AI review — verify independently.

FSharpAssemblySignature(g, thisCcu, ccuSigForFile, tcImports, None, ccuSigForFile)

member _.FileSignature =
FSharpAssemblySignature(g, thisCcu, ownSigForFile, tcImports, None, ownSigForFile)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 🕵️ FileSignature loses the declaring entity of nested types from earlier files; PartialAssemblySignature returns the correct parent.

// First.fs
module First
module Nested =
    type R = { Value: int }

// Second.fs
module Second
let r: First.Nested.R = { Value = 1 }

// After checking Second.fs:
let owner =
    results.FileSignature.FindEntityByPath ["Second"]
    |> Option.get
    |> fun e -> e.MembersFunctionsAndValues
    |> Seq.find (fun v -> v.DisplayName = "r")
    |> fun v -> v.FullType.TypeDefinition.DeclaringEntity
    |> Option.map (fun e -> e.FullName)
// None; expected Some "First.Nested"

@T-Gro T-Gro added the AI-reviewed PR reviewed by AI review council label Sep 11, 2026
@T-Gro
T-Gro self-requested a review September 11, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ Affects-Design-Time Tooling check: PR touches type providers or dependency manager AI-reviewed PR reviewed by AI review council

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants