dirac icon indicating copy to clipboard operation
dirac copied to clipboard

ns/as-alias not supported

Open jakub-stastny opened this issue 2 years ago • 0 comments

Zdar, this code breaks dirac:

(ns a.b.c "Test" (:require [bm-web.routes :as-alias routes]))

The as-alias syntax allows to refer to :bm-web.routes by ::routes (instead of it refering to :MY-CURRENT-NS/routes). It's a fairly new CLJ addition.

However dirac isn't happy about it:

#ExceptionInfo{:message nil,
               :data {:clojure.error/source nil,
                      :clojure.error/line nil,
                      :clojure.error/column nil,
                      :clojure.error/phase :compilation},
               :cause #ExceptionInfo{:message "Only :as, :refer and :rename options supported in :require / :require-macros; offending spec: [bm-web.routes :as-alias routes]",
                                     :data {:tag :cljs/analysis-error}}}

It shows Internal Dirac Error [D:implant:70] "Unable to parse namespace from source\n" in the devtools.

jakub-stastny avatar Apr 07 '23 02:04 jakub-stastny