Conversation
…ed types When a type provider uses ProvidedTypeBuilder.MakeGenericType to create e.g. option<SomeProvidedType>, the resulting TypeSymbol (OtherGeneric) did not implement GetNestedType, causing FSharpType.GetUnionCases to throw NotSupportedException. Fix: delegate GetNestedType to the underlying generic type definition in both TypeSymbol (OtherGeneric) and ProvidedTypeSymbol (Generic) cases, matching the existing pattern used by GetNestedTypes at those sites. Adds a regression test covering GetUnionCases on option<ProvidedType>. Fixes #336 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Feb 26, 2026
Closed
dsyme
approved these changes
Feb 26, 2026
dsyme
pushed a commit
that referenced
this pull request
Mar 7, 2026
🤖 *This PR was created by Repo Assist, an automated AI assistant.* Prepares the RELEASE_NOTES.md for version **8.3.0** — a minor release capturing significant improvements merged since 8.2.0 (February 24). ## Changes since 8.2.0 | Type | PR | Description | |------|----|-------------| | 🐛 Bug fix | #432 | Fix custom attributes on nested erased types | | 🐛 Bug fix | #458 | Fix `GetNestedType` on `TypeSymbol`/`ProvidedTypeSymbol` for generic provided types | | 🐛 Bug fix | #459 | Fix mutable variable captures in `QuotationSimplifier` — promote to ref cells | | ⚡ Performance | #443 | Memoize `transType` in `AssemblyCompiler` to reduce redundant type translation | | ⚡ Performance | #457 | Cache `transTypeRef` and `transMethRef` in assembly compiler | | ✨ Feature | #428 | New warning when all static parameters in a type provider are optional | | 📚 Docs | #455 | Documentation guide overhaul | | 🧪 Tests | #442 | Add coverage tests and Coverage build target | | 🔧 Toolchain | #431 | Update to .NET 8 SDK and toolchain | This is a minor version bump (8.2.0 → 8.3.0) due to the new feature (#428) and significant improvements. If preferred, a patch release (8.2.1) is also reasonable given the emphasis on bug fixes. ## Test Status This PR only modifies RELEASE_NOTES.md. The build/test status for the underlying changes is tracked in the individual PRs listed above (all passed CI before merging). --- *To release: merge this PR, then tag `v8.3.0` and publish the NuGet package via the existing build pipeline.* > Generated by [Repo Assist](https://github.com/fsprojects/FSharp.TypeProviders.SDK/actions/runs/22448247879) > > To install this [agentic workflow](https://github.com/githubnext/agentics/tree/afb00b92a9514fee9a14c583f059a03d05738f70/workflows/repo-assist.md), run > ``` > gh aw add githubnext/agentics@afb00b9 > ``` <!-- gh-aw-agentic-workflow: Repo Assist, engine: copilot, id: 22448247879, workflow_id: repo-assist, run: https://github.com/fsprojects/FSharp.TypeProviders.SDK/actions/runs/22448247879 --> <!-- gh-aw-workflow-id: repo-assist --> --------- Co-authored-by: Repo Assist <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant. Fixes #336.
Problem
FSharpType.GetUnionCases(and any code that callsGetNestedType) would throw aNotSupportedExceptionwhen called on a type created withProvidedTypeBuilder.MakeGenericTypewhere at least one type argument is a provided type. For example:Root cause
ProvidedTypeBuilder.MakeGenericType(typedefof<_ option>, [someProvidedType])produces aTypeSymbolwithTypeSymbolKind.OtherGeneric. ItsGetNestedTypeoverride unconditionally callednotRequired, even though the underlying generic type definition (FSharpOption(T)) is a real .NET type that supportsGetNestedType.Separately,
ProvidedTypeSymbol(used when the generic type definition itself is a provided type) had the same gap.Fix
Delegate
GetNestedTypeto the underlying generic type definition for both cases — exactly the same pattern already used byGetNestedTypesat the same sites.Test status
✅ New regression test
GetUnionCases works on option of provided typepasses.✅ All 103 existing tests pass, 1 pre-existing skip unchanged (
dotnet test tests/ -c Release).