Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e399a3f4
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e399a3f4
编写于
7月 17, 2020
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #100323
上级
c102db4c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
11 deletion
+7
-11
src/vs/platform/extensionManagement/node/extensionLifecycle.ts
...s/platform/extensionManagement/node/extensionLifecycle.ts
+3
-2
src/vs/platform/extensionManagement/node/extensionManagementService.ts
...rm/extensionManagement/node/extensionManagementService.ts
+2
-4
src/vs/platform/extensionManagement/node/extensionsScanner.ts
...vs/platform/extensionManagement/node/extensionsScanner.ts
+2
-5
未找到文件。
src/vs/platform/extensionManagement/node/extensionLifecycle.ts
浏览文件 @
e399a3f4
...
...
@@ -14,14 +14,15 @@ import { Event } from 'vs/base/common/event';
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
INativeEnvironmentService
}
from
'
vs/platform/environment/node/environmentService
'
;
import
{
rimraf
}
from
'
vs/base/node/pfs
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
export
class
ExtensionsLifecycle
extends
Disposable
{
private
processesLimiter
:
Limiter
<
void
>
=
new
Limiter
(
5
);
// Run max 5 processes in parallel
constructor
(
private
environmentService
:
INativeEnvironmentService
,
private
logService
:
ILogService
@
IEnvironmentService
private
environmentService
:
INativeEnvironmentService
,
@
ILogService
private
readonly
logService
:
ILogService
)
{
super
();
}
...
...
src/vs/platform/extensionManagement/node/extensionManagementService.ts
浏览文件 @
e399a3f4
...
...
@@ -93,7 +93,8 @@ export class ExtensionManagementService extends Disposable implements IExtension
@
IInstantiationService
instantiationService
:
IInstantiationService
,
)
{
super
();
this
.
extensionsScanner
=
this
.
_register
(
instantiationService
.
createInstance
(
ExtensionsScanner
));
const
extensionLifecycle
=
this
.
_register
(
instantiationService
.
createInstance
(
ExtensionsLifecycle
));
this
.
extensionsScanner
=
this
.
_register
(
instantiationService
.
createInstance
(
ExtensionsScanner
,
extension
=>
extensionLifecycle
.
postUninstall
(
extension
)));
this
.
manifestCache
=
this
.
_register
(
new
ExtensionsManifestCache
(
environmentService
,
this
));
this
.
extensionsDownloader
=
this
.
_register
(
instantiationService
.
createInstance
(
ExtensionsDownloader
));
...
...
@@ -103,9 +104,6 @@ export class ExtensionManagementService extends Disposable implements IExtension
this
.
installingExtensions
.
clear
();
this
.
uninstallingExtensions
.
clear
();
}));
const
extensionLifecycle
=
this
.
_register
(
new
ExtensionsLifecycle
(
environmentService
,
this
.
logService
));
this
.
_register
(
this
.
extensionsScanner
.
onDidRemoveExtension
(
extension
=>
extensionLifecycle
.
postUninstall
(
extension
)));
}
zip
(
extension
:
ILocalExtension
):
Promise
<
URI
>
{
...
...
src/vs/platform/extensionManagement/node/extensionsScanner.ts
浏览文件 @
e399a3f4
...
...
@@ -23,7 +23,6 @@ import { CancellationToken } from 'vscode';
import
{
extract
,
ExtractError
}
from
'
vs/base/node/zip
'
;
import
{
isWindows
}
from
'
vs/base/common/platform
'
;
import
{
flatten
}
from
'
vs/base/common/arrays
'
;
import
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
assign
}
from
'
vs/base/common/objects
'
;
const
ERROR_SCANNING_SYS_EXTENSIONS
=
'
scanningSystem
'
;
...
...
@@ -41,10 +40,8 @@ export class ExtensionsScanner extends Disposable {
private
readonly
uninstalledPath
:
string
;
private
readonly
uninstalledFileLimiter
:
Queue
<
any
>
;
private
_onDidRemoveExtension
=
new
Emitter
<
ILocalExtension
>
();
readonly
onDidRemoveExtension
=
this
.
_onDidRemoveExtension
.
event
;
constructor
(
private
readonly
beforeRemovingExtension
:
(
e
:
ILocalExtension
)
=>
Promise
<
void
>
,
@
ILogService
private
readonly
logService
:
ILogService
,
@
IEnvironmentService
private
readonly
environmentService
:
INativeEnvironmentService
,
@
IProductService
private
readonly
productService
:
IProductService
,
...
...
@@ -280,7 +277,7 @@ export class ExtensionsScanner extends Disposable {
await
Promise
.
all
(
byExtension
.
map
(
async
e
=>
{
const
latest
=
e
.
sort
((
a
,
b
)
=>
semver
.
rcompare
(
a
.
manifest
.
version
,
b
.
manifest
.
version
))[
0
];
if
(
!
installed
.
has
(
latest
.
identifier
.
id
.
toLowerCase
()))
{
this
.
_onDidRemoveExtension
.
fire
(
latest
);
await
this
.
beforeRemovingExtension
(
latest
);
}
}));
const
toRemove
:
ILocalExtension
[]
=
extensions
.
filter
(
e
=>
uninstalled
[
new
ExtensionIdentifierWithVersion
(
e
.
identifier
,
e
.
manifest
.
version
).
key
()]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录