mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -14,7 +14,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IFilesConfiguration, HotExitConfiguration } from 'vs/platform/files/common/files';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspacesMainService, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
|
||||
export class BackupMainService implements IBackupMainService {
|
||||
|
||||
@@ -28,8 +28,7 @@ export class BackupMainService implements IBackupMainService {
|
||||
constructor(
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@ILogService private logService: ILogService,
|
||||
@IWorkspacesMainService private workspacesService: IWorkspacesMainService
|
||||
@ILogService private logService: ILogService
|
||||
) {
|
||||
this.backupHome = environmentService.backupHome;
|
||||
this.workspacesJsonPath = environmentService.backupWorkspacesPath;
|
||||
@@ -66,7 +65,7 @@ export class BackupMainService implements IBackupMainService {
|
||||
}
|
||||
|
||||
private getHotExitConfig(): string {
|
||||
const config = this.configurationService.getConfiguration<IFilesConfiguration>();
|
||||
const config = this.configurationService.getValue<IFilesConfiguration>();
|
||||
|
||||
return (config && config.files && config.files.hotExit) || HotExitConfiguration.ON_EXIT;
|
||||
}
|
||||
@@ -310,7 +309,7 @@ export class BackupMainService implements IBackupMainService {
|
||||
fs.mkdirSync(this.backupHome);
|
||||
}
|
||||
|
||||
fs.writeFileSync(this.workspacesJsonPath, JSON.stringify(this.backups));
|
||||
extfs.writeFileAndFlushSync(this.workspacesJsonPath, JSON.stringify(this.backups));
|
||||
} catch (ex) {
|
||||
this.logService.error(`Backup: Could not save workspaces.json: ${ex.toString()}`);
|
||||
}
|
||||
|
||||
@@ -19,10 +19,9 @@ import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainSe
|
||||
import { IBackupWorkspacesFormat } from 'vs/platform/backup/common/backup';
|
||||
import { HotExitConfiguration } from 'vs/platform/files/common/files';
|
||||
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
|
||||
import { LogMainService } from 'vs/platform/log/common/log';
|
||||
import { ConsoleLogMainService } from 'vs/platform/log/common/log';
|
||||
import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { createHash } from 'crypto';
|
||||
import { WorkspacesMainService } from 'vs/platform/workspaces/electron-main/workspacesMainService';
|
||||
import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices';
|
||||
|
||||
suite('BackupMainService', () => {
|
||||
@@ -31,12 +30,11 @@ suite('BackupMainService', () => {
|
||||
const backupWorkspacesPath = path.join(backupHome, 'workspaces.json');
|
||||
|
||||
const environmentService = new EnvironmentService(parseArgs(process.argv), process.execPath);
|
||||
const logService = new LogMainService(environmentService);
|
||||
|
||||
class TestBackupMainService extends BackupMainService {
|
||||
|
||||
constructor(backupHome: string, backupWorkspacesPath: string, configService: TestConfigurationService) {
|
||||
super(environmentService, configService, new LogMainService(environmentService), new WorkspacesMainService(environmentService, logService));
|
||||
super(environmentService, configService, new ConsoleLogMainService(environmentService));
|
||||
|
||||
this.backupHome = backupHome;
|
||||
this.workspacesJsonPath = backupWorkspacesPath;
|
||||
|
||||
Reference in New Issue
Block a user