Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Jun 4, 2024
1 parent dac8ae6 commit 1561e59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions analysis/bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ let main () =
in
match args with
| [_; "cache-project"; rootPath] -> (
Cfg.useProjectConfigCache := false;
Cfg.readProjectConfigCache := false;
let uri = Uri.fromPath rootPath in
match Packages.getPackage ~uri with
| Some package -> Cache.cacheProject package
| None -> print_endline "\"ERR\"")
| [_; "cache-delete"; rootPath] -> (
Cfg.useProjectConfigCache := false;
Cfg.readProjectConfigCache := false;
let uri = Uri.fromPath rootPath in
match Packages.findRoot ~uri (Hashtbl.create 0) with
| Some (`Bs rootPath) -> (
Expand Down
2 changes: 1 addition & 1 deletion analysis/src/Cache.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let writeCache filename (data : cached) =
close_out oc

let readCache filename =
if !Cfg.useProjectConfigCache && Sys.file_exists filename then
if !Cfg.readProjectConfigCache && Sys.file_exists filename then
try
let ic = open_in_bin filename in
let data : cached = Marshal.from_channel ic in
Expand Down
2 changes: 1 addition & 1 deletion analysis/src/Cfg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let inIncrementalTypecheckingMode =
| _ -> false
with _ -> false)

let useProjectConfigCache =
let readProjectConfigCache =
ref
(try
match Sys.getenv "RESCRIPT_PROJECT_CONFIG_CACHE" with
Expand Down

0 comments on commit 1561e59

Please sign in to comment.