forked from ocaml/merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove old call to `flush_caches` Add `-cache-time` flag Add tests for `--cache-time` flag Add changelog entry for ocaml#1698 Change cache time measure to minutes. Fix quoting.t Fix cache-time.t tests Replace awk with sed in cache-time.t debug logs Fix grep pattern Investigate logs Flush file_cache logs Investigate logs Move test file Add
- Loading branch information
Showing
8 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,8 @@ | |
"extension": ".rei", | ||
"reader": "reason" | ||
} | ||
] | ||
], | ||
"cache_time": "5" | ||
} | ||
|
||
$ rm .merlin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
$ $MERLIN server stop-server | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 2.0) | ||
> EOF | ||
|
||
$ cat >dune <<EOF | ||
> | ||
> (executable | ||
> (name main) | ||
> (modules main) | ||
> EOF | ||
|
||
$ cat > main.ml <<EOF | ||
> let () = print_int 0 | ||
> EOF | ||
|
||
Let's populate file cache | ||
$ $MERLIN server errors -log-file merlin_logs -cache-time 45 \ | ||
> -filename main.ml 1> /dev/null <main.ml | ||
|
||
When cache time is set to large value, we keep the cache | ||
$ $MERLIN server errors -log-file merlin_logs -cache-time 45 \ | ||
> -filename main.ml 1> /dev/null <main.ml | ||
$ cat merlin_logs | grep -A1 "File_cache(Cmi_cache) - flush" \ | ||
> | tail -1 | sed 's/\ ".*\"//' | ||
keeping | ||
|
||
When cache time is set to 0, file cache gets flushed | ||
$ $MERLIN server errors -log-file merlin_logs -cache-time 0 \ | ||
> -filename main.ml 1> /dev/null <main.ml | ||
$ cat merlin_logs | grep -A1 "File_cache(Cmi_cache) - flush" \ | ||
> | tail -1 | sed 's/\ ".*\"//' | ||
removing | ||
|
||
Stop server | ||
$ $MERLIN server stop-server |