Fork me on GitHub
#girouette
<
2022-06-04
>
Derek15:06:56

Running the 0.0.8 processor and seeing an exception get thrown. More details in thread

Derek15:06:02

Execution error (NullPointerException) at girouette.processor/spit-output (processor.clj:175).
Cannot invoke "clojure.lang.IFn.invoke(Object)" because "this.f" is null

Derek15:06:40

from deps.edn:

:girouette-processor
{:extra-deps
   {girouette/processor {:mvn/version "0.0.8"}}
   :ns-default girouette.processor
   :exec-fn    process
   :exec-args
   {:css
    {:output-file      "./public/static/css/main.css"
     :retrieval-method :annotated}
    :color? false}}

Derek15:06:32

Seeing it in both watch mode and non

Derek17:06:29

Full context:

$ clojure -X:girouette-processor
WARNING: abs already refers to: #'clojure.core/abs in namespace: garden.color, being replaced by: #'garden.color/abs
:gear: Settings:
{:output-file "./public/static/css/main.css",
 :watch? false,
 :verbose? true,
 :css-symb girouette.core/css,
 :retrieval-method :annotated,
 :source-paths ["src"],
 :output-format :css,
 :base-css-rules [],
 :color? false,
 :dry-run? false,
 :file-filters [".cljs" ".cljc"],
 :apply-classes nil,
 :garden-fn nil}

src/org/passen/homepage/links.cljs: :boom: parse error!
src/org/passen/homepage/app.cljs: :boom: parse error!
src/org/passen/homepage/about.cljs: :boom: parse error!
src/org/passen/homepage/external_link.cljs: :boom: parse error!
Execution error (NullPointerException) at girouette.processor/spit-output (processor.clj:175).
Cannot invoke "clojure.lang.IFn.invoke(Object)" because "this.f" is null

Full report at:
/var/folders/qp/_zw4563s7r57w1c907ts06lr0000gn/T/clojure-11121298016966490294.edn

Derek17:06:14

For comparison, when using 0.0.7:

$ clojure -X:girouette-processor
WARNING: abs already refers to: #'clojure.core/abs in namespace: garden.color, being replaced by: #'garden.color/abs
:gear: Settings:
{:output-file "./public/static/css/main.css",
 :watch? false,
 :verbose? true,
 :css-symb girouette.core/css,
 :retrieval-method :annotated,
 :source-paths ["src"],
 :output-format :css,
 :color? false,
 :dry-run? false,
 :file-filters [".cljs" ".cljc"],
 :apply-classes nil,
 :garden-fn #'girouette.tw.default-api/class-name->garden,
 :preflight? true}

src/org/passen/homepage/links.cljs: [+ flex gap-x-3 justify-center]
src/org/passen/homepage/app.cljs: [+ dark:bg-black dark:text-white flex flex-col min-h-screen p-2 pb-4]
src/org/passen/homepage/about.cljs: [+ flex-grow]
src/org/passen/homepage/external_link.cljs: [+ hover:underline]
:tada: CSS stylesheet generated!

Vincent Cantin02:06:16

In v0.0.8, the processor as less defaults and requires more options. See for example: https://github.com/green-coder/girouette/blob/master/example/reagent-demo/deps.edn#L14-L21

Vincent Cantin02:06:09

You might add :garden-fn and :base-css-rules

Derek02:06:29

Thank you, my misunderstanding. I will try

Vincent Cantin02:06:53

I forgot to write about it in the changelog, will update it soon.

Derek03:06:08

That’s what it was. Thanks, and yes, the new watcher sure does seem a lot faster. Wonderful

👍 1