Skip to content
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

Move pipeline code from cli to classified #1008

Merged
merged 2 commits into from Nov 25, 2019
Merged

Move pipeline code from cli to classified #1008

merged 2 commits into from Nov 25, 2019

Conversation

thegedge
Copy link
Contributor

What are you trying to do?

Refactor pipeline code, with the eventual goal of unifying the interface for run between commands and pipelines.

What have you done in this PR?

Two commits.

The first breaks up classified.rs into smaller submodules, to make it easier to isolate what's needed for each. Not technically necessary, but I've found it really helps me grok what's happening, and creates stronger boundaries around things (e.g., LineCodec is only needed for external commands).

The second moves most of the pipeline-y code out of cli.rs into classified/pipeline.rs. ClassifiedPipeline has now been given a run method, so it looks a lot like regular classified commands. I've also simplified the match cases for the pipeline.

Adds modules for internal, external, and dynamic commands, as well as
the pipeline functionality. These are exported as their old names from
the classified module so as to keep its "interface" the same.
@gitpod-io
Copy link

gitpod-io bot commented Nov 25, 2019

break;
}
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this should be a concern of cli.rs?

@andrasio andrasio merged commit 70d63e3 into nushell:master Nov 25, 2019
@andrasio
Copy link
Member

Thank you!

@thegedge thegedge deleted the move-pipeline-to-classified branch December 9, 2019 14:20
bobhy pushed a commit to bobhy/nushell that referenced this pull request Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants