scicloj / clay

A REPL-friendly Clojure tool for notebooks and datavis
https://scicloj.github.io/clay/
Eclipse Public License 1.0
132 stars 13 forks source link

Clay & clerk is broken on clerk upgrade: No such var: view/->result #15

Closed dmg46664 closed 1 year ago

dmg46664 commented 2 years ago
2. Unhandled clojure.lang.Compiler$CompilerException
   Error compiling scicloj/clay/v1/tool/clerk.clj at (38:20)
   #:clojure.error{:phase :compile-syntax-check,
                   :line 38,
                   :column 20,
                   :source "scicloj/clay/v1/tool/clerk.clj"}
             Compiler.java: 6825  clojure.lang.Compiler/analyze
             ...
                  main.clj:  368  clojure.main/repl
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   84  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   56  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  152  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  202  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  201  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
               Thread.java:  833  java.lang.Thread/run

1. Caused by java.lang.RuntimeException
   No such var: view/->result

                 Util.java:  221  clojure.lang.Util/runtimeException
             Compiler.java: 7405  clojure.lang.Compiler/resolveIn
             Compiler.java: 7375  clojure.lang.Compiler/resolve
             ...
             Compiler.java: 7653  clojure.lang.Compiler/load
                   RT.java:  381  clojure.lang.RT/loadResourceScript
                   RT.java:  372  clojure.lang.RT/loadResourceScript
                   RT.java:  459  clojure.lang.RT/load
                   RT.java:  424  clojure.lang.RT/load
                  core.clj: 6161  clojure.core/load/fn
                  core.clj: 6160  clojure.core/load
                  core.clj: 6144  clojure.core/load
               RestFn.java:  408  clojure.lang.RestFn/invoke
                  core.clj: 5933  clojure.core/load-one
                  core.clj: 5928  clojure.core/load-one

I believe the following commit broke it 🔥 : https://github.com/nextjournal/clerk/commit/133c32c608078ab8cc5d90b3eb762be2b8556791#diff-8950130d83008fae9fd570854a759d6542375816ee6c4b647cae8f1cecdd276dL84

as it is using the following: https://github.com/scicloj/clay/blob/main/src/scicloj/clay/v1/tool/clerk.clj#L38

dmg46664 commented 2 years ago

With https://github.com/scicloj/clay/pull/16 it loads with clerk version 0.8.486 but now I get the following error echarts:

t.split is not a function

at No (https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:45:12483)
at Go.t.hasClass (https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:45:13874)
at https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:45:112747
at Array.forEach (<anonymous>)
at E (https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:35:5071)
at e._mergeOption (https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:45:112715)
at $p (https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:45:118076)
at e._resetOption (https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:45:112175)
at e.setOption (https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:45:111877)
at e.setOption (https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js:45:198523)

@daslu mind taking a look?

dmg46664 commented 2 years ago

Perhaps the following https://github.com/apache/echarts/issues/4538

daslu commented 2 years ago

@dmg46664 thank you so much, I will look in the coming days.

daslu commented 1 year ago

closing (irrelevant in clay v2, which does not try to invoke clerk)