Closed NEmbgen closed 6 months ago
Hello @NEmbgen
This is indeed a problem and surrealdb_unstable
feature flag is now mandatory for v1.2.x. Here is a link to the solution: https://discord.com/channels/902568124350599239/970338835990974484/1213250427487916032
You're gonna have to set rustflags
.
Sorry for the inconvenience. I expect this to disappear once surrealdb
v1.3.0 is released.
@Odonno thanks for your answer. Sadly putting it in
[build]
rustflags = ["--cfg", "surrealdb_unstable"]
or
[target.x86_64-pc-windows-msvc]
rustflags = ["--cfg", "surrealdb_unstable"]
does not work. It seems like I will have to wait for 1.3.0. Unless I'm doing something wrong still.
Check this file here. But it certainly should work.
https://github.com/Odonno/surrealdb-migrations/blob/main/.cargo%2Fconfig.toml#L2
Same error here, even with the fix suggested. :)
cargo.toml
[dependencies]
tokio = { version = "1", features = ["full"] }
axum = "0.7.4"
serde = { version = "1.0", features = ["derive"] }
surrealdb = { version = "1.2.0" }
surrealdb-migrations = "1.2.2"
[build]
rustflags = ["--cfg", "surrealdb_unstable"]
rustdocflags = ["--cfg", "surrealdb_unstable"]
[net]
git-fetch-with-cli = true
You need to put that in .cargo/config.toml
file.
That worked for me, thank you!
Just to add: The same problem occurs when using the install
command. Not sure where to place the config on that
Ah yes, that's frustrating too. This should work:
RUSTFLAGS='--cfg surrealdb_unstable' cargo install surrealdb-migrations
Describe the bug When using the library with the current version of surrealdb it throws the error described above.
To Reproduce Steps to reproduce the behavior:
Expected behavior To run through without error
Information I guess the solution to the problem is described in the error itself, but when I add
surrealdb_unstable
as a feature ofsurrealdb-migrations
it can't find it.