Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
a1824505
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a1824505
编写于
4月 01, 2020
作者:
O
Oliver Scherer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Gate on clippy on CI
上级
dae90c19
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
33 addition
and
60 deletion
+33
-60
src/bootstrap/dist.rs
src/bootstrap/dist.rs
+28
-49
src/bootstrap/install.rs
src/bootstrap/install.rs
+2
-4
src/bootstrap/test.rs
src/bootstrap/test.rs
+1
-3
src/bootstrap/tool.rs
src/bootstrap/tool.rs
+2
-4
未找到文件。
src/bootstrap/dist.rs
浏览文件 @
a1824505
...
...
@@ -1330,7 +1330,7 @@ pub struct Clippy {
}
impl
Step
for
Clippy
{
type
Output
=
Option
<
PathBuf
>
;
type
Output
=
PathBuf
;
const
ONLY_HOSTS
:
bool
=
true
;
fn
should_run
(
run
:
ShouldRun
<
'_
>
)
->
ShouldRun
<
'_
>
{
...
...
@@ -1348,7 +1348,7 @@ fn make_run(run: RunConfig<'_>) {
});
}
fn
run
(
self
,
builder
:
&
Builder
<
'_
>
)
->
Option
<
PathBuf
>
{
fn
run
(
self
,
builder
:
&
Builder
<
'_
>
)
->
PathBuf
{
let
compiler
=
self
.compiler
;
let
target
=
self
.target
;
assert
!
(
builder
.config.extended
);
...
...
@@ -1368,16 +1368,10 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
// state for clippy isn't testing.
let
clippy
=
builder
.ensure
(
tool
::
Clippy
{
compiler
,
target
,
extra_features
:
Vec
::
new
()
})
.or_else
(||
{
missing_tool
(
"clippy"
,
builder
.build.config.missing_tools
);
None
})
?
;
.expect
(
"clippy expected to build - essential tool"
);
let
cargoclippy
=
builder
.ensure
(
tool
::
CargoClippy
{
compiler
,
target
,
extra_features
:
Vec
::
new
()
})
.or_else
(||
{
missing_tool
(
"cargo clippy"
,
builder
.build.config.missing_tools
);
None
})
?
;
.expect
(
"clippy expected to build - essential tool"
);
builder
.install
(
&
clippy
,
&
image
.join
(
"bin"
),
0o755
);
builder
.install
(
&
cargoclippy
,
&
image
.join
(
"bin"
),
0o755
);
...
...
@@ -1416,7 +1410,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
builder
.info
(
&
format!
(
"Dist clippy stage{} ({})"
,
compiler
.stage
,
target
));
let
_
time
=
timeit
(
builder
);
builder
.run
(
&
mut
cmd
);
Some
(
distdir
(
builder
)
.join
(
format!
(
"{}-{}.tar.gz"
,
name
,
target
)
))
distdir
(
builder
)
.join
(
format!
(
"{}-{}.tar.gz"
,
name
,
target
))
}
}
...
...
@@ -1683,7 +1677,7 @@ fn run(self, builder: &Builder<'_>) {
tarballs
.push
(
rustc_installer
);
tarballs
.push
(
cargo_installer
);
tarballs
.extend
(
rls_installer
.clone
());
tarballs
.
extend
(
clippy_installer
.clone
()
);
tarballs
.
push
(
clippy_installer
);
tarballs
.extend
(
miri_installer
.clone
());
tarballs
.extend
(
rustfmt_installer
.clone
());
tarballs
.extend
(
llvm_tools_installer
);
...
...
@@ -1761,9 +1755,6 @@ fn filter(contents: &str, marker: &str) -> String {
if
rls_installer
.is_none
()
{
contents
=
filter
(
&
contents
,
"rls"
);
}
if
clippy_installer
.is_none
()
{
contents
=
filter
(
&
contents
,
"clippy"
);
}
if
miri_installer
.is_none
()
{
contents
=
filter
(
&
contents
,
"miri"
);
}
...
...
@@ -1805,13 +1796,11 @@ fn filter(contents: &str, marker: &str) -> String {
prepare
(
"rust-docs"
);
prepare
(
"rust-std"
);
prepare
(
"rust-analysis"
);
prepare
(
"clippy"
);
if
rls_installer
.is_some
()
{
prepare
(
"rls"
);
}
if
clippy_installer
.is_some
()
{
prepare
(
"clippy"
);
}
if
miri_installer
.is_some
()
{
prepare
(
"miri"
);
}
...
...
@@ -1863,12 +1852,10 @@ fn filter(contents: &str, marker: &str) -> String {
prepare
(
"rust-analysis"
);
prepare
(
"rust-docs"
);
prepare
(
"rust-std"
);
prepare
(
"clippy"
);
if
rls_installer
.is_some
()
{
prepare
(
"rls"
);
}
if
clippy_installer
.is_some
()
{
prepare
(
"clippy"
);
}
if
miri_installer
.is_some
()
{
prepare
(
"miri"
);
}
...
...
@@ -1989,7 +1976,6 @@ fn filter(contents: &str, marker: &str) -> String {
.arg
(
etc
.join
(
"msi/remove-duplicates.xsl"
)),
);
}
if
clippy_installer
.is_some
()
{
builder
.run
(
Command
::
new
(
&
heat
)
.current_dir
(
&
exe
)
...
...
@@ -2007,7 +1993,6 @@ fn filter(contents: &str, marker: &str) -> String {
.arg
(
"-t"
)
.arg
(
etc
.join
(
"msi/remove-duplicates.xsl"
)),
);
}
if
miri_installer
.is_some
()
{
builder
.run
(
Command
::
new
(
&
heat
)
...
...
@@ -2073,6 +2058,7 @@ fn filter(contents: &str, marker: &str) -> String {
.arg
(
"-dCargoDir=cargo"
)
.arg
(
"-dStdDir=rust-std"
)
.arg
(
"-dAnalysisDir=rust-analysis"
)
.arg
(
"-dClippyDir=clippy"
)
.arg
(
"-arch"
)
.arg
(
&
arch
)
.arg
(
"-out"
)
...
...
@@ -2083,9 +2069,6 @@ fn filter(contents: &str, marker: &str) -> String {
if
rls_installer
.is_some
()
{
cmd
.arg
(
"-dRlsDir=rls"
);
}
if
clippy_installer
.is_some
()
{
cmd
.arg
(
"-dClippyDir=clippy"
);
}
if
miri_installer
.is_some
()
{
cmd
.arg
(
"-dMiriDir=miri"
);
}
...
...
@@ -2101,12 +2084,10 @@ fn filter(contents: &str, marker: &str) -> String {
candle
(
"DocsGroup.wxs"
.as_ref
());
candle
(
"CargoGroup.wxs"
.as_ref
());
candle
(
"StdGroup.wxs"
.as_ref
());
candle
(
"ClippyGroup.wxs"
.as_ref
());
if
rls_installer
.is_some
()
{
candle
(
"RlsGroup.wxs"
.as_ref
());
}
if
clippy_installer
.is_some
()
{
candle
(
"ClippyGroup.wxs"
.as_ref
());
}
if
miri_installer
.is_some
()
{
candle
(
"MiriGroup.wxs"
.as_ref
());
}
...
...
@@ -2138,14 +2119,12 @@ fn filter(contents: &str, marker: &str) -> String {
.arg
(
"CargoGroup.wixobj"
)
.arg
(
"StdGroup.wixobj"
)
.arg
(
"AnalysisGroup.wixobj"
)
.arg
(
"ClippyGroup.wixobj"
)
.current_dir
(
&
exe
);
if
rls_installer
.is_some
()
{
cmd
.arg
(
"RlsGroup.wixobj"
);
}
if
clippy_installer
.is_some
()
{
cmd
.arg
(
"ClippyGroup.wixobj"
);
}
if
miri_installer
.is_some
()
{
cmd
.arg
(
"MiriGroup.wixobj"
);
}
...
...
src/bootstrap/install.rs
浏览文件 @
a1824505
...
...
@@ -214,10 +214,8 @@ fn run($sel, $builder: &Builder<'_>) {
}
};
Clippy
,
"clippy"
,
Self
::
should_build
(
_
config
),
only_hosts
:
true
,
{
if
builder
.ensure
(
dist
::
Clippy
{
compiler
:
self
.compiler
,
target
:
self
.target
,
})
.is_some
()
||
Self
::
should_install
(
builder
)
{
builder
.ensure
(
dist
::
Clippy
{
compiler
:
self
.compiler
,
target
:
self
.target
});
if
Self
::
should_install
(
builder
)
{
install_clippy
(
builder
,
self
.compiler.stage
,
self
.target
);
}
else
{
builder
.info
(
...
...
src/bootstrap/test.rs
浏览文件 @
a1824505
...
...
@@ -548,9 +548,7 @@ fn run(self, builder: &Builder<'_>) {
builder
.add_rustc_lib_path
(
compiler
,
&
mut
cargo
);
if
try_run
(
builder
,
&
mut
cargo
.into
())
{
builder
.save_toolstate
(
"clippy-driver"
,
ToolState
::
TestPass
);
}
try_run
(
builder
,
&
mut
cargo
.into
());
}
else
{
eprintln!
(
"failed to test clippy: could not build"
);
}
...
...
src/bootstrap/tool.rs
浏览文件 @
a1824505
...
...
@@ -652,14 +652,12 @@ fn run(mut $sel, $builder: &Builder<'_>) -> Option<PathBuf> {
Miri
,
miri
,
"src/tools/miri"
,
"miri"
,
{};
CargoMiri
,
miri
,
"src/tools/miri"
,
"cargo-miri"
,
{};
Rls
,
rls
,
"src/tools/rls"
,
"rls"
,
{
let
clippy
=
builder
.ensure
(
Clippy
{
builder
.ensure
(
Clippy
{
compiler
:
self
.compiler
,
target
:
self
.target
,
extra_features
:
Vec
::
new
(),
});
if
clippy
.is_some
()
{
self
.extra_features
.push
(
"clippy"
.to_owned
());
}
};
Rustfmt
,
rustfmt
,
"src/tools/rustfmt"
,
"rustfmt"
,
{};
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录