Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 210af27

Browse files
committedNov 30, 2020
vscode: Make eslint pass
I disabled code-layering and code-import-patterns as I don't think we can make them easily pass as we reference all sorts of code from both browser and node files. At least not worth the headache now to refactor everything.
1 parent c153cd6 commit 210af27

File tree

2 files changed

+89
-48
lines changed

2 files changed

+89
-48
lines changed
 

‎ci/dev/lint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ main() {
1313
fi
1414

1515
cd lib/vscode
16-
yarn eslint --max-warnings=0
16+
# Run this periodically in vanilla VS code to make sure we don't add any more warnings.
17+
yarn eslint --max-warnings=3
1718
cd "$OLDPWD"
1819
}
1920

‎ci/dev/vscode.patch

Lines changed: 87 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
diff --git a/.eslintrc.json b/.eslintrc.json
2+
index 055bc22f8e48e7dee559b83ac56c12a54c6ad544..14c026c04a7df5ac94bea2856e3a7a513c213775 100644
3+
--- a/.eslintrc.json
4+
+++ b/.eslintrc.json
5+
@@ -64,7 +64,7 @@
6+
"code-no-standalone-editor": "warn",
7+
"code-no-unexternalized-strings": "warn",
8+
"code-layering": [
9+
- "warn",
10+
+ "off",
11+
{
12+
"common": [],
13+
"node": [
14+
@@ -90,7 +90,7 @@
15+
}
16+
],
17+
"code-import-patterns": [
18+
- "warn",
19+
+ "off",
20+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21+
// !!! Do not relax these rules !!!
22+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
123
diff --git a/.gitignore b/.gitignore
224
index b7f5b58c8ede171be547c56b61ce76f79a3accc3..856fbd8c67460fe099d7fbee1475e906b500f053 100644
325
--- a/.gitignore
@@ -437,7 +459,7 @@ index ef2291d49b13c9c995afc90eab9c92afabc2b3b4..29b2f9dfc2b7fa998ac1188db06dee95
437459
\ No newline at end of file
438460
+}
439461
diff --git a/src/vs/base/node/languagePacks.js b/src/vs/base/node/languagePacks.js
440-
index 2c64061da7b01aef0bfe3cec851da232ca9461c8..c0ef8faedd406c38bf9c55bbbdbbb060046492d9 100644
462+
index 2c64061da7b01aef0bfe3cec851da232ca9461c8..db47fe2eb1cded1e9c33b42fe700421c36a1d481 100644
441463
--- a/src/vs/base/node/languagePacks.js
442464
+++ b/src/vs/base/node/languagePacks.js
443465
@@ -128,7 +128,10 @@ function factory(nodeRequire, path, fs, perf) {
@@ -448,12 +470,12 @@ index 2c64061da7b01aef0bfe3cec851da232ca9461c8..c0ef8faedd406c38bf9c55bbbdbbb060
448470
+ // NOTE@coder: Swapped require with readFile since require is cached and
449471
+ // we don't restart the server-side portion of code-server when the
450472
+ // language changes.
451-
+ return JSON.parse(fs.readFileSync(configFile, "utf8"));
473+
+ return JSON.parse(fs.readFileSync(configFile, 'utf8'));
452474
} catch (err) {
453475
// Do nothing. If we can't read the file we have no
454476
// language pack config.
455477
diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts
456-
index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..62a79602a831bca0dc62ad57dc10a9375f8b9cdb 100644
478+
index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..e490cf7449623f96c780a65d538fad72cf9306e4 100644
457479
--- a/src/vs/code/browser/workbench/workbench.ts
458480
+++ b/src/vs/code/browser/workbench/workbench.ts
459481
@@ -17,6 +17,7 @@ import { isStandalone } from 'vs/base/browser/browser';
@@ -496,7 +518,7 @@ index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..62a79602a831bca0dc62ad57dc10a937
496518
+ };
497519
+
498520
+ // Strip the protocol from the authority if it exists.
499-
+ const normalizeAuthority = (authority: string): string => authority.replace(/^https?:\/\//, "");
521+
+ const normalizeAuthority = (authority: string): string => authority.replace(/^https?:\/\//, '');
500522
+ if (config.remoteAuthority) {
501523
+ (config as any).remoteAuthority = normalizeAuthority(config.remoteAuthority);
502524
+ }
@@ -788,7 +810,7 @@ index 096b9e23493539c9937940a56e555d95bbae38d9..ef37e614004f550f7b64eacd362f6894
788810
remove(key: string, scope: StorageScope): void {
789811
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
790812
new file mode 100644
791-
index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84a892f49d
813+
index 0000000000000000000000000000000000000000..ead6a3cd5e98fdde074f19ee5043f152ed407146
792814
--- /dev/null
793815
+++ b/src/vs/server/browser/client.ts
794816
@@ -0,0 +1,240 @@
@@ -825,15 +847,15 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
825847
+ * Remove extra slashes in a URL.
826848
+ */
827849
+export const normalize = (url: string, keepTrailing = false): string => {
828-
+ return url.replace(/\/\/+/g, "/").replace(/\/+$/, keepTrailing ? "/" : "");
850+
+ return url.replace(/\/\/+/g, '/').replace(/\/+$/, keepTrailing ? '/' : '');
829851
+};
830852
+
831853
+/**
832854
+ * Get options embedded in the HTML.
833855
+ */
834856
+export const getOptions = <T extends Options>(): T => {
835857
+ try {
836-
+ return JSON.parse(document.getElementById("coder-options")!.getAttribute("data-settings")!);
858+
+ return JSON.parse(document.getElementById('coder-options')!.getAttribute('data-settings')!);
837859
+ } catch (error) {
838860
+ return {} as T;
839861
+ }
@@ -946,12 +968,12 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
946968
+ const logService = (services.get(ILogService) as ILogService);
947969
+ const storageService = (services.get(IStorageService) as IStorageService);
948970
+ // We set this here first in case the path changes.
949-
+ const updateCheckEndpoint = path.join(window.location.pathname, "/update/check")
971+
+ const updateCheckEndpoint = path.join(window.location.pathname, '/update/check');
950972
+ const getUpdate = async (): Promise<void> => {
951-
+ logService.debug("Checking for update...");
973+
+ logService.debug('Checking for update...');
952974
+
953975
+ const response = await fetch(updateCheckEndpoint, {
954-
+ headers: { "Accept": "application/json" },
976+
+ headers: { 'Accept': 'application/json' },
955977
+ });
956978
+ if (!response.ok) {
957979
+ throw new Error(response.statusText);
@@ -964,7 +986,7 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
964986
+ return;
965987
+ }
966988
+
967-
+ const lastNoti = storageService.getNumber("csLastUpdateNotification", StorageScope.GLOBAL);
989+
+ const lastNoti = storageService.getNumber('csLastUpdateNotification', StorageScope.GLOBAL);
968990
+ if (lastNoti) {
969991
+ // Only remind them again after two days.
970992
+ const timeout = 1000*60*24*2;
@@ -974,7 +996,7 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
974996
+ }
975997
+ }
976998
+
977-
+ storageService.store("csLastUpdateNotification", Date.now(), StorageScope.GLOBAL);
999+
+ storageService.store('csLastUpdateNotification', Date.now(), StorageScope.GLOBAL);
9781000
+ (services.get(INotificationService) as INotificationService).notify({
9791001
+ severity: Severity.Info,
9801002
+ message: `[code-server v${json.latest}](https://github.com/cdr/code-server/releases/tag/v${json.latest}) has been released!`,
@@ -993,9 +1015,9 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
9931015
+ updateLoop();
9941016
+
9951017
+ // This will be used to set the background color while VS Code loads.
996-
+ const theme = storageService.get("colorThemeData", StorageScope.GLOBAL);
1018+
+ const theme = storageService.get('colorThemeData', StorageScope.GLOBAL);
9971019
+ if (theme) {
998-
+ localStorage.setItem("colorThemeData", theme);
1020+
+ localStorage.setItem('colorThemeData', theme);
9991021
+ }
10001022
+};
10011023
+
@@ -1091,7 +1113,7 @@ index 0000000000000000000000000000000000000000..5dd5406befcb593ad6366d9e98f46485
10911113
+export const IExtHostNodeProxy = createDecorator<IExtHostNodeProxy>('IExtHostNodeProxy');
10921114
diff --git a/src/vs/server/browser/mainThreadNodeProxy.ts b/src/vs/server/browser/mainThreadNodeProxy.ts
10931115
new file mode 100644
1094-
index 0000000000000000000000000000000000000000..21a139288e5b8f56016491879d69d01da929decb
1116+
index 0000000000000000000000000000000000000000..acabf8c167cabc954b8611a77f57641f3ca0b444
10951117
--- /dev/null
10961118
+++ b/src/vs/server/browser/mainThreadNodeProxy.ts
10971119
@@ -0,0 +1,55 @@
@@ -1134,7 +1156,7 @@ index 0000000000000000000000000000000000000000..21a139288e5b8f56016491879d69d01d
11341156
+ scheme: window.location.protocol.replace(':', ''),
11351157
+ authority: window.location.host,
11361158
+ // Use FileAccess to get the static base path.
1137-
+ path: FileAccess.asBrowserUri("", require).path,
1159+
+ path: FileAccess.asBrowserUri('', require).path,
11381160
+ query: `tar=${encodeURIComponent(extensionUri.path)}`,
11391161
+ });
11401162
+ const response = await fetch(fetchUri.toString(true));
@@ -1424,7 +1446,7 @@ index 0000000000000000000000000000000000000000..56331ff1fc32bbd82e769aaecb551e42
14241446
+require('../../bootstrap-amd').load('vs/server/entry');
14251447
diff --git a/src/vs/server/ipc.d.ts b/src/vs/server/ipc.d.ts
14261448
new file mode 100644
1427-
index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78fc72a5c6
1449+
index 0000000000000000000000000000000000000000..0a4a91e5e36bda7f888feedda348aaff5fe32d27
14281450
--- /dev/null
14291451
+++ b/src/vs/server/ipc.d.ts
14301452
@@ -0,0 +1,131 @@
@@ -1537,8 +1559,8 @@ index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78
15371559
+ readonly logLevel?: number;
15381560
+ readonly workspaceProvider?: {
15391561
+ payload: [
1540-
+ ["userDataPath", string],
1541-
+ ["enableProposedApi", string],
1562+
+ ['userDataPath', string],
1563+
+ ['enableProposedApi', string],
15421564
+ ];
15431565
+ };
15441566
+ };
@@ -1561,7 +1583,7 @@ index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78
15611583
+}
15621584
diff --git a/src/vs/server/node/channel.ts b/src/vs/server/node/channel.ts
15631585
new file mode 100644
1564-
index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1e95c3b9d
1586+
index 0000000000000000000000000000000000000000..4827b2da780b66e6dfd65c2a2f1c938cb23f6c26
15651587
--- /dev/null
15661588
+++ b/src/vs/server/node/channel.ts
15671589
@@ -0,0 +1,897 @@
@@ -1995,7 +2017,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
19952017
+class Terminal {
19962018
+ private readonly process: TerminalProcess;
19972019
+ private _pid: number = -1;
1998-
+ private _title: string = "";
2020+
+ private _title: string = '';
19992021
+ public readonly workspaceId: string;
20002022
+ public readonly workspaceName: string;
20012023
+ private readonly persist: boolean;
@@ -2032,7 +2054,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
20322054
+ onFirstListenerDidAdd: () => {
20332055
+ // We only need to replay if the terminal is being reconnected which is
20342056
+ // true if there is a dispose timeout.
2035-
+ if (typeof this.disposeTimeout !== "undefined") {
2057+
+ if (typeof this.disposeTimeout !== 'undefined') {
20362058
+ return;
20372059
+ }
20382060
+
@@ -2045,7 +2067,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
20452067
+ events: [{
20462068
+ cols: this.cols,
20472069
+ rows: this.rows,
2048-
+ data: this.replayData.join(""),
2070+
+ data: this.replayData.join(''),
20492071
+ }]
20502072
+ });
20512073
+ },
@@ -2264,15 +2286,15 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
22642286
+
22652287
+ private async createTerminalProcess(remoteAuthority: string, args: terminal.ICreateTerminalProcessArguments): Promise<terminal.ICreateTerminalProcessResult> {
22662288
+ const terminalId = this.id++;
2267-
+ logger.debug('Creating terminal', field('id', terminalId), field("terminals", this.terminals.size));
2289+
+ logger.debug('Creating terminal', field('id', terminalId), field('terminals', this.terminals.size));
22682290
+
22692291
+ const shellLaunchConfig: IShellLaunchConfig = {
22702292
+ name: args.shellLaunchConfig.name,
22712293
+ executable: args.shellLaunchConfig.executable,
22722294
+ args: args.shellLaunchConfig.args,
22732295
+ // TODO: Should we transform if it's a string as well? The incoming
22742296
+ // transform only takes `UriComponents` so I suspect it's not necessary.
2275-
+ cwd: typeof args.shellLaunchConfig.cwd !== "string"
2297+
+ cwd: typeof args.shellLaunchConfig.cwd !== 'string'
22762298
+ ? transformIncoming(remoteAuthority, args.shellLaunchConfig.cwd)
22772299
+ : args.shellLaunchConfig.cwd,
22782300
+ env: args.shellLaunchConfig.env,
@@ -2464,7 +2486,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
24642486
+}
24652487
diff --git a/src/vs/server/node/connection.ts b/src/vs/server/node/connection.ts
24662488
new file mode 100644
2467-
index 0000000000000000000000000000000000000000..5c3caf4d12cbf9b7228699ec4fa40cb406aa6307
2489+
index 0000000000000000000000000000000000000000..fb7999ee343ddfd5f225a5ef727c9e559059fb58
24682490
--- /dev/null
24692491
+++ b/src/vs/server/node/connection.ts
24702492
@@ -0,0 +1,189 @@
@@ -2562,7 +2584,7 @@ index 0000000000000000000000000000000000000000..5c3caf4d12cbf9b7228699ec4fa40cb4
25622584
+ private readonly environment: INativeEnvironmentService,
25632585
+ ) {
25642586
+ super(protocol, token);
2565-
+ this.logger = logger.named("exthost", field("token", token));
2587+
+ this.logger = logger.named('exthost', field('token', token));
25662588
+ this.protocol.dispose();
25672589
+ this.spawn(locale, buffer).then((p) => this.process = p);
25682590
+ this.protocol.getUnderlyingSocket().pause();
@@ -2648,7 +2670,7 @@ index 0000000000000000000000000000000000000000..5c3caf4d12cbf9b7228699ec4fa40cb4
26482670
+ this.sendInitMessage(buffer);
26492671
+ break;
26502672
+ default:
2651-
+ this.logger.error('Unexpected message', field("event", event));
2673+
+ this.logger.error('Unexpected message', field('event', event));
26522674
+ break;
26532675
+ }
26542676
+ });
@@ -3138,7 +3160,7 @@ index 0000000000000000000000000000000000000000..3d428a57d31f29c40f9c3ce45f715b44
31383160
+};
31393161
diff --git a/src/vs/server/node/protocol.ts b/src/vs/server/node/protocol.ts
31403162
new file mode 100644
3141-
index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84924213db
3163+
index 0000000000000000000000000000000000000000..57213f92828fafefcab0e3c401a1e8ede472c9cc
31423164
--- /dev/null
31433165
+++ b/src/vs/server/node/protocol.ts
31443166
@@ -0,0 +1,91 @@
@@ -3180,7 +3202,7 @@ index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84
31803202
+ return new Promise((resolve, reject) => {
31813203
+ const timeout = setTimeout(() => {
31823204
+ logger.error('Handshake timed out', field('token', this.options.reconnectionToken));
3183-
+ reject(new Error("timed out"));
3205+
+ reject(new Error('timed out'));
31843206
+ }, 10000); // Matches the client timeout.
31853207
+
31863208
+ const handler = this.onControlMessage((rawMessage) => {
@@ -3235,7 +3257,7 @@ index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84
32353257
+}
32363258
diff --git a/src/vs/server/node/server.ts b/src/vs/server/node/server.ts
32373259
new file mode 100644
3238-
index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb1261051c71e08b
3260+
index 0000000000000000000000000000000000000000..5521d51a92d1b1e3469e890bae41277b560d08a2
32393261
--- /dev/null
32403262
+++ b/src/vs/server/node/server.ts
32413263
@@ -0,0 +1,302 @@
@@ -3249,7 +3271,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
32493271
+import { getMachineId } from 'vs/base/node/id';
32503272
+import { ClientConnectionEvent, createChannelReceiver, IPCServer, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
32513273
+import { LogsDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner';
3252-
+import { main } from "vs/code/node/cliProcessMain";
3274+
+import { main } from 'vs/code/node/cliProcessMain';
32533275
+import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
32543276
+import { ConfigurationService } from 'vs/platform/configuration/common/configurationService';
32553277
+import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc';
@@ -3297,7 +3319,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
32973319
+import { Protocol } from 'vs/server/node/protocol';
32983320
+import { getUriTransformer } from 'vs/server/node/util';
32993321
+import { REMOTE_TERMINAL_CHANNEL_NAME } from 'vs/workbench/contrib/terminal/common/remoteTerminalChannel';
3300-
+import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from "vs/workbench/services/remote/common/remoteAgentFileSystemChannel";
3322+
+import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from 'vs/workbench/services/remote/common/remoteAgentFileSystemChannel';
33013323
+import { RemoteExtensionLogFileName } from 'vs/workbench/services/remote/common/remoteAgentService';
33023324
+
33033325
+export class Vscode {
@@ -3343,8 +3365,8 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
33433365
+ logLevel: getLogLevel(environment),
33443366
+ workspaceProvider: {
33453367
+ payload: [
3346-
+ ["userDataPath", environment.userDataPath],
3347-
+ ["enableProposedApi", JSON.stringify(options.args["enable-proposed-api"] || [])]
3368+
+ ['userDataPath', environment.userDataPath],
3369+
+ ['enableProposedApi', JSON.stringify(options.args['enable-proposed-api'] || [])]
33483370
+ ],
33493371
+ },
33503372
+ },
@@ -3444,7 +3466,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
34443466
+ const offline = Array.from(connections.values())
34453467
+ .filter((connection) => typeof connection.offline !== 'undefined');
34463468
+ for (let i = 0, max = offline.length - this.maxExtraOfflineConnections; i < max; ++i) {
3447-
+ logger.debug('Disposing offline connection', field("token", offline[i].token));
3469+
+ logger.debug('Disposing offline connection', field('token', offline[i].token));
34483470
+ offline[i].dispose();
34493471
+ }
34503472
+ }
@@ -3543,7 +3565,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
35433565
+}
35443566
diff --git a/src/vs/server/node/util.ts b/src/vs/server/node/util.ts
35453567
new file mode 100644
3546-
index 0000000000000000000000000000000000000000..fa47e993b46802f1a26457649e9e8bc467a73bf2
3568+
index 0000000000000000000000000000000000000000..d76f655e36647b1c9d38d2f7986f2b78a4bcfb50
35473569
--- /dev/null
35483570
+++ b/src/vs/server/node/util.ts
35493571
@@ -0,0 +1,13 @@
@@ -3558,7 +3580,7 @@ index 0000000000000000000000000000000000000000..fa47e993b46802f1a26457649e9e8bc4
35583580
+ * preserves slashes so it can be edited by hand more easily.
35593581
+ */
35603582
+export const encodePath = (path: string): string => {
3561-
+ return path.split("/").map((p) => encodeURIComponent(p)).join("/");
3583+
+ return path.split('/').map((p) => encodeURIComponent(p)).join('/');
35623584
+};
35633585
diff --git a/src/vs/workbench/api/browser/extensionHost.contribution.ts b/src/vs/workbench/api/browser/extensionHost.contribution.ts
35643586
index a4df8523631563a498c9ab6e51105074616a481a..f03da094e9080544102bbd3f037a71b348e5bd83 100644
@@ -3729,7 +3751,7 @@ index b3c89e51cfc25a53293a352a2a8ad50d5f26d595..e21abe4e13bc25a5b72f556bbfb61085
37293751
registerSingleton(IExtHostTunnelService, ExtHostTunnelService);
37303752
+registerSingleton(IExtHostNodeProxy, class extends NotImplementedProxy<IExtHostNodeProxy>(String(IExtHostNodeProxy)) { whenReady = Promise.resolve(); });
37313753
diff --git a/src/vs/workbench/api/node/extHostCLIServer.ts b/src/vs/workbench/api/node/extHostCLIServer.ts
3732-
index b3857616f7006127c423dcef7020ae4653da5ff6..1c1b80a2767bf77f30ca5bfee715c337120d3625 100644
3754+
index b3857616f7006127c423dcef7020ae4653da5ff6..594cd75b546a4b845e56122c846f63e29dc5f948 100644
37333755
--- a/src/vs/workbench/api/node/extHostCLIServer.ts
37343756
+++ b/src/vs/workbench/api/node/extHostCLIServer.ts
37353757
@@ -11,6 +11,8 @@ import { IWindowOpenable, IOpenWindowOptions } from 'vs/platform/windows/common/
@@ -3746,7 +3768,7 @@ index b3857616f7006127c423dcef7020ae4653da5ff6..1c1b80a2767bf77f30ca5bfee715c337
37463768

37473769
private async setup(): Promise<string> {
37483770
+ // NOTE@coder: Write this out so we can get the most recent path.
3749-
+ fs.promises.writeFile(join(tmpdir(), "vscode-ipc"), this._ipcHandlePath).catch((error) => {
3771+
+ fs.promises.writeFile(join(tmpdir(), 'vscode-ipc'), this._ipcHandlePath).catch((error) => {
37503772
+ this.logService.error(error);
37513773
+ });
37523774
+
@@ -3771,7 +3793,7 @@ index 3843fdec386edc09a1d361b63de892a04e0070ed..8aac4df527857e964798362a69f5591b
37713793
registerSingleton(ILogService, ExtHostLogService);
37723794
+registerSingleton(IExtHostNodeProxy, ExtHostNodeProxy);
37733795
diff --git a/src/vs/workbench/api/worker/extHostExtensionService.ts b/src/vs/workbench/api/worker/extHostExtensionService.ts
3774-
index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..814dd0ff2fa7737e07833d8092c8f48953c73c47 100644
3796+
index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..4474a93beba03365709c3cda98b682131ad4745f 100644
37753797
--- a/src/vs/workbench/api/worker/extHostExtensionService.ts
37763798
+++ b/src/vs/workbench/api/worker/extHostExtensionService.ts
37773799
@@ -11,6 +11,7 @@ import { RequireInterceptor } from 'vs/workbench/api/common/extHostRequireInterc
@@ -3789,7 +3811,7 @@ index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..814dd0ff2fa7737e07833d8092c8f489
37893811
- return extensionDescription.browser;
37903812
+ // NOTE@coder: We can support regular Node modules as well. These will just
37913813
+ // require the root of the extension.
3792-
+ return extensionDescription.browser || ".";
3814+
+ return extensionDescription.browser || '.';
37933815
}
37943816

37953817
- protected async _loadCommonJSModule<T>(module: URI, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
@@ -4028,7 +4050,7 @@ index 85d83f37da179a1e39266cf72a02e971f590308e..0659738b36df1747c9afcabf8d9abf26
40284050
};
40294051

40304052
diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts
4031-
index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..8e122c761ac7ddfee11f9dda2ac5e845b893cc28 100644
4053+
index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..d051473515e35b331672b780109bd40229153c8c 100644
40324054
--- a/src/vs/workbench/services/environment/browser/environmentService.ts
40334055
+++ b/src/vs/workbench/services/environment/browser/environmentService.ts
40344056
@@ -119,8 +119,25 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
@@ -4049,9 +4071,9 @@ index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..8e122c761ac7ddfee11f9dda2ac5e845
40494071
+ get userRoamingDataHome(): URI { return joinPath(URI.file(this.userDataPath).with({ scheme: Schemas.vscodeRemote }), 'User'); }
40504072
+ @memoize
40514073
+ get userDataPath(): string {
4052-
+ const dataPath = this.payload?.get("userDataPath");
4074+
+ const dataPath = this.payload?.get('userDataPath');
40534075
+ if (!dataPath) {
4054-
+ throw new Error("userDataPath was not provided to environment service");
4076+
+ throw new Error('userDataPath was not provided to environment service');
40554077
+ }
40564078
+ return dataPath;
40574079
+ }
@@ -4113,9 +4135,18 @@ index de7e301d3f0c67ce662827f61427a5a7b3616b9f..877ea8e11e6e6d34b9a8fe16287af309
41134135
}
41144136

41154137
diff --git a/src/vs/workbench/services/extensions/browser/extensionService.ts b/src/vs/workbench/services/extensions/browser/extensionService.ts
4116-
index 1dff19bf177eff24f722b748b79835a653241c4d..0f59ad290c82cc4c9d09c565c1018cc275ca0249 100644
4138+
index 1dff19bf177eff24f722b748b79835a653241c4d..01ce9bc00cc39c27e75db006425c359f813a4719 100644
41174139
--- a/src/vs/workbench/services/extensions/browser/extensionService.ts
41184140
+++ b/src/vs/workbench/services/extensions/browser/extensionService.ts
4141+
@@ -87,7 +87,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
4142+
if (code === ExtensionHostExitCode.StartTimeout10s) {
4143+
this._notificationService.prompt(
4144+
Severity.Error,
4145+
- nls.localize('extensionService.startTimeout', "The Web Worker Extension Host did not start in 10s."),
4146+
+ nls.localize('extensionService.startTimeout', 'The Web Worker Extension Host did not start in 10s.'),
4147+
[]
4148+
);
4149+
return;
41194150
@@ -177,8 +177,10 @@ export class ExtensionService extends AbstractExtensionService implements IExten
41204151
this._remoteAgentService.getEnvironment(),
41214152
this._remoteAgentService.scanExtensions()
@@ -4124,10 +4155,19 @@ index 1dff19bf177eff24f722b748b79835a653241c4d..0f59ad290c82cc4c9d09c565c1018cc2
41244155
remoteExtensions = this._checkEnabledAndProposedAPI(remoteExtensions);
41254156
+ // NOTE@coder: Include remotely hosted extensions that should run locally.
41264157
+ localExtensions = this._checkEnabledAndProposedAPI(localExtensions)
4127-
+ .concat(remoteExtensions.filter(ext => !ext.browser && ext.extensionKind && (ext.extensionKind === "web" || ext.extensionKind.includes("web"))));
4158+
+ .concat(remoteExtensions.filter(ext => !ext.browser && ext.extensionKind && (ext.extensionKind === 'web' || ext.extensionKind.includes('web'))));
41284159

41294160
const remoteAgentConnection = this._remoteAgentService.getConnection();
41304161
this._runningLocation = this._runningLocationClassifier.determineRunningLocation(localExtensions, remoteExtensions);
4162+
@@ -188,7 +190,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
4163+
4164+
const result = this._registry.deltaExtensions(remoteExtensions.concat(localExtensions), []);
4165+
if (result.removedDueToLooping.length > 0) {
4166+
- this._logOrShowMessage(Severity.Error, nls.localize('looping', "The following extensions contain dependency loops and have been disabled: {0}", result.removedDueToLooping.map(e => `'${e.identifier.value}'`).join(', ')));
4167+
+ this._logOrShowMessage(Severity.Error, nls.localize('looping', 'The following extensions contain dependency loops and have been disabled: {0}', result.removedDueToLooping.map(e => `'${e.identifier.value}'`).join(', ')));
4168+
}
4169+
4170+
if (remoteEnv && remoteAgentConnection) {
41314171
diff --git a/src/vs/workbench/services/extensions/common/extensionsUtil.ts b/src/vs/workbench/services/extensions/common/extensionsUtil.ts
41324172
index 65e532ee58dfc06ed944846d01b885cb8f260ebc..0b6282fde7ad03c7ea9872a777cbf487253abed1 100644
41334173
--- a/src/vs/workbench/services/extensions/common/extensionsUtil.ts

0 commit comments

Comments
 (0)
Please sign in to comment.