Skip to content
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

Adapt to new cmt format for locate and occurrences + project wide occurrences #8

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
2e7801d
Pull changes from upsteam 4.14+index
voodoos Sep 27, 2023
548e8cb
Update vendored compiler to 414+index. Locate is broken.
voodoos Sep 27, 2023
8b99e24
Use new iterator to perform locate and occurrences
voodoos Sep 29, 2023
02be33c
tests: (rebase: move after changes) promote improved tests
voodoos Oct 9, 2023
c584de4
config: accept INDEX_FILE directive
voodoos Oct 25, 2023
c754807
occurrences: handle project wide queries
voodoos Oct 25, 2023
461aabb
tests: new and improved tests
voodoos Nov 14, 2023
5396ff0
Locate refactor
voodoos Nov 15, 2023
92fe41d
tests: Promote valid changes
voodoos Nov 15, 2023
7e897f0
More locate refactor
voodoos Nov 16, 2023
f9eb9ef
locate: more refactor
voodoos Nov 16, 2023
c6009df
occurrences: refactor iterator
voodoos Nov 16, 2023
9189fe9
locate: refactor: extract env_lookup
voodoos Nov 16, 2023
9bcc245
namespace: refactor: use kinds from compiler
voodoos Nov 16, 2023
636bc32
occurrences: index declarations when def not found
voodoos Nov 16, 2023
f6dcfa6
locate: refactor
voodoos Nov 16, 2023
027405a
Locate: refactmore
voodoos Nov 17, 2023
8f1ee55
test: promote ok test change
voodoos Nov 17, 2023
2341f15
Locate, return builtin uids
voodoos Nov 17, 2023
2597a5d
occurrences: show predefs in local buffer
voodoos Nov 17, 2023
d3360b7
index: to upstream: correct predef paths
voodoos Nov 17, 2023
07e65a1
reconstruct identifier: handle ()
voodoos Nov 17, 2023
451fa84
New and improved tests
voodoos Nov 17, 2023
1e0dc6e
test: illustrate issue with wrapping
voodoos Nov 21, 2023
26fd7e5
New `UNIT_NAME` configuration directive
voodoos Nov 22, 2023
2e618e1
occurrences: use new UNIT_NAME to fix issue with wrapping
voodoos Nov 22, 2023
08c06dc
shapes: dependent keep_alias
voodoos Nov 22, 2023
d3011c4
Reduce log verbosity when looking for a file
voodoos Nov 23, 2023
2e87e3a
Locate: traverse wrapping aliases
voodoos Nov 24, 2023
ac9a769
Index: fix issue with constr / label paths
voodoos Nov 24, 2023
f029e1c
Add a test for constr / label not found issue
voodoos Nov 24, 2023
57d8b47
test: show that uid counters are not restored correctly
voodoos Nov 27, 2023
93e9710
Reset uid counter when restoring the typer's state
voodoos Nov 27, 2023
a99ff3c
Create mli for index format and add stats
voodoos Nov 29, 2023
372cc6b
Improve location sort function
voodoos Nov 29, 2023
12220ca
Do not use external index if it might be out-of-sync
voodoos Nov 29, 2023
91898bd
Remove todo
voodoos Nov 29, 2023
00163b3
wip: forward desync information
voodoos Nov 29, 2023
1e8badb
Pull latest changes from upstream
voodoos Dec 19, 2023
f3a7490
Import small fix from upstream
voodoos Dec 19, 2023
7c33834
Adapt typer and analysis to upstream changes
voodoos Dec 20, 2023
714a91e
tests: add more locate/occurrences tests
voodoos Dec 20, 2023
e3b0a00
uid reset: correctly prune usage tables
voodoos Dec 21, 2023
5fc8a1b
tests: missing occurrences in type constraints
voodoos Dec 21, 2023
1632e4d
occ: Improve definition handling
voodoos Dec 22, 2023
a586798
test: show issue with definition outside of workspace
voodoos Jan 2, 2024
bacaa50
occ: consider the def is in the index
voodoos Jan 2, 2024
a902355
test: show issue when def is not reachable
voodoos Jan 3, 2024
92d10b8
occ: fix handling of usages without definition
voodoos Jan 3, 2024
41b88a0
Add test showing missing param occurrences
voodoos Jan 3, 2024
601d1a9
occ: improve local functor param answers
voodoos Jan 3, 2024
f9c024d
occ: restrict search to buffer when locate failed
voodoos Jan 3, 2024
69dcc55
occ: fix local-buffer paths
voodoos Jan 3, 2024
5d74c46
index: rely on size when mtime differ
voodoos Jan 5, 2024
f45caa6
index: rely on size only to check status
voodoos Jan 5, 2024
9066c67
tests: fix index changed test
voodoos Jan 8, 2024
217fdca
occ: index module in path when scope is local
voodoos Jan 16, 2024
3f991d1
test: illustrate shortcomings of Merlin when lid have spaces or comme…
voodoos Jan 16, 2024
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
Prev Previous commit
Next Next commit
test: promote ok test change
voodoos committed Jan 8, 2024
commit 8f1ee55da3cd86f37eb550a1adc13b6e39560e47
15 changes: 9 additions & 6 deletions tests/test-dirs/locate/non-local/ignore-kept-locs.t/run.t
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@ available:
"notifications": []
}

$ grep -A1 from_uid log | grep -v from_uid | sed '/^--$/d'
$ grep -A1 -e from_path -e find_loc_of_uid log |
> grep -v -e from_path -e find_loc_of_uid | sed '/^--$/d'
Loading the cmt file for unit "A"
Shapes successfully loaded, looking for A.0
Found location: File "a.ml", line 1, characters 4-9
@@ -40,7 +41,8 @@ available:
"notifications": []
}

$ grep -A1 from_uid log | grep -v from_uid | sed '/^--$/d'
$ grep -A1 -e from_path -e find_loc_of_uid log |
> grep -v -e from_path -e find_loc_of_uid | sed '/^--$/d'
Loading the cmt file for unit "A"
Shapes successfully loaded, looking for A.0
Found location: File "a.ml", line 1, characters 4-9
@@ -65,11 +67,12 @@ In the absence of cmt though, fallbacking to the cmi loc makes sense:
"notifications": []
}

$ grep -A1 from_uid log | grep -v from_uid
No definition uid, fallbacking to the declaration uid: A.0
$ grep -A1 -e from_path -e find_loc_of_uid log |
> grep -v -e from_path -e find_loc_of_uid
No definition uid, falling back to the declaration uid: A.0
Loading the cmt file for unit "A"
--
Failed to load the shapes
Uid not found in the cmt table. Fallbacking to the node's location: File "a.ml", line 1, characters 4-9
Failed to load the cmt file
Falling back to the declaration's location: File "a.ml", line 1, characters 4-9

$ rm log