-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Upgrade dotenv to 0.15 [blocked on change to test suite] #2223
Conversation
Nightly-to-stable regression reported upstream. rust-lang/rust#66508 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not need to pinpoint the version that much.
Yeah, we can probably afford a wider version range. |
diesel_tests/Cargo.toml
Outdated
|
||
[dependencies] | ||
assert_matches = "1.0.1" | ||
chrono = { version = "0.4" } | ||
diesel = { path = "../diesel", default-features = false, features = ["quickcheck", "chrono", "uuidv07", "serde_json", "network-address", "numeric", "with-deprecated"] } | ||
diesel_migrations = { version = "1.4.0" } | ||
diesel_infer_schema = { version = "1.4.0" } | ||
dotenv = ">=0.8, <0.11" | ||
dotenv = ">=0.8, <=0.15" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the tests even back on older compiler versions with the following error:
error[E0659]: `error_chain` is ambiguous (derive helper attribute vs any other name)
--> /home/weiznich/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv-0.10.1/src/lib.rs:23:40
|
23 | #[cfg_attr(not(feature = "backtrace"), error_chain(backtrace = "false"))]
| ^^^^^^^^^^^ ambiguous name
|
note: `error_chain` could refer to the derive helper attribute defined here
--> /home/weiznich/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv-0.10.1/src/lib.rs:22:17
|
22 | #[derive(Debug, error_chain)]
| ^^^^^^^^^^^
note: `error_chain` could also refer to the derive macro imported here
--> /home/weiznich/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv-0.10.1/src/lib.rs:10:1
|
10 | #[macro_use]
| ^^^^^^^^^^^^
error: aborting due to previous error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so no more allowing 0.10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disallowing 0.10
here does not fix that, because diesel-infer-schema
pulls in the0.10
version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Luckily, it seems dotenv support in diesel_infer_schema is optional. I'll try just turning it off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will cause CI to be fixed but break people's ability to run tests locally. We probably just need to get rid of diesel_infer_schema
from our test suite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably better. All of the deprecated stuff is removed in the next release, anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's also a pretty invasive change, though. Somebody who knows more about diesel should do it in a separate PR, and this one's blocked on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to just leave the old dotenv version here, because that one continues to work. #2197 removes the dependency on diesel_infer_schema
.
It's not needed, since tests don't actually use `.env`, and it pulls in unnecessary (and, in at least one case, broken by nightly Rust) code.
I think we could close this in favor of #2410 (sorry for stealing your contribution! I didn't notice this until right now). |
Trying to cargo install
diesel_cli
gave me compiler failures forerror_chain
anddotenv
. I'm using a current nightly compiler.This can be fixed by using a newer version of
dotenv
.