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

do not set appication extensions location for default profile #165496

Merged
merged 1 commit into from Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -156,6 +156,7 @@ export abstract class AbstractExtensionsScannerService extends Disposable implem
@ILogService protected readonly logService: ILogService,
@IEnvironmentService private readonly environmentService: IEnvironmentService,
@IProductService private readonly productService: IProductService,
@IUriIdentityService private readonly uriIdentityService: IUriIdentityService,
@IInstantiationService private readonly instantiationService: IInstantiationService,
) {
super();
Expand Down Expand Up @@ -385,7 +386,7 @@ export abstract class AbstractExtensionsScannerService extends Disposable implem
private async createExtensionScannerInput(location: URI, profile: boolean, type: ExtensionType, excludeObsolete: boolean, language: string | undefined, validate: boolean = true): Promise<ExtensionScannerInput> {
const translations = await this.getTranslations(language ?? platform.language);
const mtime = await this.getMtime(location);
const applicationExtensionsLocation = profile ? this.userDataProfilesService.defaultProfile.extensionsResource : undefined;
const applicationExtensionsLocation = profile && !this.uriIdentityService.extUri.isEqual(location, this.userDataProfilesService.defaultProfile.extensionsResource) ? this.userDataProfilesService.defaultProfile.extensionsResource : undefined;
const applicationExtensionsLocationMtime = applicationExtensionsLocation ? await this.getMtime(applicationExtensionsLocation) : undefined;
return new ExtensionScannerInput(
location,
Expand Down Expand Up @@ -900,14 +901,15 @@ export class NativeExtensionsScannerService extends AbstractExtensionsScannerSer
logService: ILogService,
environmentService: IEnvironmentService,
productService: IProductService,
uriIdentityService: IUriIdentityService,
instantiationService: IInstantiationService,
) {
super(
systemExtensionsLocation,
userExtensionsLocation,
joinPath(userHome, '.vscode-oss-dev', 'extensions', 'control.json'),
joinPath(userDataPath, MANIFEST_CACHE_FOLDER),
userDataProfilesService, extensionsProfileScannerService, fileService, logService, environmentService, productService, instantiationService);
userDataProfilesService, extensionsProfileScannerService, fileService, logService, environmentService, productService, uriIdentityService, instantiationService);
this.translationsPromise = (async () => {
if (platform.translationsConfigFile) {
try {
Expand Down
Expand Up @@ -12,6 +12,7 @@ import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ILogService } from 'vs/platform/log/common/log';
import { IProductService } from 'vs/platform/product/common/productService';
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';

export class ExtensionsScannerService extends NativeExtensionsScannerService implements IExtensionsScannerService {
Expand All @@ -23,14 +24,15 @@ export class ExtensionsScannerService extends NativeExtensionsScannerService imp
@ILogService logService: ILogService,
@INativeEnvironmentService environmentService: INativeEnvironmentService,
@IProductService productService: IProductService,
@IUriIdentityService uriIdentityService: IUriIdentityService,
@IInstantiationService instantiationService: IInstantiationService,
) {
super(
URI.file(environmentService.builtinExtensionsPath),
URI.file(environmentService.extensionsPath),
environmentService.userHome,
URI.file(environmentService.userDataPath),
userDataProfilesService, extensionsProfileScannerService, fileService, logService, environmentService, productService, instantiationService);
userDataProfilesService, extensionsProfileScannerService, fileService, logService, environmentService, productService, uriIdentityService, instantiationService);
}

}
Expand Down
Expand Up @@ -11,6 +11,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ILogService } from 'vs/platform/log/common/log';
import { IProductService } from 'vs/platform/product/common/productService';
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';

export class ExtensionsScannerService extends NativeExtensionsScannerService implements IExtensionsScannerService {
Expand All @@ -22,14 +23,15 @@ export class ExtensionsScannerService extends NativeExtensionsScannerService imp
@ILogService logService: ILogService,
@INativeEnvironmentService environmentService: INativeEnvironmentService,
@IProductService productService: IProductService,
@IUriIdentityService uriIdentityService: IUriIdentityService,
@IInstantiationService instantiationService: IInstantiationService,
) {
super(
URI.file(environmentService.builtinExtensionsPath),
URI.file(environmentService.extensionsPath),
environmentService.userHome,
URI.file(environmentService.userDataPath),
userDataProfilesService, extensionsProfileScannerService, fileService, logService, environmentService, productService, instantiationService);
userDataProfilesService, extensionsProfileScannerService, fileService, logService, environmentService, productService, uriIdentityService, instantiationService);
}

}
Expand Up @@ -18,6 +18,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { ILogService, NullLogService } from 'vs/platform/log/common/log';
import { IProductService } from 'vs/platform/product/common/productService';
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
import { UriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentityService';
import { IUserDataProfilesService, UserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';

Expand All @@ -33,14 +34,15 @@ class ExtensionsScannerService extends AbstractExtensionsScannerService implemen
@ILogService logService: ILogService,
@INativeEnvironmentService nativeEnvironmentService: INativeEnvironmentService,
@IProductService productService: IProductService,
@IUriIdentityService uriIdentityService: IUriIdentityService,
@IInstantiationService instantiationService: IInstantiationService,
) {
super(
URI.file(nativeEnvironmentService.builtinExtensionsPath),
URI.file(nativeEnvironmentService.extensionsPath),
joinPath(nativeEnvironmentService.userHome, '.vscode-oss-dev', 'extensions', 'control.json'),
joinPath(ROOT, MANIFEST_CACHE_FOLDER),
userDataProfilesService, extensionsProfileScannerService, fileService, logService, nativeEnvironmentService, productService, instantiationService);
userDataProfilesService, extensionsProfileScannerService, fileService, logService, nativeEnvironmentService, productService, uriIdentityService, instantiationService);
}

protected async getTranslations(language: string): Promise<Translations> {
Expand Down
4 changes: 3 additions & 1 deletion src/vs/server/node/extensionsScannerService.ts
Expand Up @@ -13,6 +13,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ILogService } from 'vs/platform/log/common/log';
import { IProductService } from 'vs/platform/product/common/productService';
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
import { getNLSConfiguration, InternalNLSConfiguration } from 'vs/server/node/remoteLanguagePacks';

Expand All @@ -25,14 +26,15 @@ export class ExtensionsScannerService extends AbstractExtensionsScannerService i
@ILogService logService: ILogService,
@INativeEnvironmentService private readonly nativeEnvironmentService: INativeEnvironmentService,
@IProductService productService: IProductService,
@IUriIdentityService uriIdentityService: IUriIdentityService,
@IInstantiationService instantiationService: IInstantiationService,
) {
super(
URI.file(nativeEnvironmentService.builtinExtensionsPath),
URI.file(nativeEnvironmentService.extensionsPath),
joinPath(nativeEnvironmentService.userHome, '.vscode-oss-dev', 'extensions', 'control.json'),
joinPath(URI.file(nativeEnvironmentService.userDataPath), MANIFEST_CACHE_FOLDER),
userDataProfilesService, extensionsProfileScannerService, fileService, logService, nativeEnvironmentService, productService, instantiationService);
userDataProfilesService, extensionsProfileScannerService, fileService, logService, nativeEnvironmentService, productService, uriIdentityService, instantiationService);
}

protected async getTranslations(language: string): Promise<Translations> {
Expand Down