Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
1fca9e04
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
1fca9e04
编写于
2月 28, 2018
作者:
M
Mark Mansi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't check in-tree deps
上级
18f0533c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
39 deletion
+12
-39
src/tools/tidy/src/deps.rs
src/tools/tidy/src/deps.rs
+12
-39
未找到文件。
src/tools/tidy/src/deps.rs
浏览文件 @
1fca9e04
...
@@ -56,61 +56,27 @@
...
@@ -56,61 +56,27 @@
/// Whitelist of crates rustc is allowed to depend on. Avoid adding to the list if possible.
/// Whitelist of crates rustc is allowed to depend on. Avoid adding to the list if possible.
static
WHITELIST
:
&
'static
[
Crate
]
=
&
[
static
WHITELIST
:
&
'static
[
Crate
]
=
&
[
// Crate("ar"),
// Crate("arena"),
// Crate("backtrace"),
// Crate("backtrace"),
// Crate("backtrace-sys"),
// Crate("backtrace-sys"),
// Crate("bitflags"),
// Crate("bitflags"),
// Crate("build_helper"),
// Crate("byteorder"),
// Crate("byteorder"),
// Crate("cc"),
// Crate("cc"),
// Crate("cfg-if"),
// Crate("cfg-if"),
// Crate("cmake"),
// Crate("filetime"),
// Crate("flate2"),
// Crate("flate2"),
// Crate("fmt_macros"),
// Crate("fuchsia-zircon"),
// Crate("fuchsia-zircon"),
// Crate("fuchsia-zircon-sys"),
// Crate("fuchsia-zircon-sys"),
// Crate("graphviz"),
// Crate("jobserver"),
// Crate("jobserver"),
// Crate("kernel32-sys"),
// Crate("lazy_static"),
// Crate("lazy_static"),
// Crate("libc"),
// Crate("libc"),
// Crate("log"),
// Crate("log"),
// Crate("log_settings"),
// Crate("miniz-sys"),
// Crate("miniz-sys"),
// Crate("num_cpus"),
// Crate("num_cpus"),
// Crate("owning_ref"),
// Crate("parking_lot"),
// Crate("parking_lot_core"),
// Crate("rand"),
// Crate("rand"),
// Crate("redox_syscall"),
// Crate("rustc"),
// Crate("rustc"),
// Crate("rustc-demangle"),
// Crate("rustc-demangle"),
// Crate("rustc_allocator"),
// Crate("rustc_apfloat"),
// Crate("rustc_back"),
// Crate("rustc_binaryen"),
// Crate("rustc_const_eval"),
// Crate("rustc_const_math"),
// Crate("rustc_cratesio_shim"),
// Crate("rustc_data_structures"),
// Crate("rustc_errors"),
// Crate("rustc_incremental"),
// Crate("rustc_llvm"),
// Crate("rustc_mir"),
// Crate("rustc_platform_intrinsics"),
// Crate("rustc_trans"),
// Crate("rustc_trans"),
// Crate("rustc_trans_utils"),
// Crate("serialize"),
// Crate("smallvec"),
// Crate("stable_deref_trait"),
// Crate("syntax"),
// Crate("syntax_pos"),
// Crate("tempdir"),
// Crate("tempdir"),
// Crate("unicode-width"),
// Crate("winapi"),
// Crate("winapi"),
// Crate("winapi-build"),
// Crate("winapi-i686-pc-windows-gnu"),
// Crate("winapi-i686-pc-windows-gnu"),
// Crate("winapi-x86_64-pc-windows-gnu"),
// Crate("winapi-x86_64-pc-windows-gnu"),
];
];
...
@@ -147,12 +113,16 @@ pub fn id_str(&self) -> String {
...
@@ -147,12 +113,16 @@ pub fn id_str(&self) -> String {
}
}
impl
<
'a
>
CrateVersion
<
'a
>
{
impl
<
'a
>
CrateVersion
<
'a
>
{
pub
fn
from_str
(
s
:
&
'a
str
)
->
Self
{
/// Returns the struct and whether or not the dep is in-tree
pub
fn
from_str
(
s
:
&
'a
str
)
->
(
Self
,
bool
)
{
let
mut
parts
=
s
.split
(
" "
);
let
mut
parts
=
s
.split
(
" "
);
let
name
=
parts
.next
()
.unwrap
();
let
name
=
parts
.next
()
.unwrap
();
let
version
=
parts
.next
()
.unwrap
();
let
version
=
parts
.next
()
.unwrap
();
let
path
=
parts
.next
()
.unwrap
();
CrateVersion
(
name
,
version
)
let
is_path_dep
=
path
.starts_with
(
"(path+"
);
(
CrateVersion
(
name
,
version
),
is_path_dep
)
}
}
pub
fn
id_str
(
&
self
)
->
String
{
pub
fn
id_str
(
&
self
)
->
String
{
...
@@ -310,10 +280,13 @@ fn check_crate_whitelist<'a, 'b>(
...
@@ -310,10 +280,13 @@ fn check_crate_whitelist<'a, 'b>(
.expect
(
"crate does not exist"
);
.expect
(
"crate does not exist"
);
for
dep
in
to_check
.dependencies
.iter
()
{
for
dep
in
to_check
.dependencies
.iter
()
{
let
krate
=
CrateVersion
::
from_str
(
dep
);
let
(
krate
,
is_path_dep
)
=
CrateVersion
::
from_str
(
dep
);
let
mut
bad
=
check_crate_whitelist
(
whitelist
,
resolve
,
visited
,
krate
);
unapproved
.append
(
&
mut
bad
);
// We don't check in-tree deps
if
!
is_path_dep
{
let
mut
bad
=
check_crate_whitelist
(
whitelist
,
resolve
,
visited
,
krate
);
unapproved
.append
(
&
mut
bad
);
}
}
}
unapproved
unapproved
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录