Clojure

Provide more options for error reporting in clojure.main

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: Release 1.10.1
  • Fix Version/s: Release 1.10.1
  • Component/s: None
  • Labels:
  • Patch:
    Code
  • Approval:
    Ok

Description

There are some potential improvements to be made in the new error reporting configuration in 1.10.1:

  • change setting from a flag to a set of enumerated values ("file" for temp file reporting, "stderr" for printing to stderr, and "none" for no reporting)
  • allow setting by Java system property (clojure.main.report) in addition to a command-line setting (with --report)

In particular on the last item, current invokers of clojure.main do not know about any new option we add, but do know how to pass a Java system property down. So, allowing setting by Java system property will make it possible for users behind tools like leiningen to control the error reporting without needing additional changes.

Proposed:

Allowed values:

  • file - write report to temp file
  • stderr - write report to stderr
  • none - don't report

Set via:

  • Java system property: -Dclojure.main.report=file
  • clojure.main command line option: --report file, overrides system property
  • Default to file, if not set in either above

Patch: clj-2504-2.patch

  1. clj-2504.patch
    15/Apr/19 10:53 AM
    6 kB
    Alex Miller
  2. clj-2504-2.patch
    07/May/19 9:54 AM
    6 kB
    Alex Miller

Activity

Hide
Alex Miller added a comment -

Updated per screener's note to remove the exit flag. Also fixed bug (missing t) in final call to report-error.

Show
Alex Miller added a comment - Updated per screener's note to remove the exit flag. Also fixed bug (missing t) in final call to report-error.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: