sci icon indicating copy to clipboard operation
sci copied to clipboard

compilation for wrong namespace syntax does not report back clear error message

Open awb99 opened this issue 3 years ago • 0 comments

version

"0.3.5"

platform linux, guix

problem

Cryptic error message when I compile a code that contains a bad namespace form.

repro

I have put in a bad ns form. The closing bracket of the (:require) should be in the end of my code.

(ns goldly.devtools.page.runtime
  (:require 
    [rf]
    [page]
    [user :refer [frisk]])
    [goldly.devtools.ui-helper :refer [add-page-template]])

When I pass the bad ns as code (so as string) to sci for compilation then I get this error: {:error {:root-ex nil, :err "No matching clause: "}}

Now sci has pretty amazing error messages. But this error message first of all does not match the typical format of sci error messages (a lot of data in :root-ex).

expected behavior

make this a nice error message, so I can display to the user what is going on.

awb99 avatar May 18 '22 16:05 awb99