Skip to content

Declare <T> on the 6 generic fns that used an undeclared type parameter (native broker 1C) - #13276

Merged
gunbai-bot[bot] merged 1 commit into
mainfrom
session/snappy-wolf-524-explicit-type-params
Oct 4, 2026
Merged

gunbai-bot[bot] merged 1 commit into
mainfrom
session/snappy-wolf-524-explicit-type-params

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Native broker 1C. gentle-dove-36 split this out of #13265 so the broker-relevant half can land now. #13265 (the scoping and the deletion of the implicit-name list) stays held behind derived-node-identity step 2.

Six generic functions used T without declaring <T>. They resolved only because a generic type declaration's parameters leak into module scope. The Rust emitter renders only declared parameters, so each one emitted as a generic function without its type parameter (E0425: cannot find type T). That is one of the broker closure's emitter blockers.

Module Functions
extdeps.languages.json.parse json_field_value, json_field_cause
extdeps.docker.container_inspect nested_value, nested_causes
gunbc.machine_intake.mtjade1_access_observation read_cause
gunbc.machine_intake.mtcollins1_boot_diagnostic_bundle members_channel

Each T is the fresh parameter of the generic reading type it consumes. A declared parameter is correct under today's scoping as well, so this change does not expose the name-lookup instantiation path that #13265 surfaced.

Checked:

  • all four modules resolve;
  • gunbc compile --entry dag/extdeps/languages/json/parse.dag --target rust now emits pub fn json_field_value<T: Clone>(...) and pub fn json_field_cause<T: Clone>(...), with 0 blocking diagnostics.

The census showing these 6 are the whole population is on #13265.

This is a source-only change, with no emitter or mirror edits.

🤖 Generated with Claude Code

json.parse json_field_value/json_field_cause, docker container_inspect
nested_value/nested_causes, mtjade1_access_observation read_cause,
mtcollins1_boot_diagnostic_bundle members_channel each used T without a <T>,
resolving only through the module-scope leak of a generic type's parameters.
The Rust emitter renders only declared parameters, so each emitted as a
generic fn without its type parameter (E0425 'cannot find type T'). Each T is
the fresh parameter of the reading type it consumes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LAND on code. Each helper's T is the fresh parameter carried by its JsonFieldRead/NestedObjectRead/MembersReading input, so declaring <T> on the function is the honest source repair under both today's leaked module scope and the intended declaration-local scope. This removes the six emitter E0425 sites without depending on #13265's scoping change or inventing a renderer exception. Exact-head CI is still running and the branch currently needs main integration, so this approval does not assert queue readiness.

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit cc2705e Oct 4, 2026
4 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/snappy-wolf-524-explicit-type-params branch October 4, 2026 15:59
@briansrls
briansrls restored the session/snappy-wolf-524-explicit-type-params branch October 9, 2026 17:10
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.

1 participant