Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion install/worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const GITHUB_REPO = "justrach/codedb";
const FALLBACK_VERSION = "0.2.5";
const FALLBACK_VERSION = "0.2.52";
const INSTALL_SCRIPT_URL = `https://raw.githubusercontent.com/${GITHUB_REPO}/main/install/install.sh`;

export default {
Expand Down
17 changes: 17 additions & 0 deletions src/explore.zig
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,23 @@ pub const Explorer = struct {
if (self.root_dir) |*d| d.close();
}

pub fn releaseContents(self: *Explorer) void {
self.mu.lock();
defer self.mu.unlock();
var content_iter = self.contents.iterator();
while (content_iter.next()) |entry| {
self.allocator.free(entry.value_ptr.*);
}
self.contents.clearRetainingCapacity();
}

pub fn releaseSecondaryIndexes(self: *Explorer) void {
self.mu.lock();
defer self.mu.unlock();
self.sparse_ngram_index.deinit();
self.sparse_ngram_index = SparseNgramIndex.init(self.allocator);
}

pub fn indexFile(self: *Explorer, path: []const u8, content: []const u8) !void {
return self.indexFileInner(path, content, true, false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn mainImpl() !void {

// Handle --version early (no root needed)
if (std.mem.eql(u8, cmd, "--version") or std.mem.eql(u8, cmd, "-v") or std.mem.eql(u8, cmd, "version")) {
out.p("codedb 0.2.5\n", .{});
out.p("codedb 0.2.52\n", .{});
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/telemetry.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const index = @import("index.zig");

const RING_SIZE = 256;
const CLOUD_URL = "https://codedb.codegraff.com/telemetry/ingest";
const VERSION = "0.2.5";
const VERSION = "0.2.52";
const PLATFORM = std.fmt.comptimePrint("{s}-{s}", .{ @tagName(builtin.os.tag), @tagName(builtin.cpu.arch) });

pub const Event = struct {
Expand Down
Loading