Commit Graph

105 Commits

Author SHA1 Message Date
Techatrix
b623f141ea revive translateC support 2023-05-30 01:59:46 +02:00
Techatrix
3500aa7a76
update to new std.json api (#1191)
* update lsp.zig

* update to new `std.json` api

* update min zig version

* fix json api
2023-05-18 20:46:22 -04:00
Techatrix
029f5094ff
various intern pool & comptime interpreter changes (#1179)
* intern_pool: add getUnsignedInt

* add an empty struct literal

* resolve array length as usize in comptime interpreter

* use only one global intern pool

* store analysis errors in `DocumentStore.Handle`

* add typed undefined value

* add typed null value
2023-05-09 00:25:26 -04:00
Auguste Rame
471d971d1d
Merge pull request #1000 from Techatrix/stage2-zir
Embed AstGen into ZLS
2023-04-01 23:08:40 -04:00
Auguste Rame
99af009232
Disable build file config runs for WASI (#1102) 2023-04-01 23:07:38 -04:00
Techarix
4215edbc33 add support for running ast-check without zig 2023-04-01 23:03:51 +02:00
Lee Cannon
f24fcc2b1e
disable cimport resolution (#1091) 2023-03-23 13:28:42 -04:00
Techatrix
12014cd93d fix typos 2023-03-15 17:34:23 +01:00
Techatrix
dc7efa591c resolve relative include directories 2023-03-14 14:25:13 +00:00
Techatrix
ed91fd3823 fix leak in openDocument 2023-03-08 21:52:26 +01:00
Techatrix
8e6609e0f5 skip failed cimports on garbage collection 2023-03-07 12:28:20 +01:00
Auguste Rame
121f68b970
Fix build runner (#1029)
* Fix build runner

* Add zls module, bump version

* Fix path from root issue in modules (thanks daremakemyday from Twitch :))

* Libraryify

* remove build_runner backward compatibility

* Remove some `= undefined`s in Server.zig

Makes library use less dangerous

* Consistent mem model + custom build runner possible

* Add build runner utils for third-party tooling

* Make logs removable in libraries with zls_ prefix

* Fix build runner CI

* Expose references

* Use new addModule
2023-03-05 14:08:31 -05:00
Auguste Rame
ed908a2511
Rerun build.zig configuration extraction on zig_exe_path change (#1027) 2023-02-27 17:52:05 -05:00
Lee Cannon
5ede46f003
support new module cli arguments (#1019)
* support new module cli arguments

* capture the runtime zig version and store it on `Server`

* update build_runner action

* Use correct version for selecting arguments
2023-02-23 15:18:52 -05:00
Techatrix
0f77fd5b0e
add multi object for loop support (#1011)
* run `zig fmt`

* add support for multi object for loops

* add completion tests on multi object for loops

* update minimum zig build version

* use multi object for loops in codebase

* Update tres to latest version

* fix panics when generating document scope on invalid for loops
2023-02-21 17:11:35 -05:00
Lee Cannon
8bd5358748
build_runner: provide valid global cache to the build runner (#1009) 2023-02-17 15:26:03 -05:00
Techarix
2dffa9ef25 Merge branch 'master' into intern-pool 2023-02-14 23:48:57 +01:00
Techatrix
37ca1333ed
implement cInclude completions & goto definition (#970)
* implement cInclude completions & goto definition

* fix cImport features on windows

* fix relative path with `..`
2023-02-11 20:25:55 +00:00
Techarix
57fc10eec0 add predefined values to Index 2023-02-08 21:01:15 +01:00
Techarix
6278880f42 Merge branch 'master' into intern-pool 2023-02-08 20:10:17 +01:00
Techatrix
5a78cf1e50
optimize DocumentStore garbage collection (#969) 2023-02-05 00:24:37 -05:00
nullptrdevs
bd539ae989
[std.zig.] parse(alloc, src) -> Ast.parse(alloc, src, Ast.Mode) (#966)
* Work in Zig's breaking changes (build sys apis)

* [`std.zig.`] `parse(alloc, src)` -> `Ast.parse(alloc, src, Ast.Mode)`
2023-02-04 18:19:24 +00:00
Techarix
ef0cfadf8a Merge branch 'master' into intern-pool 2023-02-03 23:19:40 +01:00
Techatrix
e055f9d15c
remove unused capacity from Ast and DocumentStore (#941) 2023-01-26 16:57:07 -05:00
Techatrix
b09c317ae7 bug hunting 2023-01-24 22:07:19 +01:00
Techatrix
ba42fd2bb9 Merge branch 'master' into intern-pool 2023-01-20 22:23:44 +01:00
Techatrix
d49979d002 remove arena from ComptimeInterpreter 2023-01-14 21:30:52 +01:00
Techatrix
98899ed0cf some ComptieInterpreter work 2023-01-14 14:07:52 +01:00
Alex Kladov
61fa98065f
fix use after free (#911) 2023-01-11 20:18:37 +00:00
Auguste Rame
21b103c158
Fix build runner cwd causing relative @src (#898)
Co-authored-by: Nameless <truemedian@gmail.com>

Co-authored-by: Nameless <truemedian@gmail.com>
2023-01-08 23:13:20 -05:00
Techatrix
54e7d1da8b
fix compile errors when targeting wasm (#886)
* fix compile errors when targeting wasm

* update known-folders
2023-01-07 15:21:20 -05:00
Techatrix
d56a274c16 Merge branch 'master' into intern-pool 2023-01-04 04:42:06 +01:00
Techatrix
a574ac68ba
use more explicit error sets (#880) 2023-01-03 10:21:58 -05:00
Techatrix
c718e12d16
Autofix improvements (#879)
* improve autofix stability and client support

* run zig fmt
2023-01-02 14:59:01 -05:00
Techatrix
c88562ca78
optimize build.zig discovery (#863) 2022-12-29 18:21:26 -05:00
Techatrix
978e41b8a5
always use scoped logs instead of default (#864) 2022-12-29 18:20:12 -05:00
Techatrix
ebe3ba1471
Memory lifetime fixes (#861)
* fix memory lifetime issues

* more memory lifetime issue fixes
2022-12-29 00:59:19 -05:00
Techatrix
61c0981294
Use zig-lsp-codegen (#850)
* add lsp.zig

* change references from types.zig to lsp.zig

* remove types.zig and requests.zig

* add tres as a submodule

* transition codebase from types.zig to lsp.zig

* update lsp.zig

* completely overhaul message handler

* fix memory errors

* partially transition tests to lsp.zig

* update lsp.zig

* more test fixes

* disable failing tests

* fix message handling bugs

* fix remaining tests

* access correct union in diff.applyTextEdits

* more message handler fixes

* run zig fmt

* update tres submodule

* fix memory access to freed memory

* simplify initialize_msg for testing

* check if publishDiagnostics is supported
2022-12-27 01:47:57 -05:00
Techatrix
941882371c
fix memory lifetime issues (#851) 2022-12-27 00:52:15 -05:00
Techatrix
6118686d00 fix remaining compiler errors 2022-12-27 03:02:07 +01:00
Techatrix
03e50066a1 Merge branch 'master' into intern-pool 2022-12-27 01:53:55 +01:00
Techatrix
375daba743
improve behavior if zig_exe_path is not set (#830) 2022-12-17 03:03:05 -05:00
Techatrix
e1973afafc
fix cimport duplicate messages & crash (#828) 2022-12-16 15:24:03 -05:00
Techarix
748cd7d6a9 Merge remote-tracking branch 'origin/master' into intern-pool 2022-12-11 19:02:24 +01:00
Techatrix
4f180712bb add initial intern pool implementation 2022-12-02 00:08:45 +01:00
Lee Cannon
c3256c00e7
pass correct zig-cache path (#789) 2022-11-29 17:50:09 -05:00
Auguste Rame
c8dffc1f9b
Some comptime interpreter fixes 2022-11-10 20:51:02 -05:00
Auguste Rame
599c134593
Imports, cross-boundary resolution; can import std but dies on missing builtins / lang features 2022-11-08 14:37:13 -05:00
Auguste Rame
da00751726
Field access, function calls based on function value 2022-11-08 14:37:13 -05:00
Techatrix
862d30055a
fix cimport completion (#722) 2022-10-28 00:38:36 -04:00