Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
317afbca
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,发现更多精彩内容 >>
提交
317afbca
编写于
7月 05, 2019
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'joao/build-debug'
上级
b342abd3
5fbb8ba0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
47 addition
and
83 deletion
+47
-83
build/azure-pipelines/product-compile.yml
build/azure-pipelines/product-compile.yml
+9
-2
build/gulpfile.extensions.js
build/gulpfile.extensions.js
+5
-4
build/lib/extensions.js
build/lib/extensions.js
+15
-35
build/lib/extensions.ts
build/lib/extensions.ts
+18
-42
未找到文件。
build/azure-pipelines/product-compile.yml
浏览文件 @
317afbca
...
@@ -82,11 +82,18 @@ steps:
...
@@ -82,11 +82,18 @@ steps:
-
script
:
|
-
script
:
|
set -e
set -e
node build/azure-pipelines/common/installDistroDependencies.js
CHILD_CONCURRENCY=1
node build/azure-pipelines/common/installDistroDependencies.js
node build/azure-pipelines/common/installDistroDependencies.js remote
CHILD_CONCURRENCY=1
node build/azure-pipelines/common/installDistroDependencies.js remote
displayName
:
Install distro dependencies
displayName
:
Install distro dependencies
condition
:
and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
condition
:
and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
# Mixin must run before optimize, because the CSS loader will
# inline small SVGs
-
script
:
|
set -e
yarn gulp mixin
displayName
:
Mix in quality
-
script
:
|
-
script
:
|
set -e
set -e
yarn gulp hygiene
yarn gulp hygiene
...
...
build/gulpfile.extensions.js
浏览文件 @
317afbca
...
@@ -153,10 +153,11 @@ gulp.task(compileExtensionsBuildLegacyTask);
...
@@ -153,10 +153,11 @@ gulp.task(compileExtensionsBuildLegacyTask);
// Azure Pipelines
// Azure Pipelines
const
cleanExtensionsBuildTask
=
task
.
define
(
'
clean-extensions-build
'
,
util
.
rimraf
(
'
.build/extensions
'
));
const
cleanExtensionsBuildTask
=
task
.
define
(
'
clean-extensions-build
'
,
util
.
rimraf
(
'
.build/extensions
'
));
const
compileExtensionsBuildTask
=
task
.
define
(
'
compile-extensions-build
'
,
task
.
series
(
cleanExtensionsBuildTask
,
()
=>
{
const
compileExtensionsBuildTask
=
task
.
define
(
'
compile-extensions-build
'
,
task
.
series
(
return
ext
.
packageExtensionsStream
()
cleanExtensionsBuildTask
,
.
pipe
(
gulp
.
dest
(
'
.build
'
));
task
.
define
(
'
bundle-extensions-build
'
,
()
=>
ext
.
packageLocalExtensionsStream
().
pipe
(
gulp
.
dest
(
'
.build
'
))),
}));
task
.
define
(
'
bundle-marketplace-extensions-build
'
,
()
=>
ext
.
packageMarketplaceExtensionsStream
().
pipe
(
gulp
.
dest
(
'
.build
'
))),
));
gulp
.
task
(
compileExtensionsBuildTask
);
gulp
.
task
(
compileExtensionsBuildTask
);
exports
.
compileExtensionsBuildTask
=
compileExtensionsBuildTask
;
exports
.
compileExtensionsBuildTask
=
compileExtensionsBuildTask
;
\ No newline at end of file
build/lib/extensions.js
浏览文件 @
317afbca
...
@@ -81,7 +81,7 @@ function fromLocalWebpack(extensionPath) {
...
@@ -81,7 +81,7 @@ function fromLocalWebpack(extensionPath) {
return
data
;
return
data
;
}))
}))
.
pipe
(
packageJsonFilter
.
restore
);
.
pipe
(
packageJsonFilter
.
restore
);
const
webpackStreams
=
webpackConfigLocations
.
map
(
webpackConfigPath
=>
()
=>
{
const
webpackStreams
=
webpackConfigLocations
.
map
(
webpackConfigPath
=>
{
const
webpackDone
=
(
err
,
stats
)
=>
{
const
webpackDone
=
(
err
,
stats
)
=>
{
fancyLog
(
`Bundled extension:
${
ansiColors
.
yellow
(
path
.
join
(
path
.
basename
(
extensionPath
),
path
.
relative
(
extensionPath
,
webpackConfigPath
)))}
...`
);
fancyLog
(
`Bundled extension:
${
ansiColors
.
yellow
(
path
.
join
(
path
.
basename
(
extensionPath
),
path
.
relative
(
extensionPath
,
webpackConfigPath
)))}
...`
);
if
(
err
)
{
if
(
err
)
{
...
@@ -120,7 +120,7 @@ function fromLocalWebpack(extensionPath) {
...
@@ -120,7 +120,7 @@ function fromLocalWebpack(extensionPath) {
this
.
emit
(
'
data
'
,
data
);
this
.
emit
(
'
data
'
,
data
);
}));
}));
});
});
es
.
merge
(
sequence
(
webpackStreams
)
,
patchFilesStream
)
es
.
merge
(
...
webpackStreams
,
patchFilesStream
)
// .pipe(es.through(function (data) {
// .pipe(es.through(function (data) {
// // debug
// // debug
// console.log('out', data.path, data.contents.length);
// console.log('out', data.path, data.contents.length);
...
@@ -186,29 +186,7 @@ const excludedExtensions = [
...
@@ -186,29 +186,7 @@ const excludedExtensions = [
'
ms-vscode.node-debug2
'
,
'
ms-vscode.node-debug2
'
,
];
];
const
builtInExtensions
=
require
(
'
../builtInExtensions.json
'
);
const
builtInExtensions
=
require
(
'
../builtInExtensions.json
'
);
/**
function
packageLocalExtensionsStream
()
{
* We're doing way too much stuff at once, with webpack et al. So much stuff
* that while downloading extensions from the marketplace, node js doesn't get enough
* stack frames to complete the download in under 2 minutes, at which point the
* marketplace server cuts off the http request. So, we sequentialize the extensino tasks.
*/
function
sequence
(
streamProviders
)
{
const
result
=
es
.
through
();
function
pop
()
{
if
(
streamProviders
.
length
===
0
)
{
result
.
emit
(
'
end
'
);
}
else
{
const
fn
=
streamProviders
.
shift
();
fn
()
.
on
(
'
end
'
,
function
()
{
setTimeout
(
pop
,
0
);
})
.
pipe
(
result
,
{
end
:
false
});
}
}
pop
();
return
result
;
}
function
packageExtensionsStream
()
{
const
localExtensionDescriptions
=
glob
.
sync
(
'
extensions/*/package.json
'
)
const
localExtensionDescriptions
=
glob
.
sync
(
'
extensions/*/package.json
'
)
.
map
(
manifestPath
=>
{
.
map
(
manifestPath
=>
{
const
extensionPath
=
path
.
dirname
(
path
.
join
(
root
,
manifestPath
));
const
extensionPath
=
path
.
dirname
(
path
.
join
(
root
,
manifestPath
));
...
@@ -217,18 +195,20 @@ function packageExtensionsStream() {
...
@@ -217,18 +195,20 @@ function packageExtensionsStream() {
})
})
.
filter
(({
name
})
=>
excludedExtensions
.
indexOf
(
name
)
===
-
1
)
.
filter
(({
name
})
=>
excludedExtensions
.
indexOf
(
name
)
===
-
1
)
.
filter
(({
name
})
=>
builtInExtensions
.
every
(
b
=>
b
.
name
!==
name
));
.
filter
(({
name
})
=>
builtInExtensions
.
every
(
b
=>
b
.
name
!==
name
));
const
localExtensions
=
()
=>
sequence
([...
localExtensionDescriptions
.
map
(
extension
=>
()
=>
{
return
es
.
merge
(
gulp
.
src
(
'
extensions/node_modules/**
'
,
{
base
:
'
.
'
}),
...
localExtensionDescriptions
.
map
(
extension
=>
{
return
fromLocal
(
extension
.
path
)
return
fromLocal
(
extension
.
path
)
.
pipe
(
rename
(
p
=>
p
.
dirname
=
`extensions/
${
extension
.
name
}
/
${
p
.
dirname
}
`
));
.
pipe
(
rename
(
p
=>
p
.
dirname
=
`extensions/
${
extension
.
name
}
/
${
p
.
dirname
}
`
));
})]);
}))
const
localExtensionDependencies
=
()
=>
gulp
.
src
(
'
extensions/node_modules/**
'
,
{
base
:
'
.
'
});
.
pipe
(
util2
.
setExecutableBit
([
'
**/*.sh
'
]))
const
marketplaceExtensions
=
()
=>
es
.
merge
(...
builtInExtensions
.
pipe
(
filter
([
'
**
'
,
'
!**/*.js.map
'
]));
.
map
(
extension
=>
{
}
exports
.
packageLocalExtensionsStream
=
packageLocalExtensionsStream
;
function
packageMarketplaceExtensionsStream
()
{
return
es
.
merge
(
builtInExtensions
.
map
(
extension
=>
{
return
fromMarketplace
(
extension
.
name
,
extension
.
version
,
extension
.
metadata
)
return
fromMarketplace
(
extension
.
name
,
extension
.
version
,
extension
.
metadata
)
.
pipe
(
rename
(
p
=>
p
.
dirname
=
`extensions/
${
extension
.
name
}
/
${
p
.
dirname
}
`
));
.
pipe
(
rename
(
p
=>
p
.
dirname
=
`extensions/
${
extension
.
name
}
/
${
p
.
dirname
}
`
));
}));
}))
return
sequence
([
localExtensions
,
localExtensionDependencies
,
marketplaceExtensions
])
.
pipe
(
util2
.
setExecutableBit
([
'
**/*.sh
'
]))
.
pipe
(
util2
.
setExecutableBit
([
'
**/*.sh
'
]))
.
pipe
(
filter
([
'
**
'
,
'
!**/*.js.map
'
]));
.
pipe
(
filter
([
'
**
'
,
'
!**/*.js.map
'
]));
}
}
exports
.
package
ExtensionsStream
=
packag
eExtensionsStream
;
exports
.
package
MarketplaceExtensionsStream
=
packageMarketplac
eExtensionsStream
;
build/lib/extensions.ts
浏览文件 @
317afbca
...
@@ -93,7 +93,7 @@ function fromLocalWebpack(extensionPath: string): Stream {
...
@@ -93,7 +93,7 @@ function fromLocalWebpack(extensionPath: string): Stream {
.
pipe
(
packageJsonFilter
.
restore
);
.
pipe
(
packageJsonFilter
.
restore
);
const
webpackStreams
=
webpackConfigLocations
.
map
(
webpackConfigPath
=>
()
=>
{
const
webpackStreams
=
webpackConfigLocations
.
map
(
webpackConfigPath
=>
{
const
webpackDone
=
(
err
:
any
,
stats
:
any
)
=>
{
const
webpackDone
=
(
err
:
any
,
stats
:
any
)
=>
{
fancyLog
(
`Bundled extension:
${
ansiColors
.
yellow
(
path
.
join
(
path
.
basename
(
extensionPath
),
path
.
relative
(
extensionPath
,
webpackConfigPath
)))}
...`
);
fancyLog
(
`Bundled extension:
${
ansiColors
.
yellow
(
path
.
join
(
path
.
basename
(
extensionPath
),
path
.
relative
(
extensionPath
,
webpackConfigPath
)))}
...`
);
...
@@ -140,7 +140,7 @@ function fromLocalWebpack(extensionPath: string): Stream {
...
@@ -140,7 +140,7 @@ function fromLocalWebpack(extensionPath: string): Stream {
}));
}));
});
});
es
.
merge
(
sequence
(
webpackStreams
)
,
patchFilesStream
)
es
.
merge
(
...
webpackStreams
,
patchFilesStream
)
// .pipe(es.through(function (data) {
// .pipe(es.through(function (data) {
// // debug
// // debug
// console.log('out', data.path, data.contents.length);
// console.log('out', data.path, data.contents.length);
...
@@ -227,31 +227,7 @@ interface IBuiltInExtension {
...
@@ -227,31 +227,7 @@ interface IBuiltInExtension {
const
builtInExtensions
:
IBuiltInExtension
[]
=
require
(
'
../builtInExtensions.json
'
);
const
builtInExtensions
:
IBuiltInExtension
[]
=
require
(
'
../builtInExtensions.json
'
);
/**
export
function
packageLocalExtensionsStream
():
NodeJS
.
ReadWriteStream
{
* We're doing way too much stuff at once, with webpack et al. So much stuff
* that while downloading extensions from the marketplace, node js doesn't get enough
* stack frames to complete the download in under 2 minutes, at which point the
* marketplace server cuts off the http request. So, we sequentialize the extensino tasks.
*/
function
sequence
(
streamProviders
:
{
():
Stream
}[]):
Stream
{
const
result
=
es
.
through
();
function
pop
()
{
if
(
streamProviders
.
length
===
0
)
{
result
.
emit
(
'
end
'
);
}
else
{
const
fn
=
streamProviders
.
shift
()
!
;
fn
()
.
on
(
'
end
'
,
function
()
{
setTimeout
(
pop
,
0
);
})
.
pipe
(
result
,
{
end
:
false
});
}
}
pop
();
return
result
;
}
export
function
packageExtensionsStream
():
NodeJS
.
ReadWriteStream
{
const
localExtensionDescriptions
=
(
<
string
[]
>
glob
.
sync
(
'
extensions/*/package.json
'
))
const
localExtensionDescriptions
=
(
<
string
[]
>
glob
.
sync
(
'
extensions/*/package.json
'
))
.
map
(
manifestPath
=>
{
.
map
(
manifestPath
=>
{
const
extensionPath
=
path
.
dirname
(
path
.
join
(
root
,
manifestPath
));
const
extensionPath
=
path
.
dirname
(
path
.
join
(
root
,
manifestPath
));
...
@@ -261,22 +237,22 @@ export function packageExtensionsStream(): NodeJS.ReadWriteStream {
...
@@ -261,22 +237,22 @@ export function packageExtensionsStream(): NodeJS.ReadWriteStream {
.
filter
(({
name
})
=>
excludedExtensions
.
indexOf
(
name
)
===
-
1
)
.
filter
(({
name
})
=>
excludedExtensions
.
indexOf
(
name
)
===
-
1
)
.
filter
(({
name
})
=>
builtInExtensions
.
every
(
b
=>
b
.
name
!==
name
));
.
filter
(({
name
})
=>
builtInExtensions
.
every
(
b
=>
b
.
name
!==
name
));
const
localExtensions
=
()
=>
sequence
([...
localExtensionDescriptions
.
map
(
extension
=>
()
=>
{
return
es
.
merge
(
return
fromLocal
(
extension
.
path
)
gulp
.
src
(
'
extensions/node_modules/**
'
,
{
base
:
'
.
'
}),
.
pipe
(
rename
(
p
=>
p
.
dirname
=
`extensions/
${
extension
.
name
}
/
${
p
.
dirname
}
`
));
...
localExtensionDescriptions
.
map
(
extension
=>
{
})]);
return
fromLocal
(
extension
.
path
)
.
pipe
(
rename
(
p
=>
p
.
dirname
=
`extensions/
${
extension
.
name
}
/
${
p
.
dirname
}
`
));
const
localExtensionDependencies
=
()
=>
gulp
.
src
(
'
extensions/node_modules/**
'
,
{
base
:
'
.
'
});
})
)
const
marketplaceExtensions
=
()
=>
es
.
merge
(
.
pipe
(
util2
.
setExecutableBit
([
'
**/*.sh
'
]))
...
builtInExtensions
.
pipe
(
filter
([
'
**
'
,
'
!**/*.js.map
'
]));
.
map
(
extension
=>
{
}
return
fromMarketplace
(
extension
.
name
,
extension
.
version
,
extension
.
metadata
)
.
pipe
(
rename
(
p
=>
p
.
dirname
=
`extensions/
${
extension
.
name
}
/
${
p
.
dirname
}
`
));
})
);
return
sequence
([
localExtensions
,
localExtensionDependencies
,
marketplaceExtensions
])
export
function
packageMarketplaceExtensionsStream
():
NodeJS
.
ReadWriteStream
{
return
es
.
merge
(
builtInExtensions
.
map
(
extension
=>
{
return
fromMarketplace
(
extension
.
name
,
extension
.
version
,
extension
.
metadata
)
.
pipe
(
rename
(
p
=>
p
.
dirname
=
`extensions/
${
extension
.
name
}
/
${
p
.
dirname
}
`
));
}))
.
pipe
(
util2
.
setExecutableBit
([
'
**/*.sh
'
]))
.
pipe
(
util2
.
setExecutableBit
([
'
**/*.sh
'
]))
.
pipe
(
filter
([
'
**
'
,
'
!**/*.js.map
'
]));
.
pipe
(
filter
([
'
**
'
,
'
!**/*.js.map
'
]));
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录