Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)

* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898

* Fixes and cleanup

* Distro

* Fix hygiene yarn

* delete no yarn lock changes file

* Fix hygiene

* Fix layer check

* Fix CI

* Skip lib checks

* Remove tests deleted in vs code

* Fix tests

* Distro

* Fix tests and add removed extension point

* Skip failing notebook tests for now

* Disable broken tests and cleanup build folder

* Update yarn.lock and fix smoke tests

* Bump sqlite

* fix contributed actions and file spacing

* Fix user data path

* Update yarn.locks

Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
Charles Gagnon
2021-06-17 08:17:11 -07:00
committed by GitHub
parent fdcb97c7f7
commit 3cb2f552a6
2582 changed files with 124827 additions and 87099 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { Action } from 'vs/base/common/actions';
import { isPromiseCanceledError } from 'vs/base/common/errors';
import { getErrorMessage, isPromiseCanceledError } from 'vs/base/common/errors';
import { Event } from 'vs/base/common/event';
import { Disposable, DisposableStore, dispose, MutableDisposable, toDisposable, IDisposable } from 'vs/base/common/lifecycle';
import { isEqual, basename } from 'vs/base/common/resources';
@@ -111,7 +111,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
@IOutputService private readonly outputService: IOutputService,
@IUserDataSyncAccountService readonly authTokenService: IUserDataSyncAccountService,
@IUserDataAutoSyncEnablementService private readonly userDataAutoSyncEnablementService: IUserDataAutoSyncEnablementService,
@IUserDataAutoSyncService private readonly userDataAutoSyncService: IUserDataAutoSyncService,
@IUserDataAutoSyncService userDataAutoSyncService: IUserDataAutoSyncService,
@ITextModelService textModelResolverService: ITextModelService,
@IPreferencesService private readonly preferencesService: IPreferencesService,
@ITelemetryService private readonly telemetryService: ITelemetryService,
@@ -288,7 +288,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
case UserDataSyncErrorCode.TurnedOff:
this.notificationService.notify({
severity: Severity.Info,
message: localize('turned off', "Settings sync was turned off from another device, please sign in again to turn on sync."),
message: localize('turned off', "Settings sync was turned off from another device, please turn on sync again."),
actions: {
primary: [new Action('turn on sync', localize('turn on sync', "Turn on Settings Sync..."), undefined, true, () => this.turnOn())]
}
@@ -323,11 +323,34 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
}
});
return;
case UserDataSyncErrorCode.ServiceChanged:
this.notificationService.notify({
severity: Severity.Info,
message: this.userDataSyncStoreManagementService.userDataSyncStore?.type === 'insiders' ?
localize('service switched to insiders', "Settings Sync has been switched to insiders service") :
localize('service switched to stable', "Settings Sync has been switched to stable service"),
});
return;
case UserDataSyncErrorCode.DefaultServiceChanged:
if (isEqual(this.userDataSyncStoreManagementService.userDataSyncStore?.url, this.userDataSyncStoreManagementService.userDataSyncStore?.insidersUrl)) {
// Settings sync is using separate service
if (this.userDataAutoSyncEnablementService.isEnabled()) {
this.notificationService.notify({
severity: Severity.Info,
message: localize('switched to insiders', "Settings sync now uses a separate service, more information is available in the [release notes](https://code.visualstudio.com/updates/v1_48#_settings-sync)."),
message: localize('using separate service', "Settings sync now uses a separate service, more information is available in the [Settings Sync Documentation](https://aka.ms/vscode-settings-sync-help#_syncing-stable-versus-insiders)."),
});
}
// If settings sync got turned off then ask user to turn on sync again.
else {
this.notificationService.notify({
severity: Severity.Info,
message: localize('service changed and turned off', "Settings sync was turned off because {0} now uses a separate service. Please turn on sync again.", this.productService.nameLong),
actions: {
primary: [new Action('turn on sync', localize('turn on sync', "Turn on Settings Sync..."), undefined, true, () => this.turnOn())]
}
});
}
return;
@@ -487,8 +510,10 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
this.notificationService.error(localize('auth failed', "Error while turning on Settings Sync: Authentication failed."));
return;
}
this.notificationService.error(localize('turn on failed with user data sync error', "Error while turning on Settings Sync. Please check [logs]({0}) for more details.", `command:${SHOW_SYNC_LOG_COMMAND_ID}`));
} else {
this.notificationService.error(localize({ key: 'turn on failed', comment: ['Substitution is for error reason'] }, "Error while turning on Settings Sync. {0}", getErrorMessage(e)));
}
this.notificationService.error(localize('turn on failed', "Error while turning on Settings Sync. Please check [logs]({0}) for more details.", `command:${SHOW_SYNC_LOG_COMMAND_ID}`));
}
}
@@ -1030,7 +1055,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
});
}
run(accessor: ServicesAccessor): Promise<any> {
return that.userDataAutoSyncService.triggerSync([syncNowCommand.id], false, true);
return that.userDataSyncWorkbenchService.syncNow();
}
}));
}
@@ -1308,7 +1333,7 @@ class AcceptChangesContribution extends Disposable implements IEditorContributio
this.acceptChangesButton = undefined;
}
dispose(): void {
override dispose(): void {
this.disposeAcceptChangesWidgetRenderer();
super.dispose();
}