Open nk9 opened 3 months ago
Ah, this works if you install the required feature:
cargo add geozero --features with-postgis-sqlx
Is it possible to provide an error that points out the problem in this situation? I'm sure I've seen other crates where the compiler suggests adding the feature(s) that contain the code needed to make yours compile. Either way, it would be great if this requirement were mentioned in the README.
Can you point me to a crate that recommends missing features? Sounds interesting.On Mar 16, 2024, at 09:11, Nick Kocharhook @.***> wrote: Ah, this works if you install the required feature: cargo add geozero --features with-postgis-sqlx
Is it possible to provide an error that points out the problem in this situation? I'm sure I've seen other crates where the compiler suggests adding the feature(s) that contain the code needed to make yours compile. Either way, it would be great if this was mentioned in the README.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Here's an example, not sure if it's applicable? The error looks like this:
error: The default runtime flavor is `multi_thread`, but the `rt-multi-thread` feature is disabled.
--> rust/load_all.rs:32:1
|
32 | #[tokio::main]
| ^^^^^^^^^^^^^^
|
= note: this error originates in the attribute macro `tokio::main` (in Nightly builds, run with -Z macro-backtrace for more info)
You can see it for yourself by installing tokio with no features and creating a file with just this code:
#[tokio::main]
async fn main() -> Result<()> {
Ok(())
}
Oh that's nice. Looking at that example, it's within the context of a procedural macro, so I don't think we can use that technique. I wonder if it's possible outside of that context.
I'm using the SQLX geo-types example, and it's failing. Has the required code changed?