Installation instructions fails with compile errors
marhel opened this issue · comments
Was lead here by Twitter announcement of v2, I was about to try out the CLI, but following the README Installation section, doing;
cargo install --path .
just gives could not compile 'biscuit-auth-cli' due to 6 previous errors
I'm using rust 1.58.0 here.
And the errors are;
Compiling biscuit-auth-cli v0.1.0 (/Users/martin/github/biscuit-auth/biscuit-cli)
error[E0532]: expected unit struct, unit variant or constant, found struct variant `Logic::NoMatchingPolicy`
--> src/main.rs:652:9
|
652 | Logic::NoMatchingPolicy => println!("No allow policy was matched"),
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use struct pattern syntax instead: `Logic::NoMatchingPolicy { /* fields */ }`
|
::: /Users/martin/.cargo/registry/src/github.com-1ecc6299db9ec823/biscuit-auth-2.0.0/src/error.rs:177:5
|
177 | NoMatchingPolicy {
| ---------------- `Logic::NoMatchingPolicy` defined here
error[E0308]: mismatched types
--> src/main.rs:294:9
|
294 | let (remaining, result) = parse_block_source(&string).map_err(|_| E {
| _________^^^^^^^^^^^^^^^^^^^___-
| | |
| | expected struct `SourceResult`, found tuple
295 | | msg: "parse error".into(),
296 | | })?;
| |_______- this expression has type `SourceResult<'_>`
|
= note: expected struct `SourceResult<'_>`
found tuple `(_, _)`
error[E0308]: mismatched types
--> src/main.rs:331:9
|
331 | let (remaining, result) = parse_block_source(&string).map_err(|_| E {
| _________^^^^^^^^^^^^^^^^^^^___-
| | |
| | expected struct `SourceResult`, found tuple
332 | | msg: "parse error".into(),
333 | | })?;
| |_______- this expression has type `SourceResult<'_>`
|
= note: expected struct `SourceResult<'_>`
found tuple `(_, _)`
error[E0308]: mismatched types
--> src/main.rs:367:9
|
367 | let (remaining, result) = parse_source(&string).map_err(|_| E {
| _________^^^^^^^^^^^^^^^^^^^___-
| | |
| | expected struct `SourceResult`, found tuple
368 | | msg: "parse error".into(),
369 | | })?;
| |_______- this expression has type `SourceResult<'_>`
|
= note: expected struct `SourceResult<'_>`
found tuple `(_, _)`
error[E0599]: no variant or associated item named `Deny` found for enum `Logic` in the current scope
--> src/main.rs:651:16
|
651 | Logic::Deny(i) => println!("The deny policy at index {} was matched", i),
| ^^^^ variant or associated item not found in `Logic`
error[E0599]: no variant or associated item named `FailedChecks` found for enum `Logic` in the current scope
--> src/main.rs:653:16
|
653 | Logic::FailedChecks(checks) => {
| ^^^^^^^^^^^^ variant or associated item not found in `Logic`
Some errors have detailed explanations: E0308, E0532, E0599.
For more information about an error, try `rustc --explain E0308`.
error: failed to compile `biscuit-auth-cli v0.1.0 (/Users/martin/github/biscuit-auth/biscuit-cli)`, intermediate artifacts can be found at `/Users/martin/github/biscuit-auth/biscuit-cli/target```
Oh, it looks like an issue with the biscuit-auth dependency. I'll have a look asap
That should be fixed now. Could you tell me if it works now? It's not released on crates.io, but main should build fine.
git pull
followed by cargo install --path .
now runs successfully, thank you. Tested the instructions which worked fine until I got a "No such file or directory" error on the biscuit generate
command, I'll open a different issue for that.
Thanks a lot! We can issue a release in a couple days if you don't find anything else 😅