<< Back to previous view

[CLJS-1282] Add a :pprint option to the default reporter in cljs.test Created: 22/May/15  Updated: 28/Jun/15

Status: Open
Project: ClojureScript
Component/s: None
Affects Version/s: 0.0-3269
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Sebastian Bensusan Assignee: Sebastian Bensusan
Resolution: Unresolved Votes: 0
Labels: test

Attachments: Text File cljs_1282.patch     Text File cljs_1282_v02.patch    


Now that cljs.pprint has landed, cljs.test could report failures and exceptions with it. The exact API is TBD.

Comment by Sebastian Bensusan [ 22/Jun/15 4:00 PM ]

The :cljs.test/pprint reporter is implemented as a small deviation from the :cljs.test/default reporter.

The API is equivalent to that of custom reporters:

  (empty-env :cljs.test/pprint)
Comment by David Nolen [ 24/Jun/15 5:51 AM ]

Looks good mostly but small typo: `print-comparisson` instead of `print-comparison`.

Comment by Sebastian Bensusan [ 28/Jun/15 5:13 PM ]

Added the rebased file with the typo corrected.

[CLJS-1320] clojure.string/split adds separator matches & failed matches (nil) when the separator is a regex with alternation Created: 26/Jun/15  Updated: 27/Jun/15

Status: Open
Project: ClojureScript
Component/s: None
Affects Version/s: 0.0-3308
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: lvh Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


I want to split a string on "; ", and optionally discard a final ";". So, I tried:

(clojure.string/split "ab; ab;" #"(; )|(;$)")

In Clojure, this does what I want:

["ab" "ab"]

In ClojureScript, I get:

["ab" "; " nil "ab" nil ";"]

I'm not sure to what extent this is a platform distinction and to what extent it's a bug. Returning nils and seperators from clojure.string/split's output seems like it's against string.split's contract?

[CLJS-1319] Cannot locate module namespace when filename contains dash Created: 22/Jun/15  Updated: 24/Jun/15  Resolved: 24/Jun/15

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: GSoC
Fix Version/s: GSoC

Type: Defect Priority: Major
Reporter: Maria Neise Assignee: Maria Neise
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File CLJS-1319.patch    
Patch: Code


When the filename contains a dash, for example foo-bar, the compiler can't find the namespace for the module, e.g.

No such namespace: module$libs$foo_bar, could not locate module$libs$foo_bar.cljs, module$libs$foo_bar.cljc, or Closure namespace "module$libs$foo_bar" at line 1 src/hello_world/core.cljs {:file "src/hello_world/core.cljs", :line 1, :column 1, :tag :cljs/analysis-error}

Comment by Maria Neise [ 22/Jun/15 5:04 PM ]

Attached a fix for this. The problem was, that we didn't munge the new module-name that is generated by the Google Closure compiler, meaning we didn't replace underscores with dashes.

Comment by David Nolen [ 24/Jun/15 5:43 AM ]

fixed https://github.com/clojure/clojurescript/commit/73117d5a451bca5ab1a5aa8c7fa8cbce67ab98d0

Generated at Tue Jun 30 12:03:41 CDT 2015 using JIRA 4.4#649-r158309.