Add allocation info in the test workflow

This commit is contained in:
Alexandros Naskos 2020-07-08 00:22:03 +03:00
parent 6dc05df0ac
commit 62ab67f751
3 changed files with 6 additions and 3 deletions

View File

@ -23,7 +23,7 @@ jobs:
- name: build
run: |
export PATH=./zig:$PATH
zig build
zig build -Dallocation_info
FILE=zig-cache/bin/zls

View File

@ -265,7 +265,10 @@ fn newDocument(self: *DocumentStore, uri: []const u8, text: []u8) anyerror!*Hand
// This includes the last separator
curr_path = curr_path[0 .. idx + 1];
var folder = try std.fs.cwd().openDir(curr_path, .{});
var folder = std.fs.cwd().openDir(curr_path, .{}) catch |err| switch(err) {
error.FileNotFound => continue,
else => return err,
};
defer folder.close();
// Try to open the file, read it and add the new document if we find it.

View File

@ -1643,7 +1643,7 @@ pub fn main() anyerror!void {
arena.state.buffer_list = .{};
if (debug_alloc) |dbg| {
std.log.notice(.main, "\n{}\n", .{dbg.info});
std.log.debug(.main, "\n{}\n", .{dbg.info});
}
}
}