Closed marko-lazic closed 11 months ago
Where you able to solve it?
Unfortunately not. It looks like it's using surrealdb main branch for something. I managed to do cargo run on source code and it works fine.
I just tried to change the Ok value of the error. But there are more changes needed:
note: associated function defined here
--> /home/johan/.cargo/git/checkouts/surrealdb-migrations-634b65362507a38b/6e0162e/src/lib.rs:92:12
|
92 | pub fn new(db: &'a Surreal<C>) -> Self {
| ^^^
error[E0308]: mismatched types
--> src/main.rs:51:32
|
51 | match MigrationRunner::new(&app_state.surrealdb)
| -------------------- ^^^^^^^^^^^^^^^^^^^^ expected `&Surreal<_>`, found `&Surreal<Client>`
| |
| arguments to this function are incorrect
|
= note: `Surreal<Client>` and `Surreal<_>` have similar names, but are actually distinct types
Unfortunately not. It looks like it's using surrealdb main branch for something. I managed to do cargo run on source code and it works fine.
Well then you were lucky ;) Running cargo update
on this repo will update surrealdb
to an incompatible git ref. I'll try to send in a PR asap.
I created a PR #53 that uses the 1.0.0 release.
Hi,
I had surrealdb-migrations
installed and tried to update with cargo install surrealdb-migrations --force
but I'm still getting this error.
Even after uninstalling surrealdb-migration
(cargo uninstall surrealdb-migration
) and deleting surrealdb-migrations-0.9.12
inside .cargo/registry/src/index.crates.io-{id}
I'm still getting this error.
Has anyone been able to solve this problem?
With the release of 1.0.0, this issue should no longer occurs.
You can download the latest release of surrealdb-migrations
:
cargo install surrealdb-migrations@1.0.0-preview.1
Describe the bug To Reproduce cargo install surrealdb-migrations returns the following error
Result<(), Error>
, foundResult<Jwt, Error>
= note: expected enum
Result<(), _>
found enumResult<Jwt, _>
For more information about this error, try
rustc --explain E0308
. error: could not compilesurrealdb-migrations
(lib) due to previous error warning: build failed, waiting for other jobs to finish... error: failed to compilesurrealdb-migrations v0.9.12
, intermediate artifacts can be found at/var/folders/qq/wdsqkg0n1kd825nr3npkckyh0000gn/T/cargo-installvcFG0T
. To reuse those artifacts with a future compilation, set the environment variableCARGO_TARGET_DIR
to that path.It seem to be compiling surrealdb v1.0.0-beta.11