Repository navigation
Commit 31026f3
committed
fix(bridge): gate getSourceFileByPath on program membership (issue #7)
Stock Program.getSourceFileByPath returns undefined for non-members;
Project.containsScriptInfo relies on that for 'does this project
contain the file'. The thin program's ungated byPath materialized an
SF for ANY path under tsserver, so containsFile over-reported and the
session's per-project references worker routed findReferences into
non-member projects — whose gated getSourceFile then threw 'Could not
find source file'. Surfaced whenever files from two tsconfig projects
were open and a references search crossed into the other project's
files (e.g. volar component-meta + tsc umbrella in one session).
Mirror the getSourceFile gate (lib files stay permissive). With both
layers fixed, the #7 repro scenario returns byte-identical reference
sets to stock (102/102, 103/103); sim-nav 37,409 units new=0; volar
suite 205/205.1 parent 3153431 commit 31026f3
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5043 | 5043 | | |
5044 | 5044 | | |
5045 | 5045 | | |
| 5046 | + | |
| 5047 | + | |
| 5048 | + | |
| 5049 | + | |
| 5050 | + | |
| 5051 | + | |
| 5052 | + | |
| 5053 | + | |
| 5054 | + | |
| 5055 | + | |
| 5056 | + | |
| 5057 | + | |
5046 | 5058 | | |
5047 | 5059 | | |
5048 | 5060 | | |
| |||
0 commit comments