aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-10-07 22:34:45 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-10-08 16:54:31 -0700
commite5c2a7dbca103b0c61bebaff95c5d5a5b777bd59 (patch)
tree2f41df7e7c01286ef102dc7a814aae6c7cdf5f84 /src/Sema.zig
parent35d81c99c0f737f071e1ad0083342328dbb32acb (diff)
downloadzig-e5c2a7dbca103b0c61bebaff95c5d5a5b777bd59.tar.gz
zig-e5c2a7dbca103b0c61bebaff95c5d5a5b777bd59.zip
finish hooking up new dependency tree logic
* add Module instances for each package's build.zig and attach it to the dependencies.zig module with the hash digest hex string as the name. * fix incorrectly skipping the wrong packages for creating dependencies.zig * a couple more renaming of "package" to "module"
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 5e428c9f77..2df8b8570e 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -13075,13 +13075,13 @@ fn zirImport(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.
const operand = inst_data.get(sema.code);
const result = mod.importFile(block.getFileScope(mod), operand) catch |err| switch (err) {
- error.ImportOutsidePkgPath => {
- return sema.fail(block, operand_src, "import of file outside package path: '{s}'", .{operand});
+ error.ImportOutsideModulePath => {
+ return sema.fail(block, operand_src, "import of file outside module path: '{s}'", .{operand});
},
- error.PackageNotFound => {
+ error.ModuleNotFound => {
//const name = try block.getFileScope(mod).mod.getName(sema.gpa, mod.*);
//defer sema.gpa.free(name);
- return sema.fail(block, operand_src, "no package named '{s}' available within package '{}'", .{
+ return sema.fail(block, operand_src, "no module named '{s}' available within module '{}'", .{
operand, block.getFileScope(mod).mod.root,
});
},
@@ -13112,7 +13112,7 @@ fn zirEmbedFile(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
}
const embed_file = mod.embedFile(block.getFileScope(mod), name) catch |err| switch (err) {
- error.ImportOutsidePkgPath => {
+ error.ImportOutsideModulePath => {
return sema.fail(block, operand_src, "embed of file outside package path: '{s}'", .{name});
},
else => {