Pretty printing (error) messages that are produced by tasks requires some extra pretty printing code:

pp-message-top(pp-lang) = origin-track-forced((id, strip-annos; pp-message(pp-lang)))
pp-message(pp-lang) = not(is-list); (is-string <+ pp-result(pp-lang) <+ pp-lang <+ (strip-annos; write-to-string))
pp-message(pp-lang) = map(pp-message(pp-lang)); concat-strings

    result@Result(_) -> msg
       if <task-has-failed> result then
         msg := "fail"
         msg := <task-get-results; map(pp-message(pp-lang)); separate-by(|" or "); concat-strings> result

This code is generic and should be added to the runtime libraries. In addition, the default analysis interface should be changed to use this pretty printer:

analysis-single-default-interface = 
  analysis-single-default(id, id, pp-message-top(pp-LANG-string)|<language>)
analysis-multiple-default-interface = 
  analysis-multiple-default(parse-file <+ !(), id, id, pp-message-top(pp-LANG-string)|<language>, <project-path>)
Submitted by Gabriƫl Konat on 11 March 2014 at 17:39

Log in to post comments