Skip to content

Conversation

@T-Gro
Copy link
Contributor

@T-Gro T-Gro commented Feb 7, 2024

Click “Files changed” → “⋯” → “View file” for the rendered RFC.

After the implementation of FS-1079 was merged in, @KevinRansom and I independently observed a failure in the compiler codebase when using a freshly built compiler with preview features on.
Important to note, this FS-1079 was not actively used anywhere.

What happened is that unpickling metadata from the built Fsharp.Compiler.Service.dll failed when encountering a combination of:

  • Discriminated union
  • In a signature file
  • In a module rec
  • Signature file was not exposing the .Is* testers in any way
  • Consumed from a different file which inline the usage

The usage of that type from a different type meant using type information from the signature file.
The resulting error was a general unpickling failure (".. error at node 6652") which only after rebuilding the compiler from scratch lead to the discovery of a union in module rec in .fsi undere that ID.

I believe the fix in dotnet/fsharp#16657 is good, but we must acknowledge that the .fsi files will now expose the .Is* testers even for F# consumers, not just on IL level.

@vzarytovskii vzarytovskii merged commit d81226d into fsharp:main Feb 7, 2024
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.

2 participants