ClojureScript

*cljs-file* not bound when compiling from file to stdout

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code

Description

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.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: