Skip to content

[WIP] Cache granularity #1696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions tests/test-dirs/server-tests/typer-cache/granularity.t/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@


$ $MERLIN server stop-server

Let's start with populating typer cache
$ echo "let x = 1 \
\
module M = struct \
let y = 2 \
let z = 3 \
end" > before.ml

$ $MERLIN server errors -filename test.ml < before.ml
{
"class": "return",
"value": [],
"notifications": []
}

TODO: After change inside module, Merlin should reuse items that are in module's prefix.
$ echo "let x = 1 \
\
module M = struct \
let y = 2 \
let a = 4 \
let z = 3 \
end" > after.ml

$ $MERLIN server errors -filename test.ml < after.ml \
> -log-section Mtyper -log-file - 2>&1
# 0.01 Mtyper - compatible_prefix
reusing 1 items, 1 new items to type
{
"class": "return",
"value": [],
"notifications": []
}