Julien-cpsn / ATAC

A simple API client (postman like) in your terminal
https://atac.julien-cpsn.com/
MIT License
1.86k stars 81 forks source link

issue install on windows using cargo install #35

Closed Ancient77 closed 5 months ago

Ancient77 commented 5 months ago

When I am trying to upgrade from 0.12 to 0.13 using cargo install atac, I get this error:

error[E0004]: non-exhaustive patterns: `Language::Javascript` not covered
   --> C:\Users\anton.sagel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\atac-0.13.0\src\app\files\postman.rs:278:50
    |
278 |                         let request_body = match language {
    |                                                  ^^^^^^^^ pattern `Language::Javascript` not covered
    |
note: `Language` defined here
   --> C:\Users\anton.sagel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\parse_postman_collection-0.2.3\src\v2_1_0\mod.rs:448:1
    |
448 | pub enum Language {
    | ^^^^^^^^^^^^^^^^^
...
462 |     Javascript,
    |     ---------- not covered
    = note: the matched value is of type `Language`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
282 ~                             Language::Xml => ContentType::Xml(body_as_raw),
283 +                             Language::Javascript => todo!()
    |
Julien-cpsn commented 5 months ago

Hello!

I know why this issue appends but still seems strange to me. I am trying to reproduce it.

Julien-cpsn commented 5 months ago

@Ancient77 you can try to get the pre-released I just rolled out cargo install atac@=0.13.0-bis

newca12 commented 5 months ago

Having the same issue with fresh v0.13.0 install, 0.13.0-bis fix it

Julien-cpsn commented 5 months ago

The weird thing here is that the v0.13.0 was published yesterday at 22:00 (paris time) but I have updated the postman_collection_import crate to v0.2.3 and the code using it on the main branch today at around 10:00 (still paris time).

Ancient77 commented 5 months ago

@Ancient77 you can try to get the pre-released I just rolled out cargo install atac@=0.13.0-bis

this works! Thank you very much for the quick fix ❤️

newca12 commented 5 months ago

The weird thing here is that the v0.13.0 was published yesterday at 22:00 (paris time) but I have updated the postman_collection_import crate to v0.2.3 and the code using it on the main branch today at around 10:00 (still paris time).

The explaination is that parse_postman_collection = "0.2.2" mean postman_collection = "^0.2.2", you sould have used "=0.2.2" or more elegantly use "0.3.0" for postman_collection to notify the API incompatibility

Julien-cpsn commented 5 months ago

No the problem was the other way around, the crates.io atac code has been updated today without me publishing it...

If the postman import lib handles the Javascript body content-type or not, it would have changed nothing. The problem is the main atac code trying to handle Javascript which was not bundled in v0.13.0 Weird