New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic with operation not supported by the terminal while libterm works fine #73
Comments
Are you sure it's panicing inside the term crate? That is, is the call to Could you give me a stack trace? |
No, panic occures inside of syntex_errors analog of rust/src/librustc_errors. The source of panic because of libterm from rust is up to day: commit a6ab049ed1db09f693df7d33046b3980f56751c1 So if for example replace libterm with term for rustc, it also panics. Any reasons return Err, instead of Ok(false)? With such API, code will be like this: https://github.com/keringar/syntex/commit/7ca0bb2e2dbae42d3983991787857730854336ef |
We made the change because it's too easy to accidentally ignore
`Ok(False)` causing corrupted output when some commands succeed and
others don't.
This is also why we added the `is_supported` method. It allows you to
check if all needed commands are supported up-front. rustc uses this to
choose between a "fancy" message printer and a "dumb" message printer.
Now, I'm not saying that this is a good API. However, I feel that having
some commands succeed while others fail silently is unacceptable. I've
tried fixing the API problems in the this create several times but,
every time I've tried to improve it, I've ended up rewriting everything
and then running out of free time.
|
syntex project is port of rustc parser to
be able to use it with stable compiler.
It used term crate as replace of https://github.com/rust-lang/rust/tree/master/src/libterm
And we see difference between term and libterm, the same code from:
https://github.com/serde-rs/syntex/blob/master/syntex_errors/src/emitter.rs
cause panic if use term crate (0.4.5) and not panic and works as expected if use libterm.
See
https://github.com/keringar/syntex/commit/7ca0bb2e2dbae42d3983991787857730854336ef
serde-deprecated/syntex#121
rust-lang/rustfmt#1180
serde-deprecated/syntex#120
Any ideas why eshell handled in different ways in libterm and term?
The text was updated successfully, but these errors were encountered: