Name the declaring method in [All]/[Queryable]/[FirstOrDefault] provider errors - #3939
Merged
Merged
Conversation
…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
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.
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 intoHttpGraphdiscovery, 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
After
Shape of the change
All six sites in
AllAttribute,QueryableAttributeandFirstOrDefaultAttribute. The sibling validation paths in those same files already named the member, each with its own copy of the formatting — that is hoisted toWolverineParameterAttribute.DescribeMemberso 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, sinceInMemoryPersistenceFrameProvidertakesIPersistenceFrameProvider's defaultTryBuild*Frameimplementations and returnsfalse. Actual output:The existing type-check tests assert with
ShouldContain, so the()suffixDescribeMemberadds does not disturb them. 6/6 pass in that file.🤖 Generated with Claude Code
https://claude.ai/code/session_01JG8Un6iNeyXECKJk3jo5uC