nextjournal / clerk

⚡️ Moldable Live Programming for Clojure

Home Page:https://clerk.vision

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems with tablecloth

CGenie opened this issue · comments

Hello,

I just created a dumb project:

(defproject clerk-test "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :dependencies [[org.clojure/clojure "1.11.1"]

                 [scicloj/tablecloth "7.021"]
                 [io.github.nextjournal/clerk "0.15.957"]]
  :main ^:skip-aot clerk-test.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all
                       :jvm-opts ["-Dclojure.compiler.direct-linking=true"]}}
  :repl-options {:init-ns clerk-test.core})

However, it seems that the tablecloth dependency causes this error with lein run:

Syntax error (IllegalStateException) compiling fs/windows? at (nextjournal/clerk/analyzer.clj:420:7).
var: #'babashka.fs/windows? is not public

Any ideas on how to fix this?

We haven't being using leiningen in years, but simply looking at lein deps :tree tablecloth overrides clerk's babashka/fs version

lein deps :tree

Possibly confusing dependencies found:
[scicloj/tablecloth "7.021"] -> [org.clojure/java.classpath "0.3.0"]
 overrides
[io.github.nextjournal/clerk "0.15.957"] -> [org.clojure/java.classpath "1.0.0"]

Consider using these exclusions:
[io.github.nextjournal/clerk "0.15.957" :exclusions [org.clojure/java.classpath]]

[scicloj/tablecloth "7.021"] -> [babashka/fs "0.0.3"]
 overrides
[io.github.nextjournal/clerk "0.15.957"] -> [babashka/process "0.4.16"] -> [babashka/fs "0.2.12"]
 and
[io.github.nextjournal/clerk "0.15.957"] -> [babashka/fs "0.2.14"]

...

in babashka/fs version 0.0.3 the b.fs/windows? function is indeed private.

You'd have to tell leiningen to override the dependencies the otherway around by moving the clerk dependency before tablecloth (really??) in your project.clj or explicitely exclude it

[scicloj/tablecloth "7.021" :exclusions [babashka/fs]]

I'm closing this, but let us know if the above didn't help.

Btw, that doesn't happen in clojure deps with the following deps.edn

{:paths ["src" "notebooks"]
 :deps {io.github.nextjournal/clerk {:mvn/version "0.15.957"}
        scicloj/tablecloth {:mvn/version "7.021"}}
 :aliases {:dev {:main-opts ["-m" "clerk-tbcl"]}}}
 clj -X:deps tree | grep --color shka/fs

    X babashka/fs 0.2.12 :older-version
  . babashka/fs 0.2.14
    X babashka/fs 0.0.3 :older-version
  X babashka/fs 0.0.3 :older-version