Skip to content

Commit 66c5707

Browse files
committed
do not search for potential build files in Zig lib directory
1 parent 57c6173 commit 66c5707

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/DocumentStore.zig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,11 @@ pub const Handle = struct {
435435
};
436436
errdefer document_store.allocator.free(potential_build_files);
437437

438+
if (potential_build_files.len == 0) {
439+
self.impl.associated_build_file = .none;
440+
return .none;
441+
}
442+
438443
var has_been_checked: std.DynamicBitSetUnmanaged = try .initEmpty(document_store.allocator, potential_build_files.len);
439444
errdefer has_been_checked.deinit(document_store.allocator);
440445

@@ -1236,6 +1241,8 @@ fn collectPotentialBuildFiles(self: *DocumentStore, uri: Uri) ![]*BuildFile {
12361241
const tracy_zone = tracy.trace(@src());
12371242
defer tracy_zone.end();
12381243

1244+
if (isInStd(uri)) return &.{};
1245+
12391246
var potential_build_files: std.ArrayListUnmanaged(*BuildFile) = .empty;
12401247
errdefer potential_build_files.deinit(self.allocator);
12411248

0 commit comments

Comments
 (0)