zigtools / scip-zig Goto Github PK
View Code? Open in Web Editor NEWSCIP indexer for Zig!
License: MIT License
SCIP indexer for Zig!
License: MIT License
I am new to Zig, so I imagine I'm doing something stupid here.
I installed zig and successfully built the scip-zig binary. My zig directory is at $HOME/zig
.
I tried running scip-zig --pkg std $HOME/zig/lib/std/std.zig --root std
and got the following error:
info: Loading --root
error: FileNotFound
/home/beyang/zig/lib/std/os.zig:1741:23: 0x239678 in std.os.openatZ (scip-zig)
.NOENT => return error.FileNotFound,
^
/home/beyang/zig/lib/std/fs.zig:1175:13: 0x21bf73 in std.fs.Dir.openFileZ (scip-zig)
try os.openatZ(self.fd, sub_path, os_flags, 0);
^
/home/beyang/zig/lib/std/fs.zig:1102:9: 0x2191d1 in std.fs.Dir.openFile (scip-zig)
return self.openFileZ(&path_c, flags);
^
/home/beyang/zig/lib/std/fs.zig:2718:5: 0x2446f5 in std.fs.openFileAbsolute (scip-zig)
return cwd().openFile(absolute_path, flags);
^
/home/beyang/src/github.com/zigtools/scip-zig/src/analysis/DocumentStore.zig:77:16: 0x243db3 in analysis.DocumentStore.loadFile (scip-zig)
var file = try std.fs.openFileAbsolute(concat_path, .{});
^
/home/beyang/src/github.com/zigtools/scip-zig/src/analysis/DocumentStore.zig:64:9: 0x242869 in analysis.DocumentStore.createPackage (scip-zig)
_ = try store.loadFile(package, try std.fs.path.relative(store.allocator, store.root_path, root));
^
/home/beyang/src/github.com/zigtools/scip-zig/src/main.zig:49:17: 0x23f2e1 in main (scip-zig)
try doc_store.createPackage(package_name.?, arg);
^
I also tried running scip-zig --pkg std src/scip.zig --root scip-zig
and got the same error. Is there something obvious I'm missing? I'm not sure which file it's looking for. Haven't used Zig much before, just trying to generate an index and then upload to sourcegraph.com, because I think that would be pretty cool!
This would allow us to use a [4]i32
rather than a std.ArrayListUnmanaged(i32)
in scip.zig
's Occurrence.range
which would save us a huge amount of memory!
Won't be as complete as with ZLS but will be more correct :)
The project cannot compile using the master of zig, I try to fix the compile errors, but unfortunetely it failed to run. the detail is below. it seems it is caused by the change of for range syntax .
info: Loading lib/zig/std/std.zig
info(analyzer): Initializing file lib/zig/std/std.zig
info: Loading lib/zig/std/array_list.zig
info(analyzer): Initializing file lib/zig/std/array_list.zig
thread 2434576 panic: index out of bounds: index 11649, len 11648
/Users/jyu/code/scip-zig/src/analysis/utils.zig:193:23: 0x1042326bd in fullWhile (scip-zig)
if (token_tags[result.else_token + 1] == .pipe) {
We currently cram everything into a single file which is completely broken for things that import external packages.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.