Skip to content

Tell users when a registered extension loads nothing (instead of silently skipping it)#131

Merged
JordanMarr merged 1 commit into
JordanMarr:beta-4.1from
michaelglass:fix/extension-load-loud
Jun 10, 2026
Merged

Tell users when a registered extension loads nothing (instead of silently skipping it)#131
JordanMarr merged 1 commit into
JordanMarr:beta-4.1from
michaelglass:fix/extension-load-loud

Conversation

@michaelglass

@michaelglass michaelglass commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

small usability fix to the cli when using extensions ...

Register an extension in your TOML ([extensions] type_mappings) that loads no IExtendTypeMapping — a wrong/typo'd name, the wrong assembly, or types that failed to load — and SqlHydra silently ignores it: generation runs without the mapping and exits 0, so the only symptom is the affected columns quietly coming out unmapped, w ith no error.

loadNamed now errors instead, naming the extension and pointing at the likely fixes (does the [extensions] name match the package that implements it, is it referenced, did its types fail to load?).

…ension

A type-mapping extension registered via TOML ([extensions] type_mappings) that
yields zero ISqlHydraExtension implementations — a wrong/typo'd assembly name,
or one that failed to load — was silently ignored: generation ran without the
mapping and the affected columns were simply missing from the output, with
dotnet sqlhydra exiting 0.

loadNamed now raises a clear, actionable error in that case, pointing at the
likely fixes (the TOML name vs the package/assembly that implements the
extension; or a load failure). Adds DB-free unit tests for the named-but-empty
and missing-dll paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JordanMarr JordanMarr changed the base branch from main to beta-4.1 June 10, 2026 15:12
@JordanMarr JordanMarr merged commit 2ee4200 into JordanMarr:beta-4.1 Jun 10, 2026
1 check passed
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