command: lift StdOut, StdErr into command, lift aggregator into output#29
Merged
Conversation
Member
Author
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
Codecov Report
@@ Coverage Diff @@
## main #29 +/- ##
==========================================
+ Coverage 67.48% 69.54% +2.05%
==========================================
Files 9 8 -1
Lines 366 348 -18
==========================================
- Hits 247 242 -5
+ Misses 96 85 -11
+ Partials 23 21 -2
Continue to review full report at Codecov.
|
Member
Author
|
I'm goiing to merge this directly because I have some exciting refactors coming |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

There doesn't seem to be a use case for changing StdOut, StdErr on-the-fly with Output, so we lift that configuration into Command, which greatly simplifies the initialisation of Output and reduces the amount of buffers we need to keep around. It also means that Output is almost purely about consuming output, which means aggregator is no longer needed, which also makes the story a lot simpler.
API-wise, the change looks like:
Closes #27
In the future, this could also improve the possibility of #5 by not having the full command be created immediately - instead we can export specifically the customizable components