-
Notifications
You must be signed in to change notification settings - Fork 44
ensure callers of BuildDirectory::run
can determine if the source of the error is in Prepare::prepare
#103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
syphar
merged 10 commits into
rust-lang:master
from
Skgland:ensure_prepare_error_context
Aug 21, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2a38d9f
add sanity check
Skgland f05a6ac
add test crates
Skgland 27fa804
fix broken test
Skgland 1de26fd
make failing test output useful
Skgland 326ed9f
have prepare add a generic PrepareError context
Skgland f25d523
apease clippy
Skgland 50576b4
mark Unknown variant as hidden
Skgland 7979f9c
rename PrepareError::Unknown to PrepareError::Uncategorized
Skgland 753f46d
fix tests
Skgland 1ba52b8
add explanations for several of the added tests
Skgland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
tests/buildtest/crates/invalid-cargotoml-conflicting-links/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
tests/buildtest/crates/invalid-cargotoml-conflicting-links/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[package] | ||
name = "invalid-cargotoml-conflicting-links" | ||
version = "0.1.0" | ||
authors = ["Pietro Albini <[email protected]>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
ring_13 = { version = "=0.13.5", package = "ring" } | ||
ring_14 = { version = "=0.14.6", package = "ring" } | ||
|
||
|
||
[replace] | ||
"ring:0.13.5" = { git = "https://github.com/briansmith/ring.git", rev = "704e4216a397bd830479bcd6d7dd67fc62cdbe67" } | ||
"ring:0.14.6" = { git = "https://github.com/briansmith/ring.git", rev = "ef85df478152aa3fe06c811309379efa08f8a529" } | ||
|
||
|
||
# Both of the above packages declare the package.links ¹ key with value "ring-asm" in their respective Cargo.toml ² ³ file. | ||
# 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. | ||
# | ||
# [INFO] [stderr] Updating crates.io index | ||
# [INFO] [stderr] error: Attempting to resolve a dependency with more than one crate with links=ring-asm. | ||
# [INFO] [stderr] This will not build as is. Consider rebuilding the .lock file. | ||
# | ||
# [1]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-links-field | ||
# [2]: https://github.com/briansmith/ring/blob/704e4216a397bd830479bcd6d7dd67fc62cdbe67/Cargo.toml#L15 | ||
# [3]: https://github.com/briansmith/ring/blob/ef85df478152aa3fe06c811309379efa08f8a529/Cargo.toml#L16 |
3 changes: 3 additions & 0 deletions
3
tests/buildtest/crates/invalid-cargotoml-conflicting-links/src/main.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
println!("Hello, world!"); | ||
} |
26 changes: 26 additions & 0 deletions
26
tests/buildtest/crates/invalid-cargotoml-content-deps/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "invalid-cargotoml-content-deps" | ||
version = "0.1.0" | ||
authors = ["Pietro Albini <[email protected]>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
parity-db = "=0.2.3" | ||
syphar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# invalid package name in invalid-cargotoml-content is too invalid | ||
# invalid-cargotoml-content = { git = "https://github.com/rust-lang/rustwide.git", rev = "ee102383cbe40aafdfce7bf04a120226c16a8983" } | ||
|
||
# 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 | ||
# allowed in the package version constraint causing cargo to error out. | ||
# | ||
# Downloaded parity-db v0.2.3 | ||
# error: failed to parse manifest at `/workspace/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/parity-db-0.2.3/Cargo.toml` | ||
# | ||
# Caused by: | ||
# failed to parse the version requirement `0.11 ` for dependency `parking_lot` | ||
# | ||
# Caused by: | ||
# expected comma after minor version number, found '\t' | ||
# | ||
# [1]: https://docs.rs/crate/parity-db/0.2.3/source/Cargo.toml.orig#13 |
3 changes: 3 additions & 0 deletions
3
tests/buildtest/crates/invalid-cargotoml-content-deps/src/main.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
println!("Hello, world!"); | ||
} |
25 changes: 25 additions & 0 deletions
25
tests/buildtest/crates/invalid-cargotoml-content-type-in-deps/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.