Skip to content

Commit 8fe14c1

Browse files
committed
recompile warnings fix and suppress external package compile warnings
1 parent 9732dda commit 8fe14c1

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

src/build.rs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,12 @@ pub fn compile_file(
10871087
}
10881088

10891089
if helpers::contains_ascii_characters(&err) {
1090-
Ok(Some(err))
1090+
if module.package.is_pinned_dep {
1091+
// supress warnings of external deps
1092+
Ok(Some(err))
1093+
} else {
1094+
Ok(None)
1095+
}
10911096
} else {
10921097
Ok(None)
10931098
}
@@ -1117,31 +1122,31 @@ fn failed_to_compile(module: &Module) -> bool {
11171122
SourceType::SourceFile(SourceFile {
11181123
implementation:
11191124
Implementation {
1120-
compile_state: CompileState::Error, //| CompileState::Warning,
1125+
compile_state: CompileState::Error | CompileState::Warning,
11211126
..
11221127
},
11231128
..
11241129
}) => true,
11251130
SourceType::SourceFile(SourceFile {
11261131
interface:
11271132
Some(Interface {
1128-
compile_state: CompileState::Error, // | CompileState::Warning,
1133+
compile_state: CompileState::Error | CompileState::Warning,
11291134
..
11301135
}),
11311136
..
11321137
}) => true,
11331138
SourceType::SourceFile(SourceFile {
11341139
implementation:
11351140
Implementation {
1136-
parse_state: ParseState::ParseError, //| ParseState::Warning,
1141+
parse_state: ParseState::ParseError | ParseState::Warning,
11371142
..
11381143
},
11391144
..
11401145
}) => true,
11411146
SourceType::SourceFile(SourceFile {
11421147
interface:
11431148
Some(Interface {
1144-
parse_state: ParseState::ParseError, //| ParseState::Warning,
1149+
parse_state: ParseState::ParseError | ParseState::Warning,
11451150
..
11461151
}),
11471152
..
@@ -1188,12 +1193,12 @@ fn cleanup_after_build(
11881193
&module.package.namespace,
11891194
&project_root,
11901195
);
1191-
remove_compile_assets(
1192-
&source_file.implementation.path,
1193-
&module.package.name,
1194-
&module.package.namespace,
1195-
&project_root,
1196-
);
1196+
// remove_compile_assets(
1197+
// &source_file.implementation.path,
1198+
// &module.package.name,
1199+
// &module.package.namespace,
1200+
// &project_root,
1201+
// );
11971202
}
11981203
_ => (),
11991204
}

0 commit comments

Comments
 (0)