imports: retire the is_pub sketch on NamespaceTarget
Every namespace alias is module surface under the carry rule — the planned pub-import front-end form is superseded; no per-edge visibility flag is needed.
This commit is contained in:
@@ -365,7 +365,6 @@ test "buildImportFacts: namespaced file import captures target_module_path" {
|
|||||||
try std.testing.expectEqualStrings(main_path, g.importer_source);
|
try std.testing.expectEqualStrings(main_path, g.importer_source);
|
||||||
try std.testing.expectEqualStrings(point_path, g.target_module_path);
|
try std.testing.expectEqualStrings(point_path, g.target_module_path);
|
||||||
try std.testing.expect(g.own_decls.len >= 1);
|
try std.testing.expect(g.own_decls.len >= 1);
|
||||||
try std.testing.expect(!g.is_pub);
|
|
||||||
|
|
||||||
// The alias is also a `.namespace_decl` in the importer's scalar index.
|
// The alias is also a `.namespace_decl` in the importer's scalar index.
|
||||||
const m_idx = facts.decls.get(main_path) orelse return error.MissingMainIndex;
|
const m_idx = facts.decls.get(main_path) orelse return error.MissingMainIndex;
|
||||||
|
|||||||
@@ -482,14 +482,13 @@ pub const ModuleDecls = std.StringHashMap(ModuleRawDeclIndex);
|
|||||||
|
|
||||||
/// One namespace import edge: `alias :: #import "…"` (or `alias :: #import c …`).
|
/// One namespace import edge: `alias :: #import "…"` (or `alias :: #import c …`).
|
||||||
/// `target_module_path` is captured at resolution time (otherwise lost — it is
|
/// `target_module_path` is captured at resolution time (otherwise lost — it is
|
||||||
/// not derivable from the namespace node alone). `is_pub` stays false until the
|
/// not derivable from the namespace node alone). Every alias is module surface
|
||||||
/// `pub`-import phase lands the front-end form.
|
/// under the carry rule — there is no per-edge visibility flag.
|
||||||
pub const NamespaceTarget = struct {
|
pub const NamespaceTarget = struct {
|
||||||
alias: []const u8,
|
alias: []const u8,
|
||||||
importer_source: []const u8,
|
importer_source: []const u8,
|
||||||
target_module_path: []const u8,
|
target_module_path: []const u8,
|
||||||
own_decls: []const *Node,
|
own_decls: []const *Node,
|
||||||
is_pub: bool = false,
|
|
||||||
/// The `DeclId` of each member in `own_decls`, in slice order. Filled by
|
/// The `DeclId` of each member in `own_decls`, in slice order. Filled by
|
||||||
/// `buildDeclTable` (empty until then). Lets a member be addressed by stable
|
/// `buildDeclTable` (empty until then). Lets a member be addressed by stable
|
||||||
/// id without re-deriving it from the node pointer.
|
/// id without re-deriving it from the node pointer.
|
||||||
|
|||||||
Reference in New Issue
Block a user