This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-17
Channels
- # babashka (9)
- # beginners (10)
- # calva (10)
- # cider (2)
- # clojure (19)
- # clojure-denver (11)
- # clojure-europe (13)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-uk (3)
- # clojurescript (30)
- # conjure (1)
- # core-typed (15)
- # cursive (26)
- # data-science (4)
- # datomic (5)
- # emacs (6)
- # events (1)
- # fulcro (14)
- # honeysql (15)
- # hyperfiddle (51)
- # lsp (1)
- # obb (36)
- # off-topic (7)
- # polylith (4)
- # practicalli (12)
- # reitit (20)
- # shadow-cljs (25)
- # xtdb (4)
I'm loading a .js file from the classpath in a shadow project:
["/squint/core" :as squint-core]
Compiler says no though:
Closure compilation failed with 1 errors
--- squint/core.js:456
Transpilation of 'Computed fields' is not yet implemented.
What's going on here again?sure, but how do I get the Closure compiler to not process this JS at all? I just want to use it as is
if this is within a normal :esm
build you can use ["esm:./squint/core" :as squint-core]
instead as the require
that will leave it exactly as is and let the runtime load it at actual runtime, so not part of the build
The offending bit is this:
// class LazyIterable {
// constructor(gen) {
// this.gen = gen;
// }
// [IIterable] = true;
// [Symbol.iterator]() {
// return this.gen();
// }
// }
I'm not sure if I can rewrite this to something that Closure understandsyou can do LazyIterable.prototype[IIterable] = true
after the class definition. that should behave exactly the same.
hey beginner question
I'm starting a new cljs project and following along with the docs
when I just try running shadow-cljs
commands I get a could not find error
here's a snippet
shadow-cljs - dependency update failed - Could not find artifact com.sun:tools:jar:1.8.0 at specified path C:\Program Files\Java\jre1.8.0_341/../lib/tools.jar
DependencyResolutionException Could not find artifact com.sun:tools:jar:1.8.0 at specified path C:\Program Files\Java\jre1.8.0_341/../lib/tools.jar
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:355)
I assume this is some sort of problem related to finding java on the classpath but I'm not sure how to fix it. has anyone seen this issue before?try installing the latest version from https://adoptium.net/
It worked! Thanks Thomas.
Problem: Could not find artifact ...
Solution: Uninstall java 1.8 if you still have it. Install newer versions of java, at least 11.
example: https://adoptium.net/
It worked! Thanks Thomas.
Problem: Could not find artifact ...
Solution: Uninstall java 1.8 if you still have it. Install newer versions of java, at least 11.
example: https://adoptium.net/
Problem: I run shadow-cjs run <namespace/function>
and it says namespace not found
(possible) Solution: Make sure the filetype is .clj
not cljs
. I don't think you can run .cljs files
correct. run
is meant for CLJ code as documented https://shadow-cljs.github.io/docs/UsersGuide.html#clj-run