Commit ea64cf1
committed
fix(index): match AppMap metadata files by name, not JSON file type
On build 262 the AppMap indexes returned nothing, so metadata/name/classMap
lookups (and AppMap discovery) came up empty. Root cause: both the index
input filters and the appMapsWithExcluded search scope gated on
JsonFileType.INSTANCE, but JSON language support is provided by a separate
platform module whose file-type registration is not active in every runtime
(notably the 262 test sandbox). Files such as metadata.json were therefore
not classified as JSON, so a FileTypeSpecificInputFilter never offered them
to the indexer and getScopeRestrictedByFileTypes(..., JsonFileType) excluded
them from the query scope.
The files we index have specific, known names, so the JSON file type gate was
only ever an optimisation on top of an exact-name match. Replace the
FileTypeSpecificInputFilter with a plain FileBasedIndex.InputFilter that matches
by file name alone, and drop the JsonFileType restriction from
appMapsWithExcluded. The scope is only used to query our own name-matched
indexes and to locate *.appmap.json files by extension via the platform's
FilenameIndex, neither of which needs a file-type restriction.
Bump the shared index version (66 -> 67) to rebuild indexes once on upgrade.
Verified: the index tests and OpenRecentAppMapActionTest pass on both 251 and
262 (they failed on 262 before this change).
Assisted-by: Claude:claude-opus-4-81 parent 305708d commit ea64cf1
5 files changed
Lines changed: 14 additions & 39 deletions
File tree
- plugin-core/src/main/java/appland/index
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
Lines changed: 0 additions & 29 deletions
This file was deleted.
0 commit comments