Re: [akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-25 Thread Roland Kuhn
Let’s continue on github: https://github.com/akka/akka/issues/18565 > 25 sep 2015 kl. 14:37 skrev Viktor Klang : > > That's a great idea (I think we need a work a bit on the name though). > Make it fusable and ideally not even have to touch the element

Re: [akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-25 Thread Viktor Klang
That's a great idea (I think we need a work a bit on the name though). Make it fusable and ideally not even have to touch the elements... On Fri, Sep 25, 2015 at 2:30 PM, Roland Kuhn wrote: > The real question is whether the Sink itself should care—which it does not > need to as demonstrated by

Re: [akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-25 Thread Roland Kuhn
The real question is whether the Sink itself should care—which it does not need to as demonstrated by the current implementation. If user code cares about stream completion mode then there are many sinks that do not provide this information (because it is not their core business, it is a generic

Re: [akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-25 Thread Viktor Klang
Imagine the following scenario: def x[T, U](providedByCaller: Source[T, U]) = providedByCaller.toMat(SynchronousFileSink(new File(“/some/other/path")))(Keep.both) // <-- how do I know if it failed if all I have is U? On Fri, Sep 25, 2015 at 1:01 PM, Roland Kuhn wrote: > The current behavior

Re: [akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-25 Thread Roland Kuhn
The current behavior is the only consistent behavior I can see for the given type signatures; do you have a better proposal? Should a Sink.file report the reason for why it stopped writing when that reason did not lie within itself? (I’m leaning towards “no”, but even if the answer is “yes” then

Re: [akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-25 Thread Viktor Klang
Question is whether this will be a common source of issues or not. -- Cheers, √ On 25 Sep 2015 08:24, "Roland Kuhn" wrote: > Hi Drew, > > the Future you are looking at is from the Sink, which has not failed: it > has successfully written zero bytes to the output file. The Source on the > other

Re: [akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-24 Thread Roland Kuhn
Hi Drew, the Future you are looking at is from the Sink, which has not failed: it has successfully written zero bytes to the output file. The Source on the other hand has failed and should give you the right exception when you look at it: val (sourceFuture, sinkFuture) = source.toMat(sink)(Keep

[akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-24 Thread Drew Kutcharian
Hi Guys, In the following simple file copy code: object TestStreams extends App { implicit val system = ActorSystem("akka-stream") implicit val materializer = ActorMaterializer() val source = SynchronousFileSource(new File(“/path/to/non/existing/file")) val sin