Skip to content

feat(api-surface): Roslyn extractor with member signatures#15

Merged
GioAbq merged 3 commits into
developfrom
feature/fex-api-method-signatures
Jun 20, 2026
Merged

feat(api-surface): Roslyn extractor with member signatures#15
GioAbq merged 3 commits into
developfrom
feature/fex-api-method-signatures

Conversation

@GioAbq

@GioAbq GioAbq commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

What

Replaces the regex-based API-surface extraction in Generate-ApiSurface.ps1 with a Roslyn-based tool (tools/FEx.ApiSurfaceGen) that renders exact member signatures - constructors, methods (with default values, generic constraints, overloads), and properties - which regex could not reliably capture.

Why

Consumer migrations (SynoDesk and others) fight signature drift. Without ctor/method/property signatures in fex-api, lookups fall back to reading FEx sources, breaking the "lookups via fex-api, never grep sources" rule.

Changes

  • New extractor tools/FEx.ApiSurfaceGen (Roslyn, Microsoft.CodeAnalysis.CSharp 5.3.0, zero transitive vulns).
  • TOML schema: flat [[ctors]]/[[methods]]/[[properties]] with a parent field (the hand-rolled reader cannot parse nested [[classes.methods]]).
  • Server: ApiEntry gains Parent + Constructor/Method/Property types; reader loads new sections; search_fex_api matches by parent; get_fex_project_api groups members under their declaring type (also fixes plural labels).
  • Generate-ApiSurface.ps1 is now a thin wrapper over the C# tool, preserving the Obsidian auto-sync.
  • Solution hygiene: added the two tools projects and three previously-missing libraries (FEx.Logging.Web, FEx.Telemetry.Sentry, FEx.Telemetry.Sentry.Web) to FEx.slnx; jb inspectcode -e=ERROR clean across all five.

Verification

Runtime-verified against the live MCP server: FExServiceProvider.InitializeAsync<TContainer>() shows all 3 overloads with where TContainer : class, IDisposable, new(); FlurlApiBase(IFlurlConfigurator) ctor and properties render correctly. Extension-method count rises 485 -> 833 (regex was dropping multi-line/nested-paren signatures).

GioAbq added 3 commits June 20, 2026 12:11
…hods/properties)

Replace regex extraction in Generate-ApiSurface.ps1 with a Roslyn-based tool
(tools/FEx.ApiSurfaceGen). Renders exact signatures - default values, generic
constraints, multi-line declarations, overloads - that regex could not capture
(e.g. extension methods were undercounted ~42%).

Schema: new flat [[ctors]]/[[methods]]/[[properties]] sections with a 'parent'
field (the hand-rolled TOML reader cannot parse nested [[classes.methods]]).
Server: ApiEntry gains Parent + Constructor/Method/Property types; reader loads
the new sections; search matches by parent; get_project_api groups members under
their declaring type (also fixes plural labels). Generate-ApiSurface.ps1 is now a
thin wrapper over the C# tool, preserving the Obsidian auto-sync.
Bring the whole public source tree under the solution (and thus the ReSharper
ERROR gate): the two tools projects (FEx.McpServer, FEx.ApiSurfaceGen) plus
three src libraries that were never added - FEx.Logging.Web, FEx.Telemetry.Sentry,
FEx.Telemetry.Sentry.Web. jb inspectcode -e=ERROR is clean across all five.
…properties)

First regeneration via the Roslyn extractor. Adds constructor, method, and
property signatures per type; extension-method count rises 485 -> 833 as the
regex extractor was silently dropping multi-line and nested-paren signatures.
@GioAbq GioAbq merged commit 28a7e39 into develop Jun 20, 2026
3 checks passed
@GioAbq GioAbq deleted the feature/fex-api-method-signatures branch June 20, 2026 10:44
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.

1 participant