-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix plugins are not loaded when staring theia without internet access #6056
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,7 +115,7 @@ export class PluginDeployerImpl implements PluginDeployer { | |
const queue = [...pluginEntries]; | ||
while (queue.length) { | ||
const current = queue.shift()!; | ||
if (visited.has(current)) { | ||
if (visited.has(current) || pluginsToDeploy.has(current)) { | ||
continue; | ||
} | ||
visited.add(current); | ||
|
@@ -131,8 +131,8 @@ export class PluginDeployerImpl implements PluginDeployer { | |
|
||
for (const deployerEntry of pluginDeployerEntries) { | ||
const metadata = await this.pluginDeployerHandler.getPluginMetadata(deployerEntry); | ||
if (metadata && !pluginsToDeploy.has(metadata.model.id)) { | ||
pluginsToDeploy.set(metadata.model.id, deployerEntry); | ||
if (metadata && !pluginsToDeploy.has(metadata.model.uniqueId)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Why it is not enough? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But at the end the extension dependency will be resolved to
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I misunderstood your question.
That's right. The reason I use metadata.model.uniqueId is that: Because the keys of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is expected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But we should not continue to resolve the extensionDependencies when pluginsToDeploy contains them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because it will resolve twice for the same plugin. |
||
pluginsToDeploy.set(metadata.model.uniqueId, deployerEntry); | ||
if (metadata.model.extensionDependencies) { | ||
queue.push(...metadata.model.extensionDependencies); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current
is deployment entry, it is not a plugin idOne can only check by a plugin id after resolution without it we don't know anything what is behind
current
.