Conversation
Adds GenerativeMethodsTests.fs covering instance methods, methods with parameters, static methods, method name lookup (exercises ILMethodDefs lazy dictionary), and method count for generative type providers. 137/137 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions Bot
added a commit
that referenced
this pull request
Apr 19, 2026
…tom attr encoding); prepare release 8.7.0 Adds GenerativeCustomAttributeTests.fs with 5 focused tests covering custom attribute encoding in the generative IL writer for attribute targets and argument types not previously exercised: - ObsoleteAttribute(string, bool) on the generated TYPE ITSELF - DescriptionAttribute(string) on an instance METHOD - Multiple attributes on the same method (all-attrs preserved path) - DebuggerBrowsableAttribute(DebuggerBrowsableState) on a property (enum argument round-trip via underlying int) - Scalar bool argument round-trip Also updates RELEASE_NOTES.md with 8.7.0 entry covering this and the previously-merged GenerativeMethodsTests (#505). All 147 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 19, 2026
dsyme
pushed a commit
that referenced
this pull request
Apr 20, 2026
…ase 8.7.0 (#506) 🤖 *This is an automated pull request from Repo Assist.* ## Summary Adds `GenerativeCustomAttributeTests.fs` — 5 regression tests for custom attribute encoding in the generative IL writer. These cover attribute targets and argument types not previously exercised by the existing tests in `BasicGenerativeProvisionTests.fs` (which only tested attributes on *properties*). Also updates `RELEASE_NOTES.md` with a new `8.7.0` entry covering this and the previously-merged `GenerativeMethodsTests` (#505). ## New tests | Test | What it verifies | |------|-----------------| | `Custom attribute on a generative type round-trips correctly` | `ObsoleteAttribute(string, bool)` placed on the *type definition itself* | | `Custom attribute with bool constructor argument round-trips correctly` | `bool` values survive the ECMA-335 encode/decode path | | `Custom attribute with enum constructor argument round-trips correctly` | `DebuggerBrowsableAttribute(DebuggerBrowsableState.Never)` — enum arg decoded as underlying int | | `Multiple custom attributes on a single generative method are all preserved` | `defineCustomAttrs` writes **all** attributes, not just the first | | `Custom attribute on a generative method has correct string argument` | `DescriptionAttribute(string)` on an instance method | ## Root cause / motivation Several custom-attribute encoding bugs were fixed in earlier PRs (`#432`, `#490`, `#501`). This PR adds focused regression tests for the remaining un-covered paths: - attributes on **types** (not just members) - attributes on **methods** (not just properties) - **bool** and **enum** constructor argument encoding - multiple attributes on a single member ## Test Status ``` Passed! - Failed: 0, Passed: 147, Skipped: 0, Total: 147, Duration: 7 s ``` All 147 tests pass (142 pre-existing + 5 new). > Generated by 🌈 Repo Assist, see [workflow run](https://github.com/fsprojects/FSharp.TypeProviders.SDK/actions/runs/24617397828). [Learn more](https://github.com/githubnext/agentics/blob/main/docs/repo-assist.md). > > To install this [agentic workflow](https://github.com/githubnext/agentics/blob/97143ac59cb3a13ef2a77581f929f06719c7402a/workflows/repo-assist.md), run > ``` > gh aw add githubnext/agentics@97143ac > ``` <!-- gh-aw-agentic-workflow: Repo Assist, engine: copilot, model: auto, id: 24617397828, workflow_id: repo-assist, run: https://github.com/fsprojects/FSharp.TypeProviders.SDK/actions/runs/24617397828 --> <!-- gh-aw-workflow-id: repo-assist --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@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 is an automated PR from Repo Assist.
Summary
Task 9 – Testing Improvements: Add
GenerativeMethodsTests.fswith 6 dedicated tests for methods in generative type providers.Changes
New:
tests/GenerativeMethodsTests.fsSix tests covering methods in generative type providers:
Greet()is emitted, is non-staticGreet()returnsstringwith no parametersAdd(x: int, y: int) : inthas correct parameter names, types, and return typeCreate()is emitted as a static method returningobjGetMethod(name)for all three methods; directly exercises theILMethodDefslazy name-lookup dictionaryUpdated:
tests/FSharp.TypeProviders.SDK.Tests.fsprojAdded
GenerativeMethodsTests.fsto the compile group (afterGenerativeDelegateTests.fs).Motivation
The existing tests exercise methods indirectly (e.g. via
BasicGenerativeProvisionTests.fs) but there was no dedicated, self-contained file for method reflection on generative types — unlike the dedicated files already present for events, delegates, enums, interfaces, structs, abstract classes, and equality comparisons. Having a focused file makes it easier to diagnose regressions and documents the expected method-reflection contract.Test Status
✅ 137/137 tests pass (baseline was 131; 6 new tests added, all green)