Skip to content
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

Add terminal support checking. Fixes #41587 #41665

Closed
wants to merge 0 commits into from
Closed

Add terminal support checking. Fixes #41587 #41665

wants to merge 0 commits into from

Conversation

keringar
Copy link

No description provided.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@Mark-Simulacrum
Copy link
Member

Thanks for the PR!

Looks like you have some errors in the code. I'm personally not familiar with this area, so I don't know if that method exists, but it seems at least possible that it doesn't -- grepping for it in Rust's source returned nothing for me. Where did you expect the supports_reset method to come from?

[00:02:35] error: no method named `supports_reset` found for type `&mut std::boxed::Box<term::Terminal<Output=std::io::Stderr> + std::marker::Send + 'static>` in the current scope
[00:02:35]     --> /checkout/src/librustc_errors/emitter.rs:1379:22
[00:02:35]      |
[00:02:35] 1379 |                 if t.supports_reset() {
[00:02:35]      |                      ^^^^^^^^^^^^^^
[00:02:35] 
[00:02:35] error: no method named `supports_reset` found for type `&mut std::boxed::Box<term::Terminal<Output=emitter::BufferedWriter> + std::marker::Send + 'static>` in the current scope
[00:02:35]     --> /checkout/src/librustc_errors/emitter.rs:1384:22
[00:02:35]      |
[00:02:35] 1384 |                 if t.supports_reset() {
[00:02:35]      |                      ^^^^^^^^^^^^^^
[00:02:35] 
[00:02:35] error: aborting due to 2 previous errors

@keringar
Copy link
Author

keringar commented Apr 30, 2017

The supports_reset is supposed to be a method provided by the term::Terminal trait. https://stebalien.github.io/doc/term/term/trait.Terminal.html#tymethod.supports_reset. I assumed that the term crate in rust was provided by that term crate, but I guess it's its own in-tree version?

@Mark-Simulacrum
Copy link
Member

Yeah, the compiler's term crate is in-tree (src/libterm). I'm not sure what current policy is on moving away from these in-tree crates to out of tree equivalents is (cc @alexcrichton).

We'll try to get you a decision on what to do here soon.

@keringar
Copy link
Author

Thank you

@carols10cents carols10cents added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 1, 2017
@hanna-kruppe
Copy link
Contributor

hanna-kruppe commented May 1, 2017

I asked @alexcrichton a while ago about libterm and he said it would be good to move to the crates.io version, he just hasn't found the time to do it yet. A PR doing that would be welcome (but ideally we'd fix #27812 first).

@alexcrichton
Copy link
Member

Yes I'd love to see libterm from crates.io integrated into the compiler!

@keringar
Copy link
Author

keringar commented May 1, 2017

I can start moving rustc away from depending on an in-tree term. I'm assuming that it won't be affected by #27812 (cc @eddyb)

@keringar keringar closed this May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants