Clojure

(pprint-newline :fill) is not handled correctly

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: Backlog
  • Component/s: None
  • Labels:
  • Approval:
    Vetted

Description

Filled pretty printing (where we try to fit as many elements on a line as possible) is being too aggressive as we can see when we try to print the following array:

user> (binding [*print-right-margin* 20] (pprint (int-array (range 10))))

Produces:

[0,
1,
2,
3,
4, 5, 6, 7, 8, 9]

Rather than

[0, 1, 2, 3, 4,
5, 6, 7, 8, 9]

or something like that. (I haven't worked through the exact correct representation for this case).

We currently only use :fill style newlines for native java arrays.

Activity

Rich Hickey made changes -
Field Original Value New Value
Reporter Assembla Importer [ importer ]
Priority Blocker [ 1 ]
Approval Screened Ok
Stuart Halloway made changes -
Priority Blocker [ 1 ] Minor [ 4 ]
Approval Ok Incomplete
Waiting On tomfaulhaber
Alex Miller made changes -
Approval Incomplete [ 10006 ] Vetted [ 10003 ]
Alex Miller made changes -
Labels print

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: