vscode/extensions
Nathan Shively-Sanders 3261c7d3af
Cross-file Typescript support in vscode-web (#169311)
* recreate logging from other machine

* comment out openSystemBrowser

Because I dont have the default browser set up correctnly on any of my
machiens

* Add vscode-wasm-typescript dep

And some logging as I figure out how to use it

* remove unused reference to module

* use require reference that linter allows

* Add vscode-wasm-typescript to tsserver.web.js

Use webpack's CopyPlugin transform pattern to do this manually. This is
probably a bad idea! It's just for prototyping purposes.

* Update vscode-wasm-typescript dependency

* Fix minor syntax in webpack hack

Nonetheless required for it to work!

* Fix another typo in webpack hack!

* Fix provided typescript path

Another typo. Guess my local test wasn't running the contents really

* Try to improve module.exports handling in webpack hac

* tsserver.web.js comes from local builds

Also:
- tsserver.js is no longer minified
- log crossOriginIsolated

* First attempt to set up server-side support

* Remove auto-imported identifier

* Move sync-api setup code to serverProcess.browser.ts

Because it's browser-specific

* Reorder webpack hack and clean up unused logging

* Update vscode-wasm/vscode-wasm-typescript dependencies

* Add file watching

* Extract webpack hack

Build only the ts parts of tsserver.web.js, don't rebuild the vscode
extension. This is a lot faster.

* Remove manual verbose logging

Sheetal showed me the correct way to create a verbose logger instead.

* Add vscode-test-web to semantic-supported schemes

And make isWeb support semantic mode.

* Also update the webpack-hack-only build

* Switch to tsserverlibrary

Also paste in some example code for cancellation, which is not finished
at all.

* Remove bogus auto-import and unneeded (?) dep

* remove webpack-like hack

* move code from vscode-wasm-typescript

* Initial prototype of cancellation

It compiles and looks kind of plausible. But I haven't tested it yet.

* Switch tsserver to separate MessageChannel

* Move watches to a separate MessagePort

Further simplifies the message dispatch code by shifting complexity to
setup. And the setup is straight-line code.

* switch vscode-web from in-memory to real filesystem

goto-def is currently broken because some part of main vscode still
needs treat the files as in-memory, though.

* Make toResource translate / -> vscode-test-web

* Encode scheme and authority in TS filenames

Like the previous host did, but without the leading ^ that TS hard-codes
as "in-memory".

The tsserver host needs to know about the encoding, but the translation
is in a single function. This also means that displayed file paths are
prefixed with /scheme/authority (/vscode-test-web/mount in my testing), but I think that's fine.

* Lift parseUri outside createServerHost

I'm not using it to set the schema/authority for getCurrentDirectory
right now, so there's no shared state to mutate.

* Special-case URI of lib*d.ts in webServer.toResource

Similar to the special-casing in typescriptServiceClient.toResource.
Also requires passing in the extensionUri. This feels like it's breaking
through at least one abstraction layer, which might be a problem.

* Improve cancellation

1. Simplify cancellation checking in web tsserver host to match the
checking in typescript's node host.
2. Move cancellation of request in the extension to tryCancelRequest
from sendNextRequests.
3. Only send cancellation via node or web cancellation, not both.

* Pass in current request instead of waiting for a fresh one.

* Address initial PR comments

Also add some TODO comments for the revision to watches.

* Add cancellation bit to each (cancellable) request, locally fix an issue with retrieving the cancellation bit

* Switch to per-file/directory watches

Watching the entire filesystem recursively is supposed to be
inefficient.

Not done yet: there is an error when watching directories, but it works.
And I can't tell whether watching files works yet.

* Parse --serverMode partialSemantic in webServer

Now the syntax server actually runs as a syntax server.

* Simplify logging code

* Cleanup in webServer

1. Remove a little logging.
2. Correct failure return value for getFileSize
3. Reorder some methods and parameters.

* Switch to markdown extension's FileWatcherManager

I'm not sure if it's OK to depend on a module from another extension;
it's probably better to include the files from a central place instead.

* Clean up host methods

1. Copy and adapt implementations from node host where possible.
2. Note questions for the PR elsewhere.
3. Remove logging except for caught exceptions.

* More logging/TODO cleanup

* Remove duplicate dependency

* Add setting to enable/disable semantic mode on web

Also gate it behind a check to `crossOriginIsolated`

* Re-order and re-arrange code to minimise PR diff

It won't minimise it *much*, but I also consolidated some
unnecessarily-spread-out code that will be easier to read in the long
term, and possibly easier to read in diff form as well.

* Copy fileWatchingManager to typescript extension

Copy from markdown extension to typescript extension. I used the
existing dependencies in the typescript extension, but verified that
they would work the same.

* Fix linting of webServer

* Align formatting of catch / else

* Extract isProjectWideIntellisenseOnWebEnabled and keep using in-memory prefix when project wide intellisense is disabled

* Make sure we still work if SharedArrayBuffers aren't supported

* Remove symlink support and fix typo

Symlinks are implicitly supported by the filesystem right now.

* Fix compile errors

Co-authored-by: Johannes <johannes.rieken@gmail.com>
Co-authored-by: Matt Bierner <matb@microsoft.com>
2023-01-12 11:54:39 -08:00
..
bat Update grammars 2021-05-04 13:42:19 +02:00
clojure offside languages: changing ignoreTrimWhitespace default to false (#169555) 2022-12-20 10:09:56 +01:00
coffeescript offside languages: changing ignoreTrimWhitespace default to false (#169555) 2022-12-20 10:09:56 +01:00
configuration-editing Reference original schema (devcontainers/spec#93) 2023-01-12 14:34:43 +01:00
cpp Update grammars (#165100) 2022-11-01 07:21:34 -07:00
csharp Reduce C# tokenization line length (#166968) 2022-11-22 07:00:14 -08:00
css Update css grammar (#150724) 2022-05-30 17:42:17 +02:00
css-language-features [html/css/json] pass the location of the localization bundle to the server (#168111) 2022-12-05 14:49:27 -08:00
dart Update grammars (#159445) 2022-08-29 14:08:44 +02:00
debug-auto-launch onboard built-in debug extensions to l10n (#166300) 2022-11-14 11:03:54 -08:00
debug-server-ready fix: serverReadyAction with ANSI colors (#170315) 2022-12-31 00:24:02 +01:00
diff Update grammars 2021-12-07 15:12:01 +01:00
docker
emmet Upgrade emmet-helper (#170188) 2022-12-29 00:09:10 +01:00
extension-editing Fix diagnostics for implicit activation events not appearing (#167081) 2022-11-23 10:33:32 -08:00
fsharp offside languages: changing ignoreTrimWhitespace default to false (#169555) 2022-12-20 10:09:56 +01:00
git Support continue in local clone from remote window (#171134) 2023-01-12 08:03:15 -08:00
git-base Engineering - adopt l10n for git-base/git/github extesions (#164566) 2022-10-28 11:27:08 +02:00
github fix #167628 (#170110) 2022-12-27 15:28:31 +01:00
github-authentication Add EMU to session telemetry (#171186) 2023-01-12 18:51:18 +01:00
go
groovy Update Groovy extension language contribution 2022-09-08 10:37:31 +02:00
grunt Adopt l10n for grunt and php-language-features (#165552) 2022-11-04 13:50:21 -07:00
gulp Adopt l10n for gulp (#165543) 2022-11-04 12:34:59 -07:00
handlebars handlebars extension not acivated in remote window (#168313) 2022-12-07 16:15:36 +01:00
hlsl
html Exclude strings from HTML grammar patch (#168306) 2022-12-07 14:44:00 +01:00
html-language-features [html/css/json] pass the location of the localization bundle to the server (#168111) 2022-12-05 14:49:27 -08:00
ini Default to config icon for the property language (#158454) 2022-09-26 07:00:07 -07:00
ipynb attachment field can be null (#170584) 2023-01-05 10:06:36 -08:00
jake Adopt l10n for jake (#165541) 2022-11-04 12:21:19 -07:00
java
javascript Use JSX in display names of the TypeScript React and JavaScript React languages (#168368) 2022-12-08 00:56:04 +01:00
json Add jsonc registration for TypeDoc config (#157362) 2022-09-26 15:51:23 +02:00
json-language-features [html/css/json] pass the location of the localization bundle to the server (#168111) 2022-12-05 14:49:27 -08:00
julia Update grammars 2022-03-07 15:18:39 +01:00
latex Update grammars (#167938) 2022-12-02 16:42:11 +01:00
less Removes g flag from wordPatterns. 2021-05-31 19:47:57 +02:00
log Update grammars (#154099) 2022-07-05 09:53:51 +02:00
lua update Lua-grammar (#167692) 2022-12-02 16:12:07 +01:00
make Update make grammar (#170948) 2023-01-10 11:50:28 +01:00
markdown-basics offside languages: changing ignoreTrimWhitespace default to false (#169555) 2022-12-20 10:09:56 +01:00
markdown-language-features Remove .only from test (#170970) 2023-01-10 16:14:18 +01:00
markdown-math Pick up more fixes for markdown-katex (#168678) 2022-12-14 16:57:21 -08:00
media-preview Update the telemetry modules (#170512) 2023-01-03 15:10:45 -05:00
merge-conflict Update the telemetry modules (#170512) 2023-01-03 15:10:45 -05:00
microsoft-authentication Update the telemetry modules (#170512) 2023-01-03 15:10:45 -05:00
notebook-renderers Fix #132143. Softer image update on rerun. (#170917) 2023-01-10 10:16:59 -08:00
npm Switch to standard imports (#169451) 2022-12-17 00:22:53 +01:00
objective-c Update C grammar locations (#151733) 2022-06-10 13:55:11 +00:00
perl Update grammars 2021-08-10 17:06:42 +02:00
php File snippets for HTML and PHP (#161881) 2022-09-27 08:15:57 -07:00
php-language-features Adopt standard style imports in php extension (#169192) 2022-12-15 10:24:29 -08:00
powershell Delete built-in PowerShell snippets 2022-03-31 11:41:06 -07:00
pug offside languages: changing ignoreTrimWhitespace default to false (#169555) 2022-12-20 10:09:56 +01:00
python offside languages: changing ignoreTrimWhitespace default to false (#169555) 2022-12-20 10:09:56 +01:00
r Better paired operators for R (#155882) 2022-09-13 09:37:21 +02:00
razor Update grammars (#167938) 2022-12-02 16:42:11 +01:00
references-view ensure (newly) selected item from references tree is visible in the editor (#168574) 2022-12-09 13:31:54 +01:00
restructuredtext Update grammars 2022-03-29 11:11:11 +02:00
ruby
rust Update grammars 2021-06-11 10:11:40 +02:00
scss Update grammars (#162673) 2022-10-04 08:50:55 -07:00
search-result auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
shaderlab
shellscript Try out new shellscript grammar! (#169118) 2022-12-14 12:52:31 +01:00
simple-browser Update the telemetry modules (#170512) 2023-01-03 15:10:45 -05:00
sql Update grammars (#165100) 2022-11-01 07:21:34 -07:00
swift Update Swift grammar 2022-03-15 11:05:34 +01:00
theme-abyss rename to Profile (#166030) 2022-11-10 13:25:07 -05:00
theme-defaults Fix active editor line foreground in Light+ V2 (#171185) 2023-01-12 18:43:24 +01:00
theme-kimbie-dark rename to Profile (#166030) 2022-11-10 13:25:07 -05:00
theme-monokai Improve focus border contrast for quiet light, solarized light, and monokai themes (#168237) 2022-12-06 23:52:11 +01:00
theme-monokai-dimmed Inherit editor inactive selection colors in terminal (Fix #158899) (#158950) 2022-08-25 01:00:34 +02:00
theme-quietlight Improve focus border contrast for quiet light, solarized light, and monokai themes (#168237) 2022-12-06 23:52:11 +01:00
theme-red Pick up new md grammar (#156844) 2022-08-01 17:13:55 -07:00
theme-seti The properties language uses a Java icon in the Seti theme (#161770) 2022-09-26 07:31:08 -07:00
theme-solarized-dark Pick up new md grammar (#156844) 2022-08-01 17:13:55 -07:00
theme-solarized-light Improve focus border contrast for quiet light, solarized light, and monokai themes (#168237) 2022-12-06 23:52:11 +01:00
theme-tomorrow-night-blue rename to Profile (#166030) 2022-11-10 13:25:07 -05:00
types
typescript-basics Fix includes check on jsdoc patching (#169446) 2022-12-16 23:36:22 +01:00
typescript-language-features Cross-file Typescript support in vscode-web (#169311) 2023-01-12 11:54:39 -08:00
vb add vba to extensions in the vb extension so that language detection works 2021-07-28 14:23:34 -07:00
vscode-api-tests Editors can steal focus later when opening slowly (fix #128117) (#170328) 2023-01-01 16:31:26 +01:00
vscode-colorize-tests Makefile tests for else ifeq|ifneq|... syntax (#170888) 2023-01-12 13:33:38 +01:00
vscode-test-resolver Start enforcing the tunnels API (#163187) 2022-10-10 10:10:24 -07:00
xml fix word range in XML. For #149318 2022-05-13 10:22:33 +02:00
yaml offside languages: changing ignoreTrimWhitespace default to false (#169555) 2022-12-20 10:09:56 +01:00
cgmanifest.json
mangle-loader.js more mangler output polishing (#169400) 2022-12-16 17:18:17 +01:00
package.json 🆙 @parcel/watcher@2.1.0 (#170603) 2023-01-05 02:28:31 -08:00
postinstall.mjs Reapply building of web server (#166391) 2022-11-15 14:55:40 -08:00
shared.webpack.config.js Fix extension private prop mangling when compiling all extensions (#167626) 2022-11-29 14:20:23 -08:00
tsconfig.base.json Update extension enabled tsconfig libs (#159631) 2022-08-31 07:57:15 +02:00
yarn.lock 🆙 @parcel/watcher@2.1.0 (#170603) 2023-01-05 02:28:31 -08:00