Closed TornaxO7 closed 2 years ago
It could be the reason of the failed nix build btw
This time, the nix build is OK but not the tests :rofl: could your merge origin/development
and push to see?
Oh no, I'm getting some errors in the cli
module.
What the o.O
I'm very irrated now because it looks like that Envelopes
used to be a trait but now it's a struct?
I'm getting the same error if I switch to the development branch and do
cargo test --all-features --all
Output:
error[E0432]: unresolved import `crate::msg::Envelopes`
--> cli/src/mbox/mbox_handlers.rs:41:15
|
41 | msg::{Envelopes, Msg},
| ^^^^^^^^^
| |
| no `Envelopes` in `msg`
| help: a similar name exists in the module: `envelopes`
For more information about this error, try `rustc --explain E0432`.
error: could not compile `himalaya` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
@soywod
Tests are broken on development
since my last commit, my bad! I'm fixing it, I let you know when you can pull again.
I'm very irrated now because it looks like that
Envelopes
used to be a trait but now it's a struct?
It is because of #340, the backend trait had this member:
fn get_envelopes(&mut self, mbox: &str, page_size: usize, page: usize) -> Result<Box<dyn Envelopes>>;
But Envelopes
expected the trait Printable
:
pub trait Envelopes: fmt::Debug + erased_serde::Serialize + PrintTable + any::Any;
which is a big problem: the Printable
trait is used to print tables, this should belong to the cli
module and not the lib
. So I started to replace Envelopes
and Mboxes
traits by structs. I do not know if my explanations are clear enough, but to summarize it was a necessary step to move the Backend
trait to the lib
module.
I just fixed tests on development
, you can pull again then we can merge this PR.
Done! The tests should pass now (cargo test --all-features --all
run succesfully on my machine!)
Yay!
Whoops, I forgot to do that