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

Bundle ms-python.debugpy in build #2595

Merged
merged 6 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions build/lib/builtInExtensions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions build/lib/builtInExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export interface IExtensionDefinition {
flags: string;
};
publisherDisplayName: string;
// --- Start Positron ---
multiPlatformServiceUrl?: string;
// --- End Positron ---
};
}

Expand Down Expand Up @@ -70,8 +73,10 @@ function isUpToDate(extension: IExtensionDefinition): boolean {
}

function getExtensionDownloadStream(extension: IExtensionDefinition) {
const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl;
return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension))
// --- Start Positron ---
const url = extension.metadata.multiPlatformServiceUrl || productjson.extensionsGallery?.serviceUrl;
return (url ? ext.fromMarketplace(url, extension) : ext.fromGithub(extension))
// --- End Positron ---
.pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
}

Expand Down
25 changes: 24 additions & 1 deletion build/lib/extensions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion build/lib/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,30 @@ export function fromMarketplace(serviceUrl: string, { name: extensionName, versi
const json = require('gulp-json-editor') as typeof import('gulp-json-editor');

const [publisher, name] = extensionName.split('.');
const url = `${serviceUrl}/publishers/${publisher}/vsextensions/${name}/${version}/vspackage`;
// --- Start Positron ---
let url: string;

if (metadata.multiPlatformServiceUrl) {
let platformDownload: string;
switch (process.platform) {
case 'darwin':
platformDownload = 'darwin-arm64';
break;
case 'win32':
platformDownload = 'win32-x64';
break;
case 'linux':
platformDownload = 'linux-x64';
break;
default:
throw new Error('Unsupported platform');
};
url = `${serviceUrl}/${publisher}/${name}/${platformDownload}/${version}/file/${extensionName}-${version}@${platformDownload}.vsix`

} else {
url = `${serviceUrl}/publishers/${publisher}/vsextensions/${name}/${version}/vspackage`;
}
// --- End Positron ---

fancyLog('Downloading extension:', ansiColors.yellow(`${extensionName}@${version}`), '...');

Expand Down
124 changes: 42 additions & 82 deletions product.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,22 @@
},
"publisherDisplayName": "ms-python"
}
},
{
"name": "ms-python.debugpy",
"version": "2024.2.0",
"repo": "https://github.com/microsoft/vscode-python-debugger",
"metadata": {
"id": "4bd5d2c9-9d65-401a-b0b2-7498d9f17615",
"publisherId": {
"publisherId": "998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8",
"publisherName": "ms-python",
"displayName": "Python Debugger",
"flags": "verified"
},
"publisherDisplayName": "ms-python",
"multiPlatformServiceUrl": "https://open-vsx.org/api"
}
}
],
"extensionsGallery": {
Expand All @@ -199,17 +215,10 @@
"nlsBaseUrl": "",
"publisherUrl": ""
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but this JSON reformatting will make future upstream merges potentially noisy, any chance we could avoid that?

"linkProtectionTrustedDomains": [
"https://open-vsx.org"
],
"linkProtectionTrustedDomains": ["https://open-vsx.org"],
"extensionEnabledApiProposals": {
"ms-vscode.vscode-selfhost-test-provider": [
"testObserver",
"testCoverage"
],
"ms-vscode.extension-test-runner": [
"testCoverage"
],
"ms-vscode.vscode-selfhost-test-provider": ["testObserver", "testCoverage"],
"ms-vscode.extension-test-runner": ["testCoverage"],
"VisualStudioExptTeam.vscodeintellicode-completions": [
"inlineCompletionsAdditions"
],
Expand All @@ -233,12 +242,8 @@
"workspaceTrust",
"tunnels"
],
"vscjava.vscode-java-test": [
"testCoverage"
],
"ms-toolsai.vscode-ai-remote": [
"resolvers"
],
"vscjava.vscode-java-test": ["testCoverage"],
"ms-toolsai.vscode-ai-remote": ["resolvers"],
"ms-python.python": [
"contribEditorContentMenu",
"quickPickSortByLabel",
Expand All @@ -249,9 +254,7 @@
"terminalDataWriteEvent",
"terminalExecuteCommandEvent"
],
"ms-dotnettools.dotnet-interactive-vscode": [
"notebookMessaging"
],
"ms-dotnettools.dotnet-interactive-vscode": ["notebookMessaging"],
"GitHub.codespaces": [
"contribEditSessions",
"contribMenuBarHome",
Expand Down Expand Up @@ -303,11 +306,7 @@
"contribViewsRemote",
"telemetry"
],
"ms-vscode.remote-server": [
"resolvers",
"tunnels",
"contribViewsWelcome"
],
"ms-vscode.remote-server": ["resolvers", "tunnels", "contribViewsWelcome"],
"ms-vscode.remote-explorer": [
"contribRemoteHelp",
"contribViewsRemote",
Expand All @@ -329,12 +328,8 @@
"workspaceTrust",
"tunnels"
],
"ms-vscode.lsif-browser": [
"documentFiltersExclusive"
],
"ms-vscode.vscode-speech": [
"speech"
],
"ms-vscode.lsif-browser": ["documentFiltersExclusive"],
"ms-vscode.vscode-speech": ["speech"],
"GitHub.vscode-pull-request-github": [
"activeComment",
"contribCommentThreadAdditionalMenu",
Expand All @@ -352,12 +347,8 @@
"shareProvider",
"quickDiffProvider"
],
"GitHub.copilot": [
"inlineCompletionsAdditions"
],
"GitHub.copilot-nightly": [
"inlineCompletionsAdditions"
],
"GitHub.copilot": ["inlineCompletionsAdditions"],
"GitHub.copilot-nightly": ["inlineCompletionsAdditions"],
"GitHub.copilot-chat": [
"handleIssueUri",
"interactive",
Expand Down Expand Up @@ -394,18 +385,10 @@
"textSearchProvider",
"timeline"
],
"ms-python.gather": [
"notebookCellExecutionState"
],
"ms-python.vscode-pylance": [
"notebookCellExecutionState"
],
"ms-python.debugpy": [
"portsAttributes"
],
"ms-toolsai.jupyter-renderers": [
"contribNotebookStaticPreloads"
],
"ms-python.gather": ["notebookCellExecutionState"],
"ms-python.vscode-pylance": ["notebookCellExecutionState"],
"ms-python.debugpy": ["portsAttributes"],
"ms-toolsai.jupyter-renderers": ["contribNotebookStaticPreloads"],
"ms-toolsai.jupyter": [
"notebookDeprecated",
"notebookMessaging",
Expand All @@ -421,33 +404,15 @@
"notebookExecution",
"notebookVariableProvider"
],
"dbaeumer.vscode-eslint": [
"notebookCellExecutionState"
],
"ms-vscode.azure-sphere-tools-ui": [
"tunnels"
],
"ms-azuretools.vscode-azureappservice": [
"terminalDataWriteEvent"
],
"ms-azuretools.vscode-azureresourcegroups": [
"authGetSessions"
],
"ms-vscode.anycode": [
"extensionsAny"
],
"ms-vscode.cpptools": [
"terminalDataWriteEvent"
],
"redhat.java": [
"documentPaste"
],
"ms-dotnettools.csdevkit": [
"inlineCompletionsAdditions"
],
"ms-dotnettools.vscodeintellicode-csharp": [
"inlineCompletionsAdditions"
],
"dbaeumer.vscode-eslint": ["notebookCellExecutionState"],
"ms-vscode.azure-sphere-tools-ui": ["tunnels"],
"ms-azuretools.vscode-azureappservice": ["terminalDataWriteEvent"],
"ms-azuretools.vscode-azureresourcegroups": ["authGetSessions"],
"ms-vscode.anycode": ["extensionsAny"],
"ms-vscode.cpptools": ["terminalDataWriteEvent"],
"redhat.java": ["documentPaste"],
"ms-dotnettools.csdevkit": ["inlineCompletionsAdditions"],
"ms-dotnettools.vscodeintellicode-csharp": ["inlineCompletionsAdditions"],
"microsoft-IsvExpTools.powerplatform-vscode": [
"fileSearchProvider",
"textSearchProvider"
Expand All @@ -456,10 +421,7 @@
"fileSearchProvider",
"textSearchProvider"
],
"apidev.azure-api-center": [
"chatParticipant",
"languageModels"
],
"apidev.azure-api-center": ["chatParticipant", "languageModels"],
"jeanp413.open-remote-ssh": [
"resolvers",
"tunnels",
Expand All @@ -472,8 +434,6 @@
"contribRemoteHelp",
"contribViewsRemote"
],
"vscode.positron-viewer": [
"externalUriOpener"
]
"vscode.positron-viewer": ["externalUriOpener"]
}
}
Loading