Skip to content

Commit

Permalink
Check if shared exists, if it doesn't then don't save it as collect…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
DanielGavin committed Oct 27, 2024
1 parent b6bf1f4 commit 908ea1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/server/requests.odin
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,13 @@ read_ols_initialize_options :: proc(config: ^common.Config, ols_config: OlsConfi

if "shared" not_in config.collections && odin_core_env != "" {
forward_path, _ := filepath.to_slash(odin_core_env, context.temp_allocator)
config.collections[strings.clone("shared")] = path.join(
elems = {forward_path, "shared"},
allocator = context.allocator,
)
shared_path := path.join(elems = {forward_path, "shared"}, allocator = context.allocator)

if os.exists(shared_path) {
config.collections[strings.clone("shared")] = shared_path
} else {
delete(shared_path)
}
}

log.info(config.collections)
Expand Down
4 changes: 2 additions & 2 deletions src/server/symbol.odin
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ SymbolPackageValue :: struct {}
SymbolProcedureValue :: struct {
return_types: []^ast.Field,
arg_types: []^ast.Field,
orig_return_types: []^ast.Field, //If there has been generics, we still store the unaltered version here
orig_arg_types: []^ast.Field, //If there has been generics, we still store the unaltered version here
orig_return_types: []^ast.Field, //When generics have overloaded the types, we store the original version here.
orig_arg_types: []^ast.Field, //When generics have overloaded the types, we store the original version here.
generic: bool,
}

Expand Down

0 comments on commit 908ea1b

Please sign in to comment.