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

Added output configurations. Related to #3170 #3543

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Dralt03
Copy link

@Dralt03 Dralt03 commented Mar 8, 2025

Exposed a Configuration for the user to select how they want to deal with sterr and stdout for streams in /io/shared/src/main/scala/fs2/io/process/ProcessesBuilder.scala

@Dralt03 Dralt03 changed the title Added output configurations Added output configurations. Related to #3170 Mar 8, 2025
@armanbilge armanbilge self-requested a review March 8, 2025 15:14
@armanbilge armanbilge marked this pull request as draft March 9, 2025 23:26
Copy link
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

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

Nice start! Do you think you can also make the necessary changes to the Processes implementations?

/** Starts the process and returns a handle for interacting with it.
* Closing the resource will kill the process if it has not already terminated.
*/
final def spawn[F[_]: Processes]: Resource[F, Process[F]] =
Processes[F].spawn(this)
}

sealed trait ProcessOutputMode
object ProcessOutputMode {
Copy link
Member

Choose a reason for hiding this comment

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

These look like the right set of options! We need to support stdin, stdout, and stderr to be configured separately.

@Dralt03
Copy link
Author

Dralt03 commented Mar 11, 2025

I think this should do it but do let me know if there is more to improve on this

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.

3 participants