aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-27 21:28:54 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-28 08:39:19 -0400
commit093ed7d598f176816c0a463f6d6742849869e8be (patch)
tree3d76e62bae80a45d5805f585777362d423fc9147 /src
parent62cae61b822416979ff25b3672feb3679c93eebc (diff)
Make `file_resolve_cache` and `build_cache` thread_local to stop issues with tests
Diffstat (limited to 'src')
-rw-r--r--src/server/caches.odin2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/caches.odin b/src/server/caches.odin
index 7e87762..f1cdc2e 100644
--- a/src/server/caches.odin
+++ b/src/server/caches.odin
@@ -22,6 +22,7 @@ FileResolveCache :: struct {
files: map[string]FileResolve,
}
+@(thread_local)
file_resolve_cache: FileResolveCache
resolve_entire_file_cached :: proc(document: ^Document) -> map[uintptr]SymbolAndNode {
@@ -43,6 +44,7 @@ PackageCacheInfo :: struct {
timestamp: time.Time,
}
+@(thread_local)
build_cache: BuildCache