Skip to content

emit: §3 single-authority for variant-import detection (dedup direct-vs-variant use, −15 E0252) - #5562

Merged
briansrls merged 1 commit into
mainfrom
emitter/import-dedup-e0252
Jun 23, 2026
Merged

briansrls merged 1 commit into
mainfrom
emitter/import-dedup-e0252

Conversation

@briansrls

@briansrls briansrls commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

What

Extracts the 4-rung variant-parent resolution (same-module decl → reexport surface → imported-enum scope → import-module-enum scope) into one helper import_variant_parent_for_name, used by both the variant-emission set (all_parents → parent_list) and the direct-import exclusion (non_variant_top).

Why (§3 single authority)

The direct-import filter used a weaker variant-detection authority (is_known_variant over type_summaries) than the variant-line emitter (find_variant_parent_in_module over typed_modules). They disagreed on cross-module / reexported variants, so a name like File (a UriScheme variant) was emitted both as a direct pub use crate::extdeps_uri::{File} and a variant use crate::extdeps_uri::UriScheme::{File} → E0252 reimport. One authority now decides, so a name can never appear in both forms.

Verified by execution (faithful v2+dsl census)

Scope / out-of-scope

The remaining ~428 E0252 are a different root — emit_prelude() injects use crate::v1_rt::Witness into all modules while v2 std now defines Witness (E0255 redefinition + reimport cascade). That is the v1_rt-runtime-vs-std primitive-authority decision, routed to the value-grounding lane (stern-bat-782), not import hygiene. Region-local edit (import-emission ~2655); coordinated with the value-construct lane (~4693-5886).

Seed mirror (v1_compiler_emit_rust.rs) hand-synced to the .dag authority per current bootstrap protocol (regen --verify deferred, #5514).

@gunbai-bot gunbai-bot Bot changed the title Section 5 self-host execution manager: Lane A drive the emitted rust crate to cargo-green building (Route-A last mile) — CONTINUE the existing emitter/seed-green-integration branch which is mid-flight clearing compile errors, do NOT start fresh; Lane C TypeScript emit to first-class beyond the add s emit: §3 single-authority for variant-import detection (dedup direct-vs-variant use, −15 E0252) Jun 22, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 22, 2026 23:10
@briansrls
briansrls merged commit e932370 into main Jun 23, 2026
4 checks passed
@briansrls
briansrls deleted the emitter/import-dedup-e0252 branch June 23, 2026 01:31
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