-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
-Z rustdoc-scrape-examples
panics with some profile overrides
#10500
Comments
cc #9910, and @willcrichton |
I will investigate, thanks for the report @lqd. |
I just tested and this should be fixed once #10343 gets merged. I'll leave it open until then. |
Note that this is blocking progress on #10493. |
Oh, I didn't realize this was blocking. After a quick check, it seems like this diff solves the issue: https://github.com/rust-lang/cargo/pull/10343/files#diff-a78dec059e787d4e9a1a70144c9d2f1824d374e9ab6ccc65ef7aba6bf5b21a32 I can pull it out into a separate PR if needed, or it could just be in @lqd's PR if that will get merged sooner. #10343 will probably wait until upstream rustc PRs get merged and land on stable. |
Yesterday, I noticed your "properly memoize Docscrape units" commit, and tried it to move forward with #10493. It did fix the tests, so I started reducing it into a smaller change, and what I ended up with was bigger than just the It's unknown which of the two PRs would merge sooner (but you may be right that #10343 could involve more rustc/rustdoc coordination), so I'll try to incorporate this small change as well and add a few of the use-cases in the OP as tests. It's probably going to be transparent whenever either of the two lands and fixes the issue (worst case also causing a small conflict). |
Problem
The unstable scrape examples feature seems to somehow rely on some implicit reuse behavior that doesn't hold when users override settings in profiles causing dependencies to be built more than once.
I've noticed this with all the scrape-examples tests when changing these defaults to values users can already provide.
Steps
So for example, a simple project setup like the
scrape_examples_basic
test ("foo/src/lib.rs" & "foo/examples/ex.rs") can make cargo panic by changing thefoo
crate's profiles like:It's unlikely that this list is exhaustive, as it's more about the fact that the dependencies and deduplication are different when these settings are used, I guess ?
Any of the changes above will make cargo panic like so, on nightly or master:
Backtrace
Version
any recent nighty or master
The text was updated successfully, but these errors were encountered: