Skip to content

Commit 0248651

Browse files
authored
Merge pull request #2664 from rust-lang/tshepang/sembr
sembr tests/crater.md
2 parents ea28b17 + 594392f commit 0248651

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

ci/sembr/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static REGEX_IGNORE_END: LazyLock<Regex> =
2727
static REGEX_IGNORE_LINK_TARGETS: LazyLock<Regex> =
2828
LazyLock::new(|| Regex::new(r"^\[.+\]: ").unwrap());
2929
static REGEX_SPLIT: LazyLock<Regex> =
30-
LazyLock::new(|| Regex::new(r"([^\.\d\-\*]\.|[^r]\?|;|!)\s").unwrap());
30+
LazyLock::new(|| Regex::new(r"([^\.\d\-\*]\.|[^r]\?|!)\s").unwrap());
3131
// list elements, numbered (1.) or not (- and *)
3232
static REGEX_LIST_ENTRY: LazyLock<Regex> =
3333
LazyLock::new(|| Regex::new(r"^\s*(\d\.|\-|\*)\s+").unwrap());
@@ -196,7 +196,7 @@ fn lengthen_lines(content: &str, limit: usize) -> String {
196196
fn test_sembr() {
197197
let original = "
198198
# some. heading
199-
must! be; split?
199+
must! be. split?
200200
1. ignore a dot after number. but no further
201201
ignore | tables
202202
ignore e.g. and
@@ -214,7 +214,7 @@ git log main.. compiler
214214
let expected = "
215215
# some. heading
216216
must!
217-
be;
217+
be.
218218
split?
219219
1. ignore a dot after number.
220220
but no further

src/tests/crater.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
11
# Crater
22

33
[Crater](https://github.com/rust-lang/crater) is a tool for compiling and
4-
running tests for _every_ crate on [crates.io](https://crates.io) (and a few on
5-
GitHub). It is mainly used for checking the extent of breakage when implementing
4+
running tests for _every_ crate on [crates.io](https://crates.io) (and a few on GitHub).
5+
It is mainly used for checking the extent of breakage when implementing
66
potentially breaking changes and ensuring lack of breakage by running beta vs
77
stable compiler versions.
88

99
## When to run Crater
1010

1111
You should request a Crater run if your PR makes large changes to the compiler
12-
or could cause breakage. If you are unsure, feel free to ask your PR's reviewer.
12+
or could cause breakage.
13+
If you are unsure, feel free to ask your PR's reviewer.
1314

1415
## Requesting Crater Runs
1516

1617
The Rust team maintains a few machines that can be used for Crater runs
17-
on the changes introduced by a PR. If your PR needs a Crater run, leave a
18-
comment for the triage team in the PR thread. Please inform the team whether you
19-
require a "check-only" Crater run, a "build only" Crater run, or a
20-
"build-and-test" Crater run. The difference is primarily in time;
21-
if you're not sure, go for the build-and-test run. If
22-
making changes that will only have an effect at compile-time (e.g., implementing
23-
a new trait), then you only need a check run.
24-
25-
Your PR will be enqueued by the triage team and the results will be posted when
26-
they are ready. Check runs will take around ~3-4 days, and the other two taking
27-
5-6 days on average.
28-
29-
While Crater is really useful, it is also important to be aware of a few
30-
caveats:
31-
32-
- Not all code is on crates.io! There is a lot of code in repos on GitHub and
33-
elsewhere. Also, companies may not wish to publish their code. Thus, a
34-
successful Crater run does not mean there will be no
18+
on the changes introduced by a PR.
19+
If your PR needs a Crater run, leave a comment for the triage team in the PR thread.
20+
Please inform the team whether you
21+
require a "check-only" Crater run, a "build only" Crater run, or a "build-and-test" Crater run.
22+
The difference is primarily in time;
23+
if you're not sure, go for the build-and-test run.
24+
If making changes that will only have an effect at compile-time
25+
(e.g., implementing a new trait), then you only need a check run.
26+
27+
Your PR will be enqueued by the triage team and the results will be posted when they are ready.
28+
Check runs will take around ~3-4 days, and the other two taking 5-6 days on average.
29+
30+
While Crater is really useful, it is also important to be aware of a few caveats:
31+
32+
- Not all code is on crates.io!
33+
There is a lot of code in repos on GitHub and elsewhere.
34+
Also, companies may not wish to publish their code.
35+
Thus, a successful Crater run does not mean there will be no
3536
breakage; you still need to be careful.
3637

37-
- Crater only runs Linux builds on x86_64. Thus, other architectures and
38-
platforms are not tested. Critically, this includes Windows.
38+
- Crater only runs Linux builds on x86_64. Thus, other architectures and platforms are not tested.
39+
Critically, this includes Windows.
3940

40-
- Many crates are not tested. This could be for a lot of reasons, including that
41+
- Many crates are not tested.
42+
This could be for a lot of reasons, including that
4143
the crate doesn't compile any more (e.g. used old nightly features), has
4244
broken or flaky tests, requires network access, or other reasons.
4345

0 commit comments

Comments
 (0)