Skip to content

Name the declaring method in [All]/[Queryable]/[FirstOrDefault] provider errors - #3939

Merged
jeremydmiller merged 1 commit into
mainfrom
gh-3937/name-declaring-method
Aug 13, 2026
Merged

Name the declaring method in [All]/[Queryable]/[FirstOrDefault] provider errors#3939
jeremydmiller merged 1 commit into
mainfrom
gh-3937/name-declaring-method

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Closes #3937.

The six provider-resolution throws named the parameter and its element type, but not the method the parameter is declared on.

That matters because these attributes validate at codegen. The failure can land on a chain the developer did not know was being compiled — an assembly carrying [assembly: WolverineModule] puts every endpoint in it into HttpGraph discovery, so a slim storeless test host fails at bootstrap over an endpoint it never asked for. Without the declaring method there is no thread in the message back to a type they recognise.

Before

The Wolverine.Persistence.Sagas.InMemoryPersistenceFrameProvider persistence provider does not
support [Queryable], so parameter 'logs' of element type
CritterWatch.Services.Model.AlertConfigChangeLog cannot be resolved.

After

The Wolverine.Persistence.Sagas.InMemoryPersistenceFrameProvider persistence provider does not
support [Queryable], so parameter 'logs' of element type
CritterWatch.Services.Model.AlertConfigChangeLog on
CritterWatch.Services.Endpoints.AlertConfigHistoryEndpoint.GetConfigHistory() cannot be resolved.

Shape of the change

All six sites in AllAttribute, QueryableAttribute and FirstOrDefaultAttribute. The sibling validation paths in those same files already named the member, each with its own copy of the formatting — that is hoisted to WolverineParameterAttribute.DescribeMember so all three attributes and both of their throw-site families share one spelling.

Tests

Three new tests in CoreTests/Persistence/all_and_queryable_validation.cs, one per attribute, each on a storeless host — which is exactly the reported scenario, since InMemoryPersistenceFrameProvider takes IPersistenceFrameProvider's default TryBuild*Frame implementations and returns false. Actual output:

... does not support [All], so parameter 'colors' of element type CoreTests.Persistence.ValidationColor
on CoreTests.Persistence.AllWithNoStoreHandler.Handle() cannot be resolved. Load the values explicitly
in a Before method instead.

The existing type-check tests assert with ShouldContain, so the () suffix DescribeMember adds does not disturb them. 6/6 pass in that file.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JG8Un6iNeyXECKJk3jo5uC

…der errors

Closes GH-3937.

The six provider-resolution throws named the parameter and its element type but
not the method the parameter is declared on. These attributes validate at
codegen, so the failure can land on a chain the developer did not know was being
compiled -- an assembly carrying [WolverineModule] puts every endpoint in it into
discovery, and a slim storeless test host then fails at bootstrap over an
endpoint it never asked for. Without the declaring method there is no thread in
the message back to a type they recognise.

Before:

  ... does not support [Queryable], so parameter 'logs' of element type
  CritterWatch.Services.Model.AlertConfigChangeLog cannot be resolved.

After:

  ... does not support [Queryable], so parameter 'logs' of element type
  CritterWatch.Services.Model.AlertConfigChangeLog on
  CritterWatch.Services.Endpoints.AlertConfigHistoryEndpoint.GetConfigHistory()
  cannot be resolved.

The sibling validation paths in the same files already did this, each with its
own copy of the formatting. Hoisted to WolverineParameterAttribute.DescribeMember
so all three attributes and both of their throw sites share one spelling.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JG8Un6iNeyXECKJk3jo5uC
@jeremydmiller
jeremydmiller merged commit a1fa9be into main Aug 13, 2026
38 checks 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.

[All]/[Queryable]/[FirstOrDefault] provider errors should name the declaring method

1 participant