-
Notifications
You must be signed in to change notification settings - Fork 336
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
Compilation error with url 2.5.3 / idna 1.0.3 with Rust < 1.81 and edition 2021 (resolver 2) when sqlx-core < 0.8.3 is in the dependency graph #992
Comments
@TotalKrill |
We are depending on url, not idna directly |
@valenting seems i was wrong about 1.81.0, seems to work there... |
Are you depending on I tried to repro on 1.80.1, and the following compiles: rustup default 1.80
cargo new --bin testurl
cd testurl
cargo add url
cargo build |
we have a workspace, but we only depend on url like this: |
running this is what our tree ends up including, with two different versions of URL included, probably by one of our other deps.
Edit: I meant version 2.5.3, 2.5.0 is the version that compiles |
The introduction of Do you somehow have |
Oh sorry, I am currently forcing our software to take 2.5.0, since 2.5.3 does not compile. Updated the previous comment to show that the cargo tree command showed 2.5.3 |
So if you have Aside: This isn't specific to idna. If I use Rust 1.80.1 with: [dependencies]
url = { version = "2.5.3", default-features = false }
idna = "1" ... |
Might fix CI failures caused by this: servo/rust-url#992. Slack thread: https://posthog.slack.com/archives/C0113360FFV/p1730722228558389
Fixes CI failures caused by this: servo/rust-url#992. Slack thread: https://posthog.slack.com/archives/C0113360FFV/p1730722228558389
yep, my edited comment stands. But with what you say, something else might be changing to |
As long as something in your dependency graph depends on @Twixes, GitHub autolinks a couple of your changesets referencing this issue. Do you have minimized steps to reproduce? |
I think |
Just felt this through my direct dependency to minimal verifiable example:
And I get the same compilation error as @TotalKrill The latest version of SQLx is (for the benefit of solution-seekers pinning to cargo --version --verbose
rustc --version --verbose
|
Interestingly, this turns out not to be true. rustup default 1.80
cargo new idna-992-repro
cd idna-992-repro/
cargo add sqlx
cargo add url
cargo check Still fails. (Note the added @domenukk why does |
We are also using sqlx, so might be through that |
|
@hsivonen I pinned |
Do you mean PostHog/posthog@5f6e5d1 fixed it for you? That's really weird. By what mechanism should that help? |
Actually you are right, the For us, the issue was with this command: By appending |
The sqlx change that added |
### Description Updated `sea-orm` and `sea-orm-migration` to `1.1.1` (latest as of opening this PR) and resolved any issues that occurred due to the version bump. ### Drive-by changes - Removed `sea-orm` from `rust/sealevel` - Updated `sea-orm-migration` data types - Bumped up the `rust-toolchain` to `1.81.0` due to `sea-orm-cli` issue: servo/rust-url#992 ### Related issues - Resolves hyperlane-xyz#4793 ### Backward compatibility Yes ### Testing Manual, as described in hyperlane-xyz#4793
Edited by @hsivonen to put resolution options at the top for folks who come here:
To resolve this compilation error, update SQLx to 0.8.3 and/or update Rust to 1.81 or later.
This compilation error is due to a combination of:
url
, and from a proc macro context specifically. (Request for SQLx not to do that: Please do not turn off default features for url launchbadge/sqlx#3589)url
2.5.3 (andidna
1.0.3) conditionally raising MSRV to 1.81 when default features are off (fromno_std
support for theurl
crate #831). Conditionally raising MSRV to 1.81 is not a semver break, because raising MSRV isn't a semver break.resolver = "2"
, which is implied byedition = "2021"
performing feature resolution for proc macro dependencies separately from normal dependencies, so a normal dependency onurl
with default features enabled does not cause default features to be enabled for the proc macro case.Original report follows:
Describe the bug
After update to v1.0.3 wich is picked up automatically since its a patch upgrade, our code no longer compiles the same.
rust versions tested:
The text was updated successfully, but these errors were encountered: