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
Remote: abstract receiving from remote process; to replace for all remote process error/data handlers #365
Conversation
}); | ||
}); | ||
}; | ||
|
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.
@johnnyman727 start here.
I'll get those failures fixed in the morning |
@rwaldron I don't quite understand the purpose of this PR. It seems like it abstracts out part of |
…mote process error/data handlers
bb00554
to
860684d
Compare
No,
There were 5 places were either all 4 steps were taken, or some combination eg. 1 & 4 or 1, 3, & 4 or just 4. All 5 places had slightly different variable names and slightly different comments explaining the operation—but all were doing either exactly (or very nearly) the same thing. Abstracting the intersection semantics into a single operation (steps 1, 2, 4), that returns a promise which is either resolved with any received data or rejected with any error, provides a sound consistency across all occurrences. This cannot be rolled into All of the affected operations were smoke tested many times, with different T2 devices. |
@rwaldron so, do I understand it correctly that |
I think it was the name In any case, the PR looks good to me so feel free to merge! |
Remote: abstract receiving from remote process; to replace for all remote process error/data handlers
As t2-cli has evolved, we've built up some technical debt w/r to handling remote process io. Specifically, the code that handled receiving errors, data and closing was repeated in several places. This PR abstracts the operation into a Promise returning method of the current Tessel instance.