Odonno / surrealdb-migrations

An awesome SurrealDB migration tool, with a user-friendly CLI and a versatile Rust library that enables seamless integration into any project.
https://crates.io/crates/surrealdb-migrations
MIT License
210 stars 16 forks source link

Unable to install via Cargo #85

Closed thomas-huegel closed 4 months ago

thomas-huegel commented 4 months ago

cargo install surrealdb-migrations :

   Compiling surrealdb v1.4.2
error: `jwks` depends on a currently unstable feature, `sql2`. You need to enable the `surrealdb_unstable` flag to use it.
   --> /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/surrealdb-1.4.2/src/lib.rs:124:1
    |
124 | compile_error!("`jwks` depends on a currently unstable feature, `sql2`. You need to enable the `surrealdb_unstable` flag to use it.");
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: `sql2` is currently unstable. You need to enable the `surrealdb_unstable` flag to use it.
   --> /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/surrealdb-1.4.2/src/lib.rs:127:1
    |
127 | / compile_error!(
128 | |     "`sql2` is currently unstable. You need to enable the `surrealdb_unstable` flag to use it."
129 | | );
    | |_^

error: could not compile `surrealdb` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `surrealdb-migrations v1.4.1`, intermediate artifacts can be found at `/tmp/cargo-installT1L2t6`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

rustc 1.77.1 (7cf61ebde 2024-03-27) cargo 1.77.1 (e52e36006 2024-03-26)

Thanks for your help.

Odonno commented 4 months ago

Hello Thomas,

This is a known issue. You can find the solution here: https://github.com/Odonno/surrealdb-migrations/issues/81

thomas-huegel commented 4 months ago

Ok, thank you. Why not then leave it as an open issue? People would find the fix more easily:

RUSTFLAGS='--cfg surrealdb_unstable' cargo install surrealdb-migrations
Odonno commented 4 months ago

There is already a pinned issue, see:

image

It may not be enough. What do you suggest precisely?

Odonno commented 4 months ago

Closing as the feature flag is no longer needed starting from v1.5.0.