-
Notifications
You must be signed in to change notification settings - Fork 44
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
Rust 1.38 confused about which version of crate to use #111
Comments
Here's the command that fails
I'm assuming the |
Here's a sample program exhibiting the problem: |
As of Rust 1.38 (September 23) this issue is on stable. |
Hi @AndyGauge thanks for the report and sorry for late reply. I'll try to look into it although I cannot give any realistic ETA at the moment :( |
Glad to hear from you! Hope everything is well with the family. Thanks for checking into it. |
We're also seeing this with err-derive. |
I can see what is causing this but haven't figured out a solution yet. When cargo compiles dependencies, it adds some information into the target/{BUILD}/.fingerprint directory. Skeptic uses the json file to determine which crate to use. By looking at the source code, it would appear that at some point in time, |
I cannot reproduce this with the repository from https://github.com/AndyGauge/Skeptic-issue-111 -- the tests pass for me with current skeptic. Not sure if people are still seeing this? |
Moving away from using skeptic. Instead code will live as regular Rust source code example files in their own directory, and the Markdown will just include those source files. The main reason for doing this is to avoid a bug in skeptic that will try to compile test functions against the incorrect version of a dependent crate. See: budziq/rust-skeptic#111 rust-lang-nursery#630 With this change, the rand examples will just depend upon a few other crates. Also, for testing or general evaluation, a user may clone this entire repository, just go into the examples and run and modify them easily.
On the cookbook, I started receiving errors regarding rand, which indicated the crate version was .4, which was true on a dependency of a dependency. In my case I was depending on tempdir, which depended on rand .4. I also had a dependency for postgres .3 which had a dependency for a dependency for rand .4
Travis would use the .4 rand version on nightly, and the same thing happened locally when I ran cargo test with nightly. I removed those dependencies and rust skeptic ran using the right rand crate.
I'm seeing the same thing with percent_encoding. I'm getting errors on nightly that indicate AsciiSet and CONTROLS are not present, which is true of percent_encoding 1 which is depended by url 1.7.2 depended by cookie depended by reqwest. The test failures are consistent, and only on nightly.
Not even sure if this is a problem with rust-skeptic or if anyone else has seen this.
The text was updated successfully, but these errors were encountered: