The compile-file function in closure.clj branches on whether an output file is specified. If one is not, the else branch executes compile-form-seq, which does not bind analyzer/cljs-file to the current input filename. This makes the file information unavailable for error descriptions downstream. When compiling to an output file, analyzer/cljs-file is bound within compiler/compile-file*, so this is only a problem when compiling to stdout.
This patch binds analyzer/cljs-file to the input file when outputting to stdout or any otehr non-file target.