Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
4b334035
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4b334035
编写于
5月 25, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - prefer our file service
上级
0ccac8cf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
6 deletion
+6
-6
src/vs/code/node/cli.ts
src/vs/code/node/cli.ts
+2
-2
src/vs/platform/environment/node/argv.ts
src/vs/platform/environment/node/argv.ts
+1
-1
src/vs/workbench/services/search/node/searchService.ts
src/vs/workbench/services/search/node/searchService.ts
+3
-3
未找到文件。
src/vs/code/node/cli.ts
浏览文件 @
4b334035
...
...
@@ -257,7 +257,7 @@ export async function main(argv: string[]): Promise<any> {
addArg
(
argv
,
`--prof-startup-prefix`
,
filenamePrefix
);
addArg
(
argv
,
`--no-cached-data`
);
fs
.
writeFileSync
(
filenamePrefix
,
argv
.
slice
(
-
6
).
join
(
'
|
'
));
writeFileSync
(
filenamePrefix
,
argv
.
slice
(
-
6
).
join
(
'
|
'
));
processCallbacks
.
push
(
async
_child
=>
{
...
...
@@ -329,7 +329,7 @@ export async function main(argv: string[]): Promise<any> {
await
extHost
.
stop
();
// re-create the marker file to signal that profiling is done
fs
.
writeFileSync
(
filenamePrefix
,
''
);
writeFileSync
(
filenamePrefix
,
''
);
}
catch
(
e
)
{
console
.
error
(
'
Failed to profile startup. Make sure to quit Code first.
'
);
...
...
src/vs/platform/environment/node/argv.ts
浏览文件 @
4b334035
...
...
@@ -8,7 +8,7 @@ import * as os from 'os';
import
{
localize
}
from
'
vs/nls
'
;
import
{
ParsedArgs
}
from
'
vs/platform/environment/common/environment
'
;
import
{
join
}
from
'
vs/base/common/path
'
;
import
{
writeFileSync
}
from
'
fs
'
;
import
{
writeFileSync
}
from
'
vs/base/node/p
fs
'
;
/**
* This code is also used by standalone cli's. Avoid adding any other dependencies.
...
...
src/vs/workbench/services/search/node/searchService.ts
浏览文件 @
4b334035
...
...
@@ -13,7 +13,6 @@ import { keys, ResourceMap, values } from 'vs/base/common/map';
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
StopWatch
}
from
'
vs/base/common/stopwatch
'
;
import
{
URI
as
uri
}
from
'
vs/base/common/uri
'
;
import
*
as
pfs
from
'
vs/base/node/pfs
'
;
import
{
getNextTickChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
Client
,
IIPCOptions
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
...
...
@@ -425,6 +424,7 @@ export class DiskSearch implements ISearchResultProvider {
searchDebug
:
IDebugParams
|
undefined
,
@
ILogService
private
readonly
logService
:
ILogService
,
@
IConfigurationService
private
readonly
configService
:
IConfigurationService
,
@
IFileService
private
readonly
fileService
:
IFileService
)
{
const
timeout
=
this
.
configService
.
getValue
<
ISearchConfiguration
>
().
search
.
maintainFileSearchCache
?
Number
.
MAX_VALUE
:
...
...
@@ -465,7 +465,7 @@ export class DiskSearch implements ISearchResultProvider {
textSearch
(
query
:
ITextQuery
,
onProgress
?:
(
p
:
ISearchProgressItem
)
=>
void
,
token
?:
CancellationToken
):
Promise
<
ISearchComplete
>
{
const
folderQueries
=
query
.
folderQueries
||
[];
return
Promise
.
all
(
folderQueries
.
map
(
q
=>
q
.
folder
.
scheme
===
Schemas
.
file
&&
pfs
.
exists
(
q
.
folder
.
fsPath
)))
return
Promise
.
all
(
folderQueries
.
map
(
q
=>
this
.
fileService
.
exists
(
q
.
folder
)))
.
then
(
exists
=>
{
if
(
token
&&
token
.
isCancellationRequested
)
{
throw
canceled
();
...
...
@@ -480,7 +480,7 @@ export class DiskSearch implements ISearchResultProvider {
fileSearch
(
query
:
IFileQuery
,
token
?:
CancellationToken
):
Promise
<
ISearchComplete
>
{
const
folderQueries
=
query
.
folderQueries
||
[];
return
Promise
.
all
(
folderQueries
.
map
(
q
=>
q
.
folder
.
scheme
===
Schemas
.
file
&&
pfs
.
exists
(
q
.
folder
.
fsPath
)))
return
Promise
.
all
(
folderQueries
.
map
(
q
=>
this
.
fileService
.
exists
(
q
.
folder
)))
.
then
(
exists
=>
{
if
(
token
&&
token
.
isCancellationRequested
)
{
throw
canceled
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录