-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Fix #10754 - std::run
functions fail after io_error
#10936
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
Fix #10754 - std::run
functions fail after io_error
#10936
Conversation
I have uploaded a new version of the patch to fix the four "line longer than 100 chars" errors: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2076/steps/test/logs/stdio |
}, | ||
None => { | ||
sess.err(format!("could not exec `{}`", cc)); | ||
sess.abort_if_errors(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this patch also fixes #10755. (hurray!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@klutzy That's interesting, although I don't know why this patch would fix the issue because the io_error condition is still raised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cadencemarseille Oops, I misread your patch so my comment above is invalid. (I didn't actually build your patch so it's possible to not fix it.) Could you fix #10755 as well? I think it's simple to just catch io_error here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I will look into #10755 next.
I missed some files in |
The problem was that std::run::Process::new() was unwrap()ing the result of std::io::process::Process::new(), which returns None in the case where the io_error condition is raised to signal failure to start the process. Have std::run::Process::new() similarly return an Option<run::Process> to reflect the fact that a subprocess might have failed to start. Update utility functions run::process_status() and run::process_output() to return Option<ProcessExit> and Option<ProcessOutput>, respectively. Various parts of librustc and librustpkg needed to be updated to reflect these API changes. closes rust-lang#10754
…ap-on-None, r=alexcrichton The problem was that std::run::Process::new() was unwrap()ing the result of std::io::process::Process::new(), which returns None in the case where the io_error condition is raised to signal failure to start the process. Have std::run::Process::new() similarly return an Option\<run::Process\> to reflect the fact that a subprocess might have failed to start. Update utility functions run::process_status() and run::process_output() to return Option\<ProcessExit\> and Option\<ProcessOutput\>, respectively. Various parts of librustc and librustpkg needed to be updated to reflect these API changes. closes #10754
The problem was that std::run::Process::new() was unwrap()ing the result
of std::io::process::Process::new(), which returns None in the case
where the io_error condition is raised to signal failure to start the
process.
Have std::run::Process::new() similarly return an Optionrun::Process
to reflect the fact that a subprocess might have failed to start. Update
utility functions run::process_status() and run::process_output() to
return Option and Option, respectively.
Various parts of librustc and librustpkg needed to be updated to reflect
these API changes.
closes #10754