aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-10-20 14:03:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-10-20 14:03:55 -0700
commit328ec15d9cae0373c1f973699c392db5b63ab886 (patch)
tree2c81e060907538a5668ffe03b54a114b56e2fe03 /src/Compilation.zig
parent6dc45e7d3186f81b1329c71b6380ff3ddd5dec41 (diff)
downloadzig-328ec15d9cae0373c1f973699c392db5b63ab886.tar.gz
zig-328ec15d9cae0373c1f973699c392db5b63ab886.zip
Revert "make distinct error limit configurable"
This reverts commit 78855bd21866b515018259a2194e036e4b3120df. This commit did not replace uses of `Type.err_int` of which there are currently 60 uses. Re-opens #786
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index e15ade5d5b..800c8288d0 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -739,7 +739,6 @@ pub const InitOptions = struct {
pdb_source_path: ?[]const u8 = null,
/// (Windows) PDB output path
pdb_out_path: ?[]const u8 = null,
- error_limit: ?Module.ErrorInt = null,
};
fn addModuleTableToCacheHash(
@@ -1433,7 +1432,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
.local_zir_cache = local_zir_cache,
.emit_h = emit_h,
.tmp_hack_arena = std.heap.ArenaAllocator.init(gpa),
- .error_limit = options.error_limit orelse (std.math.maxInt(u16) - 1),
};
try module.init();
@@ -2488,7 +2486,6 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes
man.hash.add(comp.bin_file.options.skip_linker_dependencies);
man.hash.add(comp.bin_file.options.parent_compilation_link_libc);
man.hash.add(mod.emit_h != null);
- man.hash.add(mod.error_limit);
}
try man.addOptionalFile(comp.bin_file.options.linker_script);
@@ -2869,10 +2866,6 @@ pub fn totalErrorCount(self: *Compilation) u32 {
}
}
}
-
- if (module.global_error_set.entries.len - 1 > module.error_limit) {
- total += 1;
- }
}
// The "no entry point found" error only counts if there are no semantic analysis errors.
@@ -3023,22 +3016,6 @@ pub fn getAllErrorsAlloc(self: *Compilation) !ErrorBundle {
for (module.failed_exports.values()) |value| {
try addModuleErrorMsg(module, &bundle, value.*);
}
-
- const actual_error_count = module.global_error_set.entries.len - 1;
- if (actual_error_count > module.error_limit) {
- try bundle.addRootErrorMessage(.{
- .msg = try bundle.printString("module used more errors than possible: used {d}, max {d}", .{
- actual_error_count, module.error_limit,
- }),
- .notes_len = 1,
- });
- const notes_start = try bundle.reserveNotes(1);
- bundle.extra.items[notes_start] = @intFromEnum(try bundle.addErrorMessage(.{
- .msg = try bundle.printString("use '--error-limit {d}' to increase limit", .{
- actual_error_count,
- }),
- }));
- }
}
if (bundle.root_list.items.len == 0) {