esp-rs / espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Apache License 2.0
471 stars 115 forks source link

Downgrade `crossterm` to `0.25.0` #418

Closed jessebraham closed 1 year ago

jessebraham commented 1 year ago

Computers were a mistake

(using 0.26.x somehow breaks things on Windows in weird circumstances)

bjoernQ commented 11 months ago

I tried 0.27.0 today and it still gives us problems on Windows.

For the records: One (or probably the) issue is replicated as follows

There is a workaround which probably would have even worked in 0.26.x

src\cli\monitor\mod.rs:160

                        KeyCode::Char('c') => {
                            poll(Duration::from_millis(100)).ok();
                            break;
                        },

Apparently since 0.26.0 the event somehow isn't consumed by read() and it reads the same again in the next run. Don't know the details t.b.h.

It's interesting that the event doesn't get picked up during flashing (but I think it's because at that stage it's handled by the ctrlc crate)

With the above change it just polls again and might or might not consume a queued event (CTRL-C)