feat(api-surface): Roslyn extractor with member signatures#15
Merged
Conversation
…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.
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.
What
Replaces the regex-based API-surface extraction in
Generate-ApiSurface.ps1with 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
tools/FEx.ApiSurfaceGen(Roslyn,Microsoft.CodeAnalysis.CSharp5.3.0, zero transitive vulns).[[ctors]]/[[methods]]/[[properties]]with aparentfield (the hand-rolled reader cannot parse nested[[classes.methods]]).ApiEntrygainsParent+ Constructor/Method/Property types; reader loads new sections;search_fex_apimatches by parent;get_fex_project_apigroups members under their declaring type (also fixes plural labels).Generate-ApiSurface.ps1is now a thin wrapper over the C# tool, preserving the Obsidian auto-sync.FEx.slnx;jb inspectcode -e=ERRORclean across all five.Verification
Runtime-verified against the live MCP server:
FExServiceProvider.InitializeAsync<TContainer>()shows all 3 overloads withwhere 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).