josueBarretogit / manga-tui

Terminal-based manga reader and downloader with image support
https://crates.io/crates/manga-tui
MIT License
492 stars 13 forks source link

Fix failing nix build #56

Closed youwen5 closed 3 weeks ago

youwen5 commented 3 weeks ago

The new release fails to build when using (with both the project's own flake.nix, and in nixpkgs). This is preventing the update from being pushed into nixpkgs.

I fixed a separate issue in the flake.nix and tracked down the build failure to the failure of the test show_error_when_searching_manga. It passes normally with cargo test and cargo build but fails in the nix sandbox build environment for whatever reason. Increasing max_ticks to a much larger number seems to solve the issue but I am not familiar enough with the internals of the codebase and ratatui to know if this is a good permanent solution. Feel free to suggest a better fix for this.

youwen5 commented 3 weeks ago

Closes #57

josueBarretogit commented 3 weeks ago

Hi thanks for helping solve this issue

Feel free to suggest a better fix for this.

I made the mistake of doing so much in one single test, so many things need to happen, I updated it can you check if it works? also is there a github action to emulate the environment this test failed in? I'm not very knowledgeable of nix

youwen5 commented 3 weeks ago

Would you like me to set up an automatic Nix build/check action? It should require minimal maintenance after it is set up.

Since all Nix build environments are identical this action should be able to reproduce the test build failure.

josueBarretogit commented 3 weeks ago

Would you like me to set up an automatic Nix build/check action? It should require minimal maintenance after it is set up.

Since all Nix build environments are identical this action should be able to reproduce the test build failure.

yes to prevent this kind of stuff from happening again

youwen5 commented 3 weeks ago

OK i tested the new changes and they seem to build properly with nix build. I need to check if it works in the nixpkgs package too, I think another test actually fails there due to the different Rust builder.

I added a job to the GitHub action that builds the Nix package as well.

youwen5 commented 3 weeks ago

Just checked, it now builds in nixpkgs with no more failing tests so this looks good to merge.

josueBarretogit commented 3 weeks ago

Many thanks hopefully stuff like this doesn´t happen again (it will most likely 💀)

josueBarretogit commented 3 weeks ago

It happened again