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
Run Subproc Refactor #1758
Run Subproc Refactor #1758
Conversation
it's time then
I think the timing issue is resolved well enough until we can fix it properly (I think we'll need some platform-specific work, unfortunately). The bigger concern to me is the reports that some major programs (like vim) are just up and failing. Breaking <.5% of calls is a problem, but something fixable. Breaking 100% of a major app? That's a blocker and must not make it to a release. |
@astronouth7303 I have put in a fix for vim. Also, I think this is a good time to merge because it is right after a release. So we can bang on this in master before the next release. I agree that we shouldn't break anything major. But on some level it needs to have more exposure than a PR to find some of the harder to reach corner cases. |
vim is broken on this branch for me too.
also i noticed that just running yes i think we should bring this in, even though it's a little unusable for me atm and i'll stay in .4.7 until this gets more stable, that's what the release was all about. |
@laerus - can you try vim now? I was only fixing vi before... sorry! |
yep that's fixed, that list will grow. backgrounding jobs is a little broken too. |
Absolutely.
It is a little broken on master too :) |
Ok, I have added a new file and updated the docs a bit. |
@@ -0,0 +1,42 @@ | |||
**Added:** | |||
|
|||
* New subprocess specification class ``SubprocSpec`` is sued for specifiying |
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.
"sued"
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.
dyslexicai not I am.
|
||
**Removed:** | ||
|
||
* ``CompletedCommand`` and ``HiddenCompletedCommand`` classes have been removed. |
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.
So what does !()
return now?
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.
Pipelines. I updated the news to mention this.
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.
just !(ls)
sometimes leaks output after printing the pipeline object.
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 doesn't though, right, if you adjust your $XONSH_PROC_FREQUENCY
... But I should add that to the news
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.
Done.
Are there any other objections? I really do think that I have addressed everything that everyone has brought up that isn't platform specific, a performance or testing issue, or itself a refactor of this. If I am missing something, please let me know! |
I think this is ready to go -- in the interest of letting people get a word in if they need to, I'll hold off on merging this until noon EST |
Ok, here we go. |
Thanks, @scopatz ! 🎉🎉🎉 |
Thanks @gforsyth! All! |
This is a major overhaul of the way subprocs are executed.
The big idea here is that sub processes are now split into three pieces:
To enable the streaming and iterating features that we desired, a new PopenThread class has been introduced. This adheres to the Popen API and should be the last non-callable proc in the pipeline. This is responsible for running a regular Popen proc on a separate thread, and reading its output in a non-blocking manner (which was tricky!).
This PR also removes the TeePTY class and related psuedo-terminal handling. This PR should thus enable Storing stdout on all platforms now!
Please bang on this as there are things I have probably missed.