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

add `toInputStreamResource` #1425

Conversation

Projects
None yet
3 participants
@wedens
Copy link

commented Mar 5, 2019

I think it makes sense considering toInputStream returned singleton stream.

Not sure what to do with bin compat though. Is there some branch for breaking changes?

@mpilquist

This comment has been minimized.

Copy link
Member

commented Mar 5, 2019

This is a great idea. If we want to fix this in the 1.0 series, we could introduce a new name for the version that returns a resource -- toInputStreamResource perhaps. Then have the pipe version use the toInputStreamResource method in its implementation.

There's no series/1.1 yet -- we're working on a new interpreter on the topic/fs3 branch but it's a bit early to PR stuff there yet unless the changes are related to the interpreter.

@SystemFw

This comment has been minimized.

Copy link
Contributor

commented Mar 5, 2019

Data point: for hold, which is in a similar situation, I added holdResource.
Ideally we would just change it, but we can't break the api, as you point out.

EDIT: for the implementation you can choose to change the current code, or keep it as is and add .compile.resource to it

@wedens wedens force-pushed the wedens:inputstream-resource branch from 5c6f021 to 7acb465 Mar 6, 2019

@wedens wedens changed the title convert `toInputStream` to `Resource` add `toInputStreamResource` Mar 6, 2019

@wedens

This comment has been minimized.

Copy link
Author

commented Mar 6, 2019

we could introduce a new name for the version that returns a resource -- toInputStreamResource perhaps. Then have the pipe version use the toInputStreamResource method in its implementation.

I've implemented this suggestion.

@mpilquist

This comment has been minimized.

Copy link
Member

commented Mar 7, 2019

@wedens This looks ready to merge to me once we add the mima exclusion for binary compatibility of JavaInputOutputStream.

@wedens wedens force-pushed the wedens:inputstream-resource branch 2 times, most recently from 30652bb to dd9d407 Mar 8, 2019

@wedens

This comment has been minimized.

Copy link
Author

commented Mar 8, 2019

@mpilquist Done.

@wedens wedens force-pushed the wedens:inputstream-resource branch from dd9d407 to 0056398 Mar 8, 2019

@SystemFw SystemFw merged commit 482b271 into functional-streams-for-scala:series/1.0 Mar 8, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@SystemFw

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2019

Thank you!

@mpilquist mpilquist added this to the 1.0.5 milestone Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.