Problems with ShellStream #926
Replies: 8 comments 4 replies
-
I went through all the open issues and tried to summarize all of the problems with ShellStream. I you have something to add or discuss, please comment below and I will edit the first comment so we have a summarized description. |
Beta Was this translation helpful? Give feedback.
-
OK, so obviously we have a lot to do with ShellStream... IMO bugs should be fixed ASAP, but there is a large number of them, so fixing them one at a time might take a long time. Due to partial interdependence of some of the bugs, handling them in separate PRs would also create merge conflicts. @drieseng I know you prefer small focused PRs, but would you be willing to accept batched fixes in this case? As tests did not catch these defects, we should first add a (failing) test for each of these scenarios before fixing them. As a general design note it seems to me that a lot of problems originate from the ShellStream providing too much functionality. A lot of functionality is duplicated with StreamReader (which will properly handle character encoding). Expect() seems to be a nice utility for simple scenarios, but fails or is inefficient in more complex scenarios. I know I'm discussing breaking changes here, so we should thread carefully, but I really feel that with proper class design SSH.Net could be more stable and more performant. And we don't need to do breaking changes over night, [Obsolete] is a great tool in the long run. |
Beta Was this translation helpful? Give feedback.
-
That's great. |
Beta Was this translation helpful? Give feedback.
-
I've created #923 for the first defect. Here is the behavior I would expect in these cases:
So, generally, I would like ShellStream to behave the way dotnet built-in streams behave and the way every developer intuitively expects it to behave. As for the events: at this time I'd rather not add any new API surface, unless someone shows he needs them and there is no other way to do it. |
Beta Was this translation helpful? Give feedback.
-
@IgorMilavec Do you want to continue your work on ShellStream? I intend to include all ShellStream related tasks in the next release. FYI @Rob-Hague |
Beta Was this translation helpful? Give feedback.
-
@WojciechNagorski There appears to be only 4 issues left that are linked to this discussion.
These issues are generally very old and haven't really generated repeated discussions or issues. Most of these may no longer apply with all of the recent internal changes. My proposal would be to close #16, #44, #424 and keep only #40 open but planned for a future release. |
Beta Was this translation helpful? Give feedback.
-
This initial comment will be updated with all the identified issues with ShellStream:
Defects:
Enhancements:
Requested examples:
Beta Was this translation helpful? Give feedback.
All reactions