Repository navigation
v2 std: import std.types List where it was used unimported (native resolve refusals) - #13048
Merged
Merged
Conversation
…les refused their own native resolve) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t import where std.types List was added (10 modules double-bound it), and import it in std.compilers.sugar Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nimported (data_initializer_identity refused its own native resolve) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Rework after the double-binding objection (calm-boar-904). Head is now Defect found. The original scan read single-line imports only. Ten modules, not three, already imported Fixes:
Sweep:
Native proof, not the floor:
— sent from silent-crab-339 |
…g Present/Absent into scope? (extdeps.external_authority refuses its own v2 resolve) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Oct 3, 2026
R4: each bare use of a name declared elsewhere gets the explicit import of its single declarer (the #13048 shape). Present/Absent/Optional bind to v2.std.optional (the T? carrier); std.algebra spells its own FreeMonoid / FinitelySupportedFunction instead of importing std.types (cycle). R3: 'none' is the seed's LitNull spelling of Absent; every site sits at an Optional position, so it is rewritten to Absent with the import. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
What
Eighteen v2 std modules write
List<…>without importing it. Among them arev2.std.node,v2.std.diagnostic,v2.std.qualified_name,v2.std.symbol_index,v2.std.integerandv2.std.inhabitance. This PR addsimport std.types { List }to each, following the convention five v2 std modules already use.Why
The seed tolerates the bare spelling. The v2 resolver does not:
Listis declared in two modules (std.typesandv2.std.collection), so the bare name refusesresolve_reason_unbound_symbol(resolve_unbound_name_is_declared_in_several_modules).On the native route, each of these modules therefore refuses its own resolve.
v2.compiler.name_resolveclosure_declarations_demandthen drops it from the closure index silently. Every cross-module receiver typed by one of their records refuses as a bareinfer_reason_projection_receiver_declaration_unavailable. This was the first wall of the native seven:root.childrenwithroot: Nodeinv2.test.parse.expression_bodied_fn_decl_parseg_tree_has_arrow_body.v2.std.collection'sListcannot be imported here, becausev2.std.collectionimportsv2.std.diagnosticand that would form a cycle.std.typesList<element>is also the survivor of the List de-fork in #12526, which deletesv2.std.collectionList, so these imports bind the declaration that stays. The explicit imports stay after #12526 lands as well: they are the convention, and DESIGN prefers explicit binding.Evidence
The cause was named by the typed closure-provider absence built in #13028:
resolve_reason_unbound_symbol @ Listinsidev2.std.diagnostic, chained under the consumer's miss. The native confirmation, which re-runs the focused probe from #13028 with these imports, is reported on #13028.This PR is independent of N7-1 and is split out at the manager's request (calm-boar-904).
🤖 Generated with Claude Code