Skip to content

Commit 45a3a39

Browse files
Skglandsyphar
authored andcommitted
add explanations for several of the added tests
1 parent 9cd056b commit 45a3a39

File tree

9 files changed

+85
-0
lines changed

9 files changed

+85
-0
lines changed

tests/buildtest/crates/invalid-cargotoml-conflicting-links/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,15 @@ ring_14 = { version = "=0.14.6", package = "ring" }
1414
[replace]
1515
"ring:0.13.5" = { git = "https://github.com/briansmith/ring.git", rev = "704e4216a397bd830479bcd6d7dd67fc62cdbe67" }
1616
"ring:0.14.6" = { git = "https://github.com/briansmith/ring.git", rev = "ef85df478152aa3fe06c811309379efa08f8a529" }
17+
18+
19+
# Both of the above packages declare the package.links ¹ key with value "ring-asm" in their respective Cargo.toml ² ³ file.
20+
# As each links value may only be used by one package in the dependency tree depending on both causes a conflict and cargo fill fail.
21+
#
22+
# [INFO] [stderr] Updating crates.io index
23+
# [INFO] [stderr] error: Attempting to resolve a dependency with more than one crate with links=ring-asm.
24+
# [INFO] [stderr] This will not build as is. Consider rebuilding the .lock file.
25+
#
26+
# [1]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-links-field
27+
# [2]: https://github.com/briansmith/ring/blob/704e4216a397bd830479bcd6d7dd67fc62cdbe67/Cargo.toml#L15
28+
# [3]: https://github.com/briansmith/ring/blob/ef85df478152aa3fe06c811309379efa08f8a529/Cargo.toml#L16

tests/buildtest/crates/invalid-cargotoml-content-deps/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,17 @@ edition = "2018"
1010
parity-db = "=0.2.3"
1111
# invalid package name in invalid-cargotoml-content is too invalid
1212
# invalid-cargotoml-content = { git = "https://github.com/rust-lang/rustwide.git", rev = "ee102383cbe40aafdfce7bf04a120226c16a8983" }
13+
14+
# parity-db version 0.2.3 specifies a dependency on parking_lot at version "0.11\t" in its Cargo.toml ¹ file, but a tab character is not
15+
# allowed in the package version constraint causing cargo to error out.
16+
#
17+
# Downloaded parity-db v0.2.3
18+
# error: failed to parse manifest at `/workspace/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/parity-db-0.2.3/Cargo.toml`
19+
#
20+
# Caused by:
21+
# failed to parse the version requirement `0.11 ` for dependency `parking_lot`
22+
#
23+
# Caused by:
24+
# expected comma after minor version number, found '\t'
25+
#
26+
# [1]: https://docs.rs/crate/parity-db/0.2.3/source/Cargo.toml.orig#13

tests/buildtest/crates/invalid-cargotoml-content-type-in-deps/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,19 @@ edition = "2018"
88

99
[dependencies]
1010
libressl-pnacl-sys = "=2.1.0"
11+
12+
# libressl-pnacl-sys at version 2.1.0 specifies in its Cargo.toml ¹ file a key `[[lib]]` (an array of tables),
13+
# but the lib key is supposed to be a table ('[lib]'). As such cargo considerse the Cargo.toml to be invalid and fails to compile the crate.
14+
#
15+
# Downloaded libressl-pnacl-sys v2.1.0
16+
# error: invalid type: map, expected a string
17+
# --> ../../../cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libressl-pnacl-sys-2.1.0/Cargo.toml:10:1
18+
# |
19+
# 10 | / [[lib]]
20+
# 11 | | name = "cross-platform-ssl-link"
21+
# 12 | | path = "lib.rs"
22+
# | |_______________^
23+
# |
24+
#
25+
# [1]: The Cargo.toml.orig can be found in the .crate archive available at https://static.crates.io/crates/libressl-pnacl-sys/libressl-pnacl-sys-2.1.0.crate
26+
#

tests/buildtest/crates/invalid-cargotoml-missing-override/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ build-rs = "=0.1.2"
1111

1212
[replace]
1313
"build-rs:0.1.2" = { git = "https://github.com/rust-lang/rustwide.git", rev = "07784be00b68cfd6bf80006c8d8669a7d6374ec2" }
14+
15+
# Note that the rustwide repository at the specified revision does not declare a package of the name `build-rs`
16+
# as such the declared replacement of the build-rs crate cannot be applied and cargo fails.
17+
#
18+
# This is a reproduction for crater errors like https://crater-reports.s3.amazonaws.com/beta-1.86-1/1.85.0/gh/bestform.game-of-life.rs/log.txt

tests/buildtest/crates/invalid-cargotoml-missing-patch/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ build-rs = "=0.1.2"
1111

1212
[patch.crates-io]
1313
build-rs = { git = "https://github.com/rust-lang/rustwide.git", rev = "07784be00b68cfd6bf80006c8d8669a7d6374ec2" }
14+
15+
16+
# Note that the rustwide repository at the specified revision does not declare a package of the name `build-rs`
17+
# as such the declared patch of the build-rs crate cannot be applied and cargo fails.
18+
#
19+
# This is a reproduction for crater errors like https://crater-reports.s3.amazonaws.com/beta-1.86-1/1.85.0/gh/mrvillage.timer/log.txt

tests/buildtest/crates/invalid-cargotoml-missing-registry-config/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ edition = "2018"
88

99
[dependencies]
1010
build-rs = { version = "*", registry = "will-be-removed" }
11+
12+
# During the preperation rustwide will remove the ./.config/config.toml file
13+
# this will make the build-rs dependecy refere to an undefined registry
14+
# which causes cargo to fail.
15+
#
16+
# This is a reproduction for crater errors like https://crater-reports.s3.amazonaws.com/beta-1.86-1/1.85.0/gh/retrokiller543.rust-echo/log.txt

tests/buildtest/crates/invalid-cargotoml-syntax-deps/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,14 @@ edition = "2018"
88

99
[dependencies]
1010
url = "=0.5.9"
11+
12+
# The url dependency at version 0.5.9 was published with a malformed Cargo.toml, this syntax error causes cargo to fail.
13+
#
14+
# [INFO] [stderr] Downloading crates ...
15+
# [INFO] [stderr] error: invalid table header
16+
# [INFO] [stderr] expected newline, `#`
17+
# [INFO] [stderr] --> ../../../cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/url-0.5.9/Cargo.toml:14:10
18+
# [INFO] [stderr] |
19+
# [INFO] [stderr] 14 | [[test]] name = "format"
20+
# [INFO] [stderr] | ^
21+
# [INFO] [stderr] |

tests/buildtest/crates/lockfile-collision/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ edition = "2018"
88

99
[dependencies]
1010
lockfile-collision = { path = "./crates/lockfile-collision" }
11+
12+
# Note that this package and its dependency have the same name
13+
# this results in Cargo being unable to build a lock file as both packages would have the same entry key.
14+
#
15+
# This is a reproduction for crater errors like https://crater-reports.s3.amazonaws.com/beta-1.86-1/1.85.0/gh/shadowmint.loghaul/log.txt
16+
#
17+
# [INFO] [stderr] Blocking waiting for file lock on package cache
18+
# [INFO] [stderr] error: package collision in the lockfile: packages loghaul v0.1.0 (/workspace/builds/worker-3-tc2/source) and loghaul v0.1.0 (/workspace/builds/worker-3-tc2/source/crates/loghaul) are different, but only one can be written to lockfile unambiguously

tests/buildtest/crates/missing-deps-registry-version/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ edition = "2018"
88

99
[dependencies]
1010
empty-library = "=0.5.0"
11+
12+
# Note that while the crate empty-library is published to crates.io it does not have a version 0.5.0 published ¹
13+
# as such cargo will fail as it will be unable to find a matching package version for the specified dependency
14+
#
15+
# This is a reproduction for crater errors like https://crater-reports.s3.amazonaws.com/beta-1.86-1/1.85.0/gh/adelelopez.bayes/log.txt
16+
#
17+
# [1]: https://crates.io/crates/empty-library/versions

0 commit comments

Comments
 (0)