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

tsserver support for a virtual filesystem #48497

Closed
wants to merge 72 commits into from
Closed
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
da2622c
initial scribbles
sandersn Mar 1, 2022
9e0e980
create vfs project
sandersn Mar 1, 2022
eb22b4f
Everything builds and tests pass
sandersn Mar 1, 2022
6afd939
Split fakesHosts and some utils into vfs.
sandersn Mar 2, 2022
91f47f7
Try to make test behave same as existing one
sandersn Mar 3, 2022
6224ddc
Test gets further than before
sandersn Mar 4, 2022
160490c
Test is now passing
sandersn Mar 7, 2022
287b6a5
New test better tests UpdateFileSystem
sandersn Mar 9, 2022
afecf63
try to add a step to test (it fails)
sandersn Mar 14, 2022
587ac14
Merge branch 'main' into server-vfs-support
sandersn Mar 14, 2022
24a8ba4
output vfs in tsserver.js
sandersn Mar 15, 2022
c4eb15c
Merge branch 'main' into server-vfs-support
sandersn Mar 16, 2022
85eee48
Copy file watching from virtualFileSystemWithWatch
sandersn Mar 24, 2022
050e058
Switch to virtualFileSystemWithWatch, move other files back
sandersn Mar 25, 2022
978c0bc
Tests build and run
sandersn Mar 25, 2022
a1b9983
Tests pass again
sandersn Mar 28, 2022
197308e
Merge branch 'main' into server-vfs-support
sandersn Mar 29, 2022
22c9470
Add tsserver entrypoint for vfs
sandersn Mar 30, 2022
11717fe
fix lint
sandersn Mar 31, 2022
bb00916
clean up oodate TODOs
sandersn Mar 31, 2022
6f599af
update cleaned-up API baseline
sandersn Mar 31, 2022
73adea3
Merge branch 'main' into server-vfs-support
sandersn Mar 31, 2022
1488440
Try manually reverting failing baseline
sandersn Mar 31, 2022
f67ef37
revert added newline from unix editor
sandersn Apr 1, 2022
5e0b517
move vfs test code vfs->harness
sandersn Apr 1, 2022
d0ad777
restore order of old code a bit
sandersn Apr 2, 2022
bacc170
Merge branch 'main' into server-vfs-support
sandersn Apr 7, 2022
b178a3c
Thread fshost through server
sandersn Apr 8, 2022
9e66575
Merge branch 'main' into server-vfs-support
sandersn Apr 18, 2022
6929642
Address more PR comments
sandersn Apr 20, 2022
a11d0eb
Address more PR comments
sandersn Apr 20, 2022
88b3bc9
rename vfs namespace + update API baseline
sandersn Apr 20, 2022
e7fa41d
Merge branch 'main' into server-vfs-support
sandersn May 6, 2022
04ce89c
extract most test code from VirtualServerHost
sandersn May 10, 2022
3c8ab33
Construct VirtualServerHost directly in tsserver
sandersn May 11, 2022
56887d9
Merge branch 'main' into server-vfs-support
sandersn May 11, 2022
77b3e5a
Rest of non-test suggestions
sandersn May 12, 2022
b0edfb1
Switch tests to baselines
sandersn May 13, 2022
5284804
Move new test to its own file
sandersn May 13, 2022
68cb6ba
Merge branch 'main' into server-vfs-support
sandersn May 16, 2022
71d038a
undo diff logging to minimise baseline churn
sandersn May 16, 2022
ab928dd
Restore setModifiedTime
sandersn May 16, 2022
050d5c1
fix most lint
sandersn May 16, 2022
2c5cabc
use eslint-disable not tslint:disable
sandersn May 16, 2022
d5a9736
Merge branch 'main' into server-vfs-support
sandersn May 25, 2022
c2d45f9
Get rid of separate `init` call for VirtualServerHost
sandersn May 25, 2022
c927b48
Improve diff of virtualFileSystemWithWatch.ts
sandersn May 25, 2022
fdd44be
Try to improve diff further
sandersn May 25, 2022
ab673e8
Little more diff cleanup
sandersn May 25, 2022
4643bc1
Merge branch 'main' into server-vfs-support
sandersn May 26, 2022
917ff00
Mechanical changes from PR
sandersn May 27, 2022
4bd683b
Add tests
sandersn May 31, 2022
0e05267
Merge branch 'main' into server-vfs-support
sandersn May 31, 2022
27b0e82
fix lint
sandersn Jun 3, 2022
8f0741d
Merge branch 'main' into server-vfs-support
sandersn Jun 3, 2022
8c32914
Merge branch 'main' into server-vfs-support
sandersn Jun 7, 2022
2098078
Address first PR comments
sandersn Jun 7, 2022
1374589
add RuntimeServerHost as Omit<ServerHost, FileServerHost>
sandersn Jun 7, 2022
a29c27c
remove newline from FileServerHost, undo RuntimeServerHost addition
sandersn Jun 7, 2022
2ba27a5
Create composite host/fshost.
sandersn Jun 8, 2022
8be58eb
Remove VirtualServerBastHost
sandersn Jun 8, 2022
e23c64b
move snap/diff out of tsserver
sandersn Jun 9, 2022
be91472
Merge branch 'main' into server-vfs-support
sandersn Jun 13, 2022
b31aaf3
More PR comments
sandersn Jun 14, 2022
32e4795
Address remaining comments
sandersn Jun 14, 2022
3e7d778
Improve API usage of VirtualServerHost
sandersn Jun 14, 2022
0f4c158
More PR comments
sandersn Jun 15, 2022
2e3596c
Merge branch 'main' into server-vfs-support
sandersn Jun 15, 2022
93388cf
Merge branch 'main' into server-vfs-support
sandersn Jun 28, 2022
af72aa6
fix(?) bad merge
sandersn Jun 28, 2022
f065e07
Merge branch 'main' into server-vfs-support
sandersn Jul 1, 2022
617009a
Merge branch 'main' into server-vfs-support
sandersn Aug 1, 2022
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
2 changes: 1 addition & 1 deletion src/harness/documentsUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,4 @@ namespace documents {
return vlq;
}
}
}
}
4 changes: 1 addition & 3 deletions src/harness/fakesHosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ namespace fakes {
private readonly _outputsMap: collections.SortedMap<string, number>;
public readonly traces: string[] = [];
public readonly shouldAssertInvariants = !Harness.lightMode;

private _setParentNodes: boolean;
private _sourceFiles: collections.SortedMap<string, ts.SourceFile>;
private _parseConfigHost: ParseConfigHost | undefined;
Expand Down Expand Up @@ -428,7 +427,7 @@ ${indentText}${text}`;
}

function expectedDiagnosticMessageToText([message, ...args]: ExpectedDiagnosticMessage) {
let text = ts.getLocaleSpecificMessage(message);
let text = ts.getLocaleSpecificMessage(message);
if (args.length) {
text = ts.formatStringFromArgs(text, args);
}
Expand Down Expand Up @@ -588,4 +587,3 @@ Actual All:: ${JSON.stringify(this.diagnostics.slice().map(diagnosticToText), /*
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/harness/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
{ "path": "../services" },
{ "path": "../jsTyping" },
{ "path": "../server" },
{ "path": "../typingsInstallerCore" }
{ "path": "../typingsInstallerCore" },
{ "path": "../vfs" }
],

"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/harness/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ namespace Utils {
value === undefined ? "undefined" :
JSON.stringify(value);
}
}
}
Loading