This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-19
Channels
- # announcements (5)
- # babashka (49)
- # beginners (11)
- # biff (5)
- # calva (123)
- # clerk (9)
- # cljdoc (5)
- # cljs-dev (9)
- # clojure (62)
- # clojure-europe (32)
- # clojure-nl (1)
- # clojure-norway (54)
- # clojure-uk (3)
- # clojurescript (30)
- # community-development (5)
- # cursive (9)
- # devops (5)
- # events (1)
- # fulcro (35)
- # graalvm (10)
- # gratitude (3)
- # hyperfiddle (9)
- # jobs (3)
- # keechma (1)
- # lsp (10)
- # malli (14)
- # off-topic (42)
- # overtone (1)
- # releases (3)
- # shadow-cljs (66)
- # squint (153)
- # xtdb (19)
I just upgraded shadow-cljs (from 2.17.6 to 2.27.5), and I started getting this:
Warnings in Library Code:
abs already refers to: cljs.core/abs being replaced by: zprint.range/abs
But I’m perplexed because my project doesn’t depend on zprint explicitly, or as far as I can tell, implicitly (it doesn’t show up anywhere in shadow-cljs info
). Is it shadow’s own dependency?could also be stuff injected by your editor if your editor is starting it? e.g. emacs jack-in
*correction: shadow-cljs info
does show it as a direct dependency, but it’s not in shadow-cljs.edn
I do use it for managing deps (although there’s a deps.edn as well in the same dir, for clj dependencies, so unrelated)
that contains all the raw classpath data, maybe info just doesn't construct it correctly
sure, or email <mailto:[email protected]|[email protected]>
hm i just realized that I have a zprint alias in my ~/.clojure/deps.edn
... could that be it?
{:aliases {:zprint {:extra-deps {org.clojure/clojure {:mvn/version "1.9.0"},
zprint/zprint {:mvn/version "1.0.2"}},
:main-opts ["-m" "zprint.main"]}
:with-datomic-valcache {:jvm-opts ["-Ddatomic.valcachePath=/Users/nathell/.datomic-valcache/"
"-Ddatomic.valcacheMaxGb=1"]}
:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:main-opts ["-e" "(do (require 'nrepl.server) (require 'cider.nrepl) (nrepl.server/start-server :port 7777 :handler cider.nrepl/cider-nrepl-handler) (println \"Started nREPL at port 7777\"))" "-m" "rebel-readline.main"]}
:prof {:extra-deps {com.clojure-goes-fast/clj-async-profiler {:mvn/version "1.0.3"}}
:jvm-opts ["-Djdk.attach.allowAttachSelf" "-XX:+UnlockDiagnosticVMOptions" "-XX:+DebugNonSafepoints"]}}
:deps {cider/cider-nrepl {:mvn/version "0.30.0"}
org.clojure/clojure {:mvn/version "1.10.1"}
vvvvalvalval/scope-capture {:mvn/version "0.3.2"}}}
fwiw (tap> (edn/read-string (slurp ".shadow-cljs/classpath.edn"))
with (require '[clojure.edn :as edn])
in via npx shadow-cljs clj-repl
and then look at in
gives me
#{[rewrite-clj "0.6.1" :exclusions [[com.cemerick/austin]]]
[borkdude/edamame "0.0.11-alpha.12"]
[rewrite-cljs "0.4.5" :exclusions [[org.clojure/clojurescript]]]}
yup I was wrong originally, sorry
> *correction: shadow-cljs info
does show it as a direct dependency, but it’s not in shadow-cljs.edn (edited)
#{[superstructor/re-highlight "1.1.0"]
[cljsjs/highlight "10.3.1-0"]
[com.yahoo.platform.yui/yuicompressor
"2.4.8"
:exclusions
[[rhino/js]]]
[zprint "1.0.1"]}
thanks Thomas, you’re a star! i’ve just started sponsoring you on github, it’s long overdue 🙂
[day8.re-frame/re-frame-10x "1.2.2" :exclusions [[com.cognitect/transit-java] [org.clojure/clojure] [thheller/shadow-cljs] [org.clojure/clojurescript] [com.cognitect/transit-clj] [org.clojure/core.async]]]
[cljsjs/highlight "10.3.1-0"]
[com.yahoo.platform.yui/yuicompressor "2.4.8" :exclusions [[rhino/js]]]
[superstructor/re-highlight "1.1.0"]
[zprint "1.0.1"]
[borkdude/edamame "0.0.11-alpha.12"]
[rewrite-clj "0.6.1" :exclusions [[com.cemerick/austin]]]
[rewrite-cljs "0.4.5" :exclusions [[org.clojure/clojurescript]]]
I'm trying to include the latest Tableau JS API in my project, and I'm getting an error:
[:main] Build failure:
no output for id: [:shadow.build.classpath/resource "tableau.embedding.3.3.0.js"]
{:resource-id [:shadow.build.classpath/resource "tableau.embedding.3.3.0.js"]}
ExceptionInfo: no output for id: [:shadow.build.classpath/resource "tableau.embedding.3.3.0.js"]
I'm trying to require it with (:require ... ["/tableau.embedding.3.3.0.js" :as tabjs]...)
in my NS declaration since I had to download the JS file direction -- it's not in NPM. Looking at the JS file, I see a lot of mentions of __webpack_require__
, so I assume it's expecting to be processed by webpack, which I have zero experience with. Any suggestions? I'm lost at sea here.can you link me to the instructions for the package? why did you have to download it?
That's the API file, supplied by Tableau that I'm trying to integrate into my app. It's a plain JS file that I downloaded because I thought I needed it locally to include it in my build.
It is available via a CDN if that's an option.
if this is intended to be included separately you do no include it via the build at all
Ok, that sounds promising. I thought I needed the source locally to be able to reference classes included in the file, but it sounds like I just need to load the script in my app and then just do the old-fashioned js/TableauViz
kind of thing.
but if its an intended "CDN" type library, then it is likely not meant to be "consumed" by other build tools such as shadow-cljs
Well, you've at least challenged my assumptions, so I have some more directions I can explore. That's what I needed to know, thanks!
I don't have much experience working in the "raw" ES6 ecosphere, and I'm also new to shadow-cljs, so it's easy for me to get lost.
basically you always follow the instructions given by the library, and if they give you some import
statements you are supposed to do then you can reference https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages which has a bunch of translation examples
👍 Thanks!
if no such instructions are given and just a CDN reference with a script
tag then you do that and don't tell your build about it at all 😛
It does have "import" statements in the docs, but they weren't working because the library isn't an NPM package (got an error about the imported classes not being present in node_modules
). But we'll see how far I get with the JS globals. At least it's building successfully now.
I'm upgrading from an earlier, non-ES6 version of the API, so I'm following the instructions here: https://help.tableau.com/current/api/embedding_api/en-us/docs/embedding_api_migration_guide.html
but possible that the file includes something the closure compiler doesn't unterstand
Sounds good, I'll pursue that.