Skip to content

feat(shell) raw-encoded pipe reader directly outputs buffer (no newline scan) - #1231

Merged
amrbashir merged 3 commits into
tauri-apps:v2from
GCRev:feature/raw-encoding-spawn-pipe
May 2, 2024
Merged

amrbashir merged 3 commits into
tauri-apps:v2from
GCRev:feature/raw-encoding-spawn-pipe

Conversation

@GCRev

@GCRev GCRev commented Apr 22, 2024

Copy link
Copy Markdown
Contributor

One of the things that I've had to change in both the previous v1 shell and again in the v2 shell plugin is the way that the pipe reader handles output from a process. I'm working with a process that outputs binary, so breaking at the newline character disrupts the binary output. I think others have also encountered this.

I'm new to rust, but this seems like a somewhat reasonable approach that would preserve the original line-based behavior but present "raw" streams without changing anything between the process and the front end. This is, technically, a breaking change, but I propose that this is worth it going forward for the v2 release.

@GCRev
GCRev requested a review from a team as a code owner April 22, 2024 00:49
@GCRev GCRev changed the title Shell raw-encoded pipe reader directly outputs buffer (no newline scan) feat(shell) raw-encoded pipe reader directly outputs buffer (no newline scan) Apr 22, 2024
@GCRev GCRev changed the title feat(shell) raw-encoded pipe reader directly outputs buffer (no newline scan) [v2][tauri-plugin-shell] raw-encoded pipe reader directly outputs buffer (no newline scan) Apr 22, 2024
@GCRev GCRev changed the title [v2][tauri-plugin-shell] raw-encoded pipe reader directly outputs buffer (no newline scan) feat(shell) raw-encoded pipe reader directly outputs buffer (no newline scan) Apr 22, 2024

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contributions and sorry for the late response.

Could you also add a change file in .changes directory?

Comment thread plugins/shell/src/process/mod.rs Resolved
Comment thread plugins/shell/src/process/mod.rs Resolved
Comment thread plugins/shell/src/process/mod.rs Resolved
@GCRev

GCRev commented May 1, 2024

Copy link
Copy Markdown
Contributor Author

Let me know if I did the .changes file consistently with the others. I'm not sure whether this was a fix or an enhancement.

@GCRev
GCRev requested a review from amrbashir May 1, 2024 04:49
amrbashir
amrbashir previously approved these changes May 2, 2024
@amrbashir
amrbashir merged commit b4efa58 into tauri-apps:v2 May 2, 2024
@amrbashir

Copy link
Copy Markdown
Member

Thank you

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.

2 participants