Skip to content

Commit

Permalink
check and assert zig_lib_path != null
Browse files Browse the repository at this point in the history
  • Loading branch information
GalaxyShard committed Jan 14, 2025
1 parent 2eed83a commit 1569705
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/DocumentStore.zig
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ pub fn invalidateBuildFile(self: *DocumentStore, build_file_uri: Uri) void {
if (self.config.zig_exe_path == null) return;
if (self.config.build_runner_path == null) return;
if (self.config.global_cache_path == null) return;
if (self.config.zig_lib_path == null) return;

if (builtin.single_threaded) {
self.invalidateBuildFileWorker(build_file_uri, false);
Expand Down Expand Up @@ -1039,6 +1040,7 @@ fn loadBuildConfiguration(self: *DocumentStore, build_file_uri: Uri) !std.json.P
std.debug.assert(self.config.zig_exe_path != null);
std.debug.assert(self.config.build_runner_path != null);
std.debug.assert(self.config.global_cache_path != null);
std.debug.assert(self.config.zig_lib_path != null);

const build_file_path = try URI.parse(self.allocator, build_file_uri);
defer self.allocator.free(build_file_path);
Expand Down

0 comments on commit 1569705

Please sign in to comment.