Renamed leak_alloction build option to allocation_info

Switched to readAll and writeAll stream functions
Disabled logs on non-debug builds
Created freeDocument(doc), closeDocument(uri), called at appropriate sites
Removed _ = expr; for void values
Added and clarified some logging messages
Simplified builtin_completion generation
The JSON parser is now reused but reset after parsing a RPC
Fix memory leak when closing a document (last mem. leak)
Renamed leak_alloc to debug_alloc
Removed catch return statements from main(), rely on try to also get stacktraces instead
This commit is contained in:
Alexandros Naskos
2020-05-08 02:53:00 +03:00
parent 01ff89eea3
commit 02e57f5d59
2 changed files with 72 additions and 76 deletions

View File

@@ -31,8 +31,8 @@ pub fn build(b: *std.build.Builder) !void {
exe.addBuildOption(
bool,
"leak_detection",
b.option(bool, "leak_detection", "Use testing.LeakCountAllocator to track leaks.") orelse false,
"allocation_info",
b.option(bool, "allocation_info", "Enable use of debugging allocator and info logging.") orelse false,
);
exe.setTarget(target);