Repository navigation
land kanban 584 - #408
Merged
StevenTCramer merged 6 commits intoNov 14, 2026
Merged
land kanban 584#408StevenTCramer merged 6 commits into
StevenTCramer merged 6 commits into
Conversation
Land-Holder: cramer
…type-handler-return-breaks-the-build-in
A handler returning new { ... } wrote the anonymous display name into the
generated NuruUserTypesJsonContext and into the invoker's result local and
local-function return type, so the consumer build failed (CS1001, CS1525).
ResultValueKind.Anonymous marks a result that is or contains an anonymous
type. The extractor names it object, the invoker prints it via ToString(),
and the JSON context task skips it. Docs and routing-40 cover it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StevenTCramer
merged commit Nov 14, 2026
7e6fcd8
into
feature/generator-fixes-2026-11-14
7 checks passed
StevenTCramer
deleted the
task/585-anonymous-type-handler-return-breaks-the-build-in
branch
November 14, 2026 07:43
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.
Summary
Anonymous-type handler results now build and print through
ToString().source/timewarp-nuru-analyzers/generators/models/result-value-kind.cs: newResultValueKind.Anonymous,set by
ResultValueKinds.Ofwhen the symbol is or contains an anonymous type (type argument, arrayelement, containing type; semantic check via
ITypeSymbol.IsAnonymousType).CanBeNullkeeps the nullguard for it.
handler-extractor.method-symbols.cs: oneValueReturnTypehelper for method symbols and inferred lambdareturns. An anonymous result's type name becomes
global::System.Object(Task when async), so thelocal function, the result local and the
__invocation.Resultcast all compile (objectaccepts the value).handler-invoker-emitter.output.cs:GetOutputStrategyreturns Raw forAnonymous(ToString(), no JSONtry/catch); capabilities describe the return as
System.Object, kind Primitive (same strategy call).GenerateNuruJsonContextTask.Extraction.cs:GetReturnTypeNamereturns null forAnonymous, so no[JsonSerializable]is written for it (the root cause of the reported CS1001/CS1525 cascade).documentation/user/features/output-handling.md: the note now saysnew { ... }builds and prints viaToString(); return a named record or class for JSON.
tests/timewarp-nuru-tests/routing/routing-40-anonymous-type-results.cs(runs in the CI multi-modeassembly, which also runs the JSON context MSBuild task): sync query, async block body,
List<anon>,command, and a null anonymous result.
Known limits: a
List<anon>prints its CLR type name (List1[...]), asToString()` does; JSON output stillneeds a named type.
Gates
./bin/dev build— pass (Build completed successfully)../bin/dev test— pass (runfile cache cleared first; 4705 tests passed, 0 failed, standalone phase 0 failed;routing-40 5/5).
ganda repo audit— pass afterganda repo audit --fixfor the advisoryvscode-window-iconwarning(git-ignored file only); rerun: "Repository passes all audit checks." The commit-hook attest then failed
runfile-executable(routing-40 lacked the executable bit); set it, andganda repo auditpasses again.Test plan
Smoke:
ganda runfile cache --clear (cd tests/timewarp-nuru-tests/routing && dotnet run routing-40-anonymous-type-results.cs)Expect: the file builds (no CS1001/CS1525 from
NuruUserTypesJsonContext.g.csorNuruGenerated.g.cs), andall 5 tests pass;
atr-infoprints{ Name = MyApp, Version = 1.0.0 },atr-async 2prints{ Count = 2 },atr-cmdprints{ Ok = True }, andatr-noneprints nothing.Kanban task 585
Session: 1411579