Skip to content

Commit 96234d5

Browse files
committed
Auto merge of #62723 - Mark-Simulacrum:rollup-vjdzlam, r=Mark-Simulacrum
Rollup of 6 pull requests Successful merges: - #62666 (Cancel unemitted diagnostics during error recovery) - #62683 (Chapter for `param_attrs`) - #62693 (ci: Remove Travis/AppVeyor configuration) - #62702 (normalize use of backticks in compiler messages for libsyntax_ext) - #62703 (normalize use of backticks in compiler messages for libsyntax/parse) - #62722 (ci: Bump time limit of tools builder on PRs) Failed merges: r? @ghost
2 parents d36b7f6 + 51ca50e commit 96234d5

31 files changed

+63
-257
lines changed

.azure-pipelines/pr.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
IMAGE: mingw-check
2222

2323
- job: LinuxTools
24+
timeoutInMinutes: 600
2425
pool:
2526
vmImage: ubuntu-16.04
2627
steps:

.travis.yml

-10
This file was deleted.

appveyor.yml

-9
This file was deleted.

src/bootstrap/check.rs

-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ impl Step for Std {
5050
let mut cargo = builder.cargo(compiler, Mode::Std, target, cargo_subcommand(builder.kind));
5151
std_cargo(builder, &compiler, target, &mut cargo);
5252

53-
let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage));
5453
builder.info(&format!("Checking std artifacts ({} -> {})", &compiler.host, target));
5554
run_cargo(builder,
5655
&mut cargo,
@@ -99,7 +98,6 @@ impl Step for Rustc {
9998
cargo_subcommand(builder.kind));
10099
rustc_cargo(builder, &mut cargo);
101100

102-
let _folder = builder.fold_output(|| format!("stage{}-rustc", compiler.stage));
103101
builder.info(&format!("Checking compiler artifacts ({} -> {})", &compiler.host, target));
104102
run_cargo(builder,
105103
&mut cargo,
@@ -153,7 +151,6 @@ impl Step for CodegenBackend {
153151

154152
// We won't build LLVM if it's not available, as it shouldn't affect `check`.
155153

156-
let _folder = builder.fold_output(|| format!("stage{}-rustc_codegen_llvm", compiler.stage));
157154
run_cargo(builder,
158155
&mut cargo,
159156
args(builder.kind),
@@ -190,7 +187,6 @@ impl Step for Test {
190187
let mut cargo = builder.cargo(compiler, Mode::Test, target, cargo_subcommand(builder.kind));
191188
test_cargo(builder, &compiler, target, &mut cargo);
192189

193-
let _folder = builder.fold_output(|| format!("stage{}-test", compiler.stage));
194190
builder.info(&format!("Checking test artifacts ({} -> {})", &compiler.host, target));
195191
run_cargo(builder,
196192
&mut cargo,
@@ -239,7 +235,6 @@ impl Step for Rustdoc {
239235
SourceType::InTree,
240236
&[]);
241237

242-
let _folder = builder.fold_output(|| format!("stage{}-rustdoc", compiler.stage));
243238
println!("Checking rustdoc artifacts ({} -> {})", &compiler.host, target);
244239
run_cargo(builder,
245240
&mut cargo,

src/bootstrap/compile.rs

-4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ impl Step for Std {
9595
let mut cargo = builder.cargo(compiler, Mode::Std, target, "build");
9696
std_cargo(builder, &compiler, target, &mut cargo);
9797

98-
let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage));
9998
builder.info(&format!("Building stage{} std artifacts ({} -> {})", compiler.stage,
10099
&compiler.host, target));
101100
run_cargo(builder,
@@ -422,7 +421,6 @@ impl Step for Test {
422421
let mut cargo = builder.cargo(compiler, Mode::Test, target, "build");
423422
test_cargo(builder, &compiler, target, &mut cargo);
424423

425-
let _folder = builder.fold_output(|| format!("stage{}-test", compiler.stage));
426424
builder.info(&format!("Building stage{} test artifacts ({} -> {})", compiler.stage,
427425
&compiler.host, target));
428426
run_cargo(builder,
@@ -555,7 +553,6 @@ impl Step for Rustc {
555553
let mut cargo = builder.cargo(compiler, Mode::Rustc, target, "build");
556554
rustc_cargo(builder, &mut cargo);
557555

558-
let _folder = builder.fold_output(|| format!("stage{}-rustc", compiler.stage));
559556
builder.info(&format!("Building stage{} compiler artifacts ({} -> {})",
560557
compiler.stage, &compiler.host, target));
561558
run_cargo(builder,
@@ -710,7 +707,6 @@ impl Step for CodegenBackend {
710707

711708
let tmp_stamp = out_dir.join(".tmp.stamp");
712709

713-
let _folder = builder.fold_output(|| format!("stage{}-rustc_codegen_llvm", compiler.stage));
714710
let files = run_cargo(builder,
715711
cargo.arg("--features").arg(features),
716712
vec![],

src/bootstrap/lib.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ use build_helper::{
128128
};
129129
use filetime::FileTime;
130130

131-
use crate::util::{exe, libdir, OutputFolder, CiEnv};
131+
use crate::util::{exe, libdir, CiEnv};
132132

133133
mod cc_detect;
134134
mod channel;
@@ -1092,19 +1092,6 @@ impl Build {
10921092
}
10931093
}
10941094

1095-
/// Fold the output of the commands after this method into a group. The fold
1096-
/// ends when the returned object is dropped. Folding can only be used in
1097-
/// the Travis CI environment.
1098-
pub fn fold_output<D, F>(&self, name: F) -> Option<OutputFolder>
1099-
where D: Into<String>, F: FnOnce() -> D
1100-
{
1101-
if !self.config.dry_run && self.ci_env == CiEnv::Travis {
1102-
Some(OutputFolder::new(name().into()))
1103-
} else {
1104-
None
1105-
}
1106-
}
1107-
11081095
/// Updates the actual toolstate of a tool.
11091096
///
11101097
/// The toolstates are saved to the file specified by the key

src/bootstrap/native.rs

-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ impl Step for Llvm {
104104
}
105105
}
106106

107-
let _folder = builder.fold_output(|| "llvm");
108107
let descriptor = if emscripten { "Emscripten " } else { "" };
109108
builder.info(&format!("Building {}LLVM for {}", descriptor, target));
110109
let _time = util::timeit(&builder);
@@ -493,7 +492,6 @@ impl Step for Lld {
493492
return out_dir
494493
}
495494

496-
let _folder = builder.fold_output(|| "lld");
497495
builder.info(&format!("Building LLD for {}", target));
498496
let _time = util::timeit(&builder);
499497
t!(fs::create_dir_all(&out_dir));
@@ -560,7 +558,6 @@ impl Step for TestHelpers {
560558
return
561559
}
562560

563-
let _folder = builder.fold_output(|| "build_test_helpers");
564561
builder.info("Building test helpers");
565562
t!(fs::create_dir_all(&dst));
566563
let mut cfg = cc::Build::new();

src/bootstrap/test.rs

-15
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ impl Step for Tidy {
713713
cmd.arg("--verbose");
714714
}
715715

716-
let _folder = builder.fold_output(|| "tidy");
717716
builder.info("tidy check");
718717
try_run(builder, &mut cmd);
719718
}
@@ -1310,7 +1309,6 @@ impl Step for Compiletest {
13101309

13111310
builder.ci_env.force_coloring_in_ci(&mut cmd);
13121311

1313-
let _folder = builder.fold_output(|| format!("test_{}", suite));
13141312
builder.info(&format!(
13151313
"Check compiletest suite={} mode={} ({} -> {})",
13161314
suite, mode, &compiler.host, target
@@ -1320,7 +1318,6 @@ impl Step for Compiletest {
13201318

13211319
if let Some(compare_mode) = compare_mode {
13221320
cmd.arg("--compare-mode").arg(compare_mode);
1323-
let _folder = builder.fold_output(|| format!("test_{}_{}", suite, compare_mode));
13241321
builder.info(&format!(
13251322
"Check compiletest suite={} mode={} compare_mode={} ({} -> {})",
13261323
suite, mode, compare_mode, &compiler.host, target
@@ -1364,7 +1361,6 @@ impl Step for DocTest {
13641361
// tests for all files that end in `*.md`
13651362
let mut stack = vec![builder.src.join(self.path)];
13661363
let _time = util::timeit(&builder);
1367-
let _folder = builder.fold_output(|| format!("test_{}", self.name));
13681364

13691365
let mut files = Vec::new();
13701366
while let Some(p) = stack.pop() {
@@ -1495,7 +1491,6 @@ impl Step for ErrorIndex {
14951491
.env("CFG_BUILD", &builder.config.build)
14961492
.env("RUSTC_ERROR_METADATA_DST", builder.extended_error_dir());
14971493

1498-
let _folder = builder.fold_output(|| "test_error_index");
14991494
builder.info(&format!("Testing error-index stage{}", compiler.stage));
15001495
let _time = util::timeit(&builder);
15011496
builder.run(&mut tool);
@@ -1819,14 +1814,6 @@ impl Step for Crate {
18191814
);
18201815
}
18211816

1822-
let _folder = builder.fold_output(|| {
1823-
format!(
1824-
"{}_stage{}-{}",
1825-
test_kind.subcommand(),
1826-
compiler.stage,
1827-
krate
1828-
)
1829-
});
18301817
builder.info(&format!(
18311818
"{} {} stage{} ({} -> {})",
18321819
test_kind, krate, compiler.stage, &compiler.host, target
@@ -1894,8 +1881,6 @@ impl Step for CrateRustdoc {
18941881
cargo.arg("--quiet");
18951882
}
18961883

1897-
let _folder = builder
1898-
.fold_output(|| format!("{}_stage{}-rustdoc", test_kind.subcommand(), compiler.stage));
18991884
builder.info(&format!(
19001885
"{} rustdoc stage{} ({} -> {})",
19011886
test_kind, compiler.stage, &compiler.host, target

src/bootstrap/tool.rs

-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ impl Step for ToolBuild {
7474
&self.extra_features,
7575
);
7676

77-
let _folder = builder.fold_output(|| format!("stage{}-{}", compiler.stage, tool));
7877
builder.info(&format!("Building stage{} tool {} ({})", compiler.stage, tool, target));
7978
let mut duplicates = Vec::new();
8079
let is_expected = compile::stream_cargo(builder, &mut cargo, vec![], &mut |msg| {
@@ -509,7 +508,6 @@ impl Step for Rustdoc {
509508
&[],
510509
);
511510

512-
let _folder = builder.fold_output(|| format!("stage{}-rustdoc", target_compiler.stage));
513511
builder.info(&format!("Building rustdoc for stage{} ({})",
514512
target_compiler.stage, target_compiler.host));
515513
builder.run(&mut cargo);

src/bootstrap/util.rs

+3-73
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
use std::env;
77
use std::str;
88
use std::fs;
9-
use std::io::{self, Write};
9+
use std::io;
1010
use std::path::{Path, PathBuf};
1111
use std::process::Command;
12-
use std::time::{SystemTime, Instant};
12+
use std::time::Instant;
1313

1414
use build_helper::t;
1515

@@ -254,90 +254,20 @@ pub fn symlink_dir(config: &Config, src: &Path, dest: &Path) -> io::Result<()> {
254254
}
255255
}
256256

257-
/// An RAII structure that indicates all output until this instance is dropped
258-
/// is part of the same group.
259-
///
260-
/// On Travis CI, these output will be folded by default, together with the
261-
/// elapsed time in this block. This reduces noise from unnecessary logs,
262-
/// allowing developers to quickly identify the error.
263-
///
264-
/// Travis CI supports folding by printing `travis_fold:start:<name>` and
265-
/// `travis_fold:end:<name>` around the block. Time elapsed is recognized
266-
/// similarly with `travis_time:[start|end]:<name>`. These are undocumented, but
267-
/// can easily be deduced from source code of the [Travis build commands].
268-
///
269-
/// [Travis build commands]:
270-
/// https://github.com/travis-ci/travis-build/blob/f603c0089/lib/travis/build/templates/header.sh
271-
pub struct OutputFolder {
272-
name: String,
273-
start_time: SystemTime, // we need SystemTime to get the UNIX timestamp.
274-
}
275-
276-
impl OutputFolder {
277-
/// Creates a new output folder with the given group name.
278-
pub fn new(name: String) -> OutputFolder {
279-
// "\r" moves the cursor to the beginning of the line, and "\x1b[0K" is
280-
// the ANSI escape code to clear from the cursor to end of line.
281-
// Travis seems to have trouble when _not_ using "\r\x1b[0K", that will
282-
// randomly put lines to the top of the webpage.
283-
print!("travis_fold:start:{0}\r\x1b[0Ktravis_time:start:{0}\r\x1b[0K", name);
284-
OutputFolder {
285-
name,
286-
start_time: SystemTime::now(),
287-
}
288-
}
289-
}
290-
291-
impl Drop for OutputFolder {
292-
fn drop(&mut self) {
293-
use std::time::*;
294-
use std::u64;
295-
296-
fn to_nanos(duration: Result<Duration, SystemTimeError>) -> u64 {
297-
match duration {
298-
Ok(d) => d.as_secs() * 1_000_000_000 + d.subsec_nanos() as u64,
299-
Err(_) => u64::MAX,
300-
}
301-
}
302-
303-
let end_time = SystemTime::now();
304-
let duration = end_time.duration_since(self.start_time);
305-
let start = self.start_time.duration_since(UNIX_EPOCH);
306-
let finish = end_time.duration_since(UNIX_EPOCH);
307-
println!(
308-
"travis_fold:end:{0}\r\x1b[0K\n\
309-
travis_time:end:{0}:start={1},finish={2},duration={3}\r\x1b[0K",
310-
self.name,
311-
to_nanos(start),
312-
to_nanos(finish),
313-
to_nanos(duration)
314-
);
315-
io::stdout().flush().unwrap();
316-
}
317-
}
318-
319257
/// The CI environment rustbuild is running in. This mainly affects how the logs
320258
/// are printed.
321259
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
322260
pub enum CiEnv {
323261
/// Not a CI environment.
324262
None,
325-
/// The Travis CI environment, for Linux (including Docker) and macOS builds.
326-
Travis,
327-
/// The AppVeyor environment, for Windows builds.
328-
AppVeyor,
329263
/// The Azure Pipelines environment, for Linux (including Docker), Windows, and macOS builds.
330264
AzurePipelines,
331265
}
332266

333267
impl CiEnv {
334268
/// Obtains the current CI environment.
335269
pub fn current() -> CiEnv {
336-
if env::var("TRAVIS").ok().map_or(false, |e| &*e == "true") {
337-
CiEnv::Travis
338-
} else if env::var("APPVEYOR").ok().map_or(false, |e| &*e == "True") {
339-
CiEnv::AppVeyor
340-
} else if env::var("TF_BUILD").ok().map_or(false, |e| &*e == "True") {
270+
if env::var("TF_BUILD").ok().map_or(false, |e| &*e == "True") {
341271
CiEnv::AzurePipelines
342272
} else {
343273
CiEnv::None

src/ci/docker/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Images will output artifacts in an `obj` dir at the root of a repository.
2020

2121
- Each directory, excluding `scripts` and `disabled`, corresponds to a docker image
2222
- `scripts` contains files shared by docker images
23-
- `disabled` contains images that are not built on travis
23+
- `disabled` contains images that are not built on CI
2424

2525
## Docker Toolbox on Windows
2626

src/ci/docker/run.sh

-9
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ dist=$objdir/build/dist
1717

1818
source "$ci_dir/shared.sh"
1919

20-
travis_fold start build_docker
21-
travis_time_start
22-
2320
if [ -f "$docker_dir/$image/Dockerfile" ]; then
2421
if [ "$CI" != "" ]; then
2522
hash_key=/tmp/.docker-hash-key.txt
@@ -94,7 +91,6 @@ elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
9491
echo Cannot run disabled images on CI!
9592
exit 1
9693
fi
97-
# retry messes with the pipe from tar to docker. Not needed on non-travis
9894
# Transform changes the context of disabled Dockerfiles to match the enabled ones
9995
tar --transform 's#^./disabled/#./#' -C $docker_dir -c . | docker \
10096
build \
@@ -107,9 +103,6 @@ else
107103
exit 1
108104
fi
109105

110-
travis_fold end build_docker
111-
travis_time_finish
112-
113106
mkdir -p $HOME/.cargo
114107
mkdir -p $objdir/tmp
115108
mkdir -p $objdir/cores
@@ -144,8 +137,6 @@ exec docker \
144137
--env DEPLOY_ALT \
145138
--env LOCAL_USER_ID=`id -u` \
146139
--env CI \
147-
--env TRAVIS \
148-
--env TRAVIS_BRANCH \
149140
--env TF_BUILD \
150141
--env BUILD_SOURCEBRANCHNAME \
151142
--env TOOLSTATE_REPO_ACCESS_TOKEN \

0 commit comments

Comments
 (0)