From d2e0f43bf007f12a1c41658100def9c0083e490e Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 5 Aug 2026 13:33:52 -0700 Subject: [PATCH] remove anonymous import --- build.zig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 486dfe3..87ba7bf 100644 --- a/build.zig +++ b/build.zig @@ -144,9 +144,12 @@ pub fn build(b: *std.Build) void { root_module.addImport("httpz", httpz.module("httpz")); root_module.addImport("zeit", zeit.module("zeit")); root_module.addImport("srf", srf.module("srf")); - root_module.addAnonymousImport("airports.dat", .{ + // A named module rather than an anonymous import. Anonymous imports can put + // the same file in more than one module, which surfaces later as a confusing + // "file exists in multiple modules" error, and they leave the wiring implicit. + root_module.addImport("airports.dat", b.addModule("airports.dat", .{ .root_source_file = openflights.path("data/airports.dat"), - }); + })); root_module.addOptions("build_options", build_options); root_module.addIncludePath(maxminddb_upstream.path("include")); root_module.addIncludePath(b.path("libs/phoon_14Aug2014"));