Fork me on GitHub

I'm trying to follow the new version of the ClojureScript Quick Start guide at, but I get the following error after issuing clj --main cljs.main --compile hello-world.core --repl:

Compiling client js ...
Serving HTTP on localhost port 9000
Listening for browser REPL connect ...
Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
Which I believe is due to the fact that I'm running this inside a Docker container. I have tried to look at the official guide and reference on and the clj --help output but nowhere I've found a mention on how to make it not try to launch the browser automatically (headless).


Hmm.. I guess the problem is that I'm specifically asking for a --repl and in the context it seems to take for granted that it is a browser repl.


you want to use a headless repl environment


clj -m cljs.main -c hello-world.core -re node -r


not sure if the quickstart works with node though... js/alert won't be there, etc.


ah, there's details on node towards the bottom of the quickstart


Yeah, I just assumed it would have the option to open the browser myself like lein. Thanks @john.


I’ve noticed you asking docker questions here and in #docker, and honestly I recommend running the development tools directly on your machine at least until you’ve worked through the quickstart and have some experience with the toolchain. Then when you come back to running things in Docker you’ll at least know what it looks like when things work as they should.


@anantpaatra clj -m cljs.main -c hello-world.core -ro '{:launch-browser false}' -r


Then you could connect to it from a phantom instance or something


Thanks @gonewest818, I'll take that into account. I've had the tools locally for a long time, and have been in and out of Docker, so I'm forcing myself to go the hard way and figure how things would work with Docker now that I need to co-op with a friend who is also learning.


@john I'll try that! Thanks again.


Are you pushing a jar into the docker?


I guess as long as you can get clj tool in there


No, haven't tried that. Just trying to build a simple cljs setup that I can share with my friend.


And trying the new cli-tools in this case.


Clojure tooling in general have posed as hard obstacles to me (no programming background), even more than the language, so trying to understand what the new tools are doing that may facilitate things my way.


Nice, well I doubt many have treaded your ground, with this trifecta of docker, clj tool and the new cljs.main, so it'd be interesting to read up on your experiences.


I must write about it indeed. I believe the language itself is very appealing to someone who likes elegance and minimalism in code. Front-end developers trying to learn back-end or reactive front-end, especially those who study alone, have a tendency to find the ground in the CLJ/CLJS community really tough because people have a really robust background here. I'm still learning but I'm figuring things out at a faster pace now, maybe it can help others in a similar situation.


We've discussed a bit about this in the new #programming-beginners channel. How the language feels just right and gives us a lot of "wow" moments, but the tooling and the ecosystem are still really harsh for non-programmers.


The tooling is still evolving towards becoming as easy and elegant as the language itself.


This is why I'm really interested in the new official tools.


This new guide is very refreshing and simple compared with most others. I guess the mindset in the community is going the right way and that feels awesome.


@dnolen @mfikes so this doesn't seem right to me (let [v-1 1 v_1 2] [v-1 v_1]) => [2 2], ran across it here


@yogthos I logged that somewhere... Let me find it


Almost looks like the tweet copied my examples 🙂


The straightforward fix is easy.. But would slow down compilations A LOT


well would a warning work?


Same complexity... The right approach is to store "starting ns + bindings" munged in a separate set. That'd also speed up compilation (possibly by a lot).


Related: Personally, I want to push to emit ES6 const + let instead of vars all over the place. Would make this at least fail fast instead of fail silently. And would simplify the compiler a bit, generate faster + smaller code (so: Many wins)


wow i’m surprised that is consider minor defect. it’s the kind of maddening thing that could burn a ton of time.


yeah it's not obvious behavior by any means, and most people coming to Clojure are likely to be used to using _ instead of -. I've seen people mix the two commonly as they transition to using dashes.


with no warning or error it would be a terrible thing to try to debug


Is it possible to use closure-defines at macro expansion time?


@danielcompton No but you can just emit code that checks them (with identical? probably) and rely on DCE


thanks, I thought that might have been the case. Makes the macro a bit trickier to write

Garrett Hopper18:03:57

In a cljs node repl, I can require node modules easily, but when I try to require a namespace that requires node modules, it can't find them. (The error message also seems like the quotes are removed from the require.) Any ideas?

Garrett Hopper18:03:11

I don't get

java.lang.AssertionError: Assert failed: cljs.analyzer/foreign-dep? expected symbol got "non-existant"
(symbol? dep)
clojure.lang.ExceptionInfo: No such namespace: cookie, could not locate cookie.cljs, cookie.cljc, or JavaScript source providing "cookie" in file /data/prs/boot/cache/tmp/data/prs/dev/amazon/bi1/-ru88jt/userinfo/core.cljs {:tag :cljs/analysis-error}
when requiring the namespace.

Garrett Hopper18:03:24

I've even added :path ["node_modules"] to the node-repl/repl-env call.

Garrett Hopper18:03:29

Similarly calling load-file through emacs doesn't work, but manually evaluating the ns form of the dependency file then the ns form of first file (which refers the the other namespace) works.

Garrett Hopper18:03:55

If I manually call (require '["module"]) for each of the modules from the cljs.user namespace, I can then require the namespace that requires them. Perhaps this has something to do with my using a boot repl since it runs from cache folders?


ClojureScript question, does cljs.test/testing work with async tests?


I am printing :testing-contexts it in a defmulti but it always seems to be empty


wanted to ask here first before working on a repro

Garrett Hopper20:03:51

This is driving me crazy. Apparently the node cljs repl supports importing arbitrary modules from node_modules via require, however it doesn't when loading a file (typically by requiring a namespace that requires a module).


@ghopper first thing I would do is check that this works with ClojureScript itself to eliminate other variables


there might be REPL bug here of some kind - I wouldn’t that surprised

Garrett Hopper20:03:52

@dnolen Check that what works with ClojureScript? As in no in building instead of a repl?


no I mean I don’t know how you’re running a REPL


but if by some other means other than ClojureScript it muddies the waters

Garrett Hopper21:03:49

@dnolen Oh, I am directly running cljs.repl/repl, if that's what you're saying. Along with a prior to it with the same :output-dir. (I'm still not sure how this works) I'm putting together an example project now.


well that’s a lot of details we might not be interested in


if there’s a minimal case where the REPL won’t load some node modules then just report that

Garrett Hopper21:03:08

Will do. I'll post the minimal case.

Garrett Hopper21:03:58

@dnolen How should multi-file clojurescript issues be formatted and where should they be submitted?

Garrett Hopper21:03:07

Perhaps a Github gist or something?


everything inline in the issue


if it’s minimal this is easiest

Garrett Hopper21:03:25

As a Github issue? I'm not seeing an issues link as with most projects, and /issues takes me to pull requests.


yes pelase

Garrett Hopper21:03:55

@dnolen It's created. I'm not sure it's in the correct format though: