This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-16
Channels
- # atlanta-clojurians (8)
- # beginners (103)
- # boot (22)
- # boot-dev (1)
- # cider (36)
- # cljs-dev (55)
- # cljsrn (3)
- # clojars (25)
- # clojure (104)
- # clojure-brasil (1)
- # clojure-dusseldorf (2)
- # clojure-italy (8)
- # clojure-norway (9)
- # clojure-russia (15)
- # clojure-spec (6)
- # clojure-uk (26)
- # clojurescript (246)
- # cursive (26)
- # data-science (1)
- # datomic (22)
- # dirac (11)
- # editors (1)
- # emacs (8)
- # fulcro (50)
- # graphql (11)
- # hoplon (1)
- # jobs-discuss (27)
- # leiningen (44)
- # luminus (33)
- # lumo (2)
- # mount (1)
- # off-topic (8)
- # onyx (5)
- # parinfer (4)
- # reagent (94)
- # ring-swagger (14)
- # shadow-cljs (37)
- # spacemacs (10)
- # specter (3)
- # tools-deps (4)
- # unrepl (14)
- # yada (5)
Huh. TIL, if you put an alias like this in your ~/.clojure/deps.edn
:
:cljs-built {:extra-deps {org.clojure/clojurescript {:mvn/version "RELEASE"}}
:main-opts ["-m" "cljs.main"]}
then clj -Acljs-built
will run whatever was the last version you deployed locally via script/build
(Up until now, I've been manually editing that file each time with the explicit version number.)@juhoteperi it’s not really possible to use the npm deps with the Node REPL w/o setting -d
maybe there’s a way to mess w/ NODEPATH
to get this to work, but I couldn’t figure it out - it’s definitely not a blocker
Yeah. Maybe something to document somewhere, or if possible, give warning about when trying to do that.
also REPLs will use the same compilation pipeline as build
instead of the weird old stuff
there are some fairly dramatic changes to how REPLs work, it would be a good time to test master
loading JS modules via node_modules
directly or through a namespace should work much better now (especially in non-Node.js context)
@richiardiandrea ^ your issues didn’t really have anything to do with Socket REPL in the end - just a dupe of the other reports about JS module deps not working at the REPL
@dnolen thanks I just finished looking at both commits for the reports, thanks for working on this, I will test today
Here is the success / failure history https://github.com/mfikes/clojurescript/commits/master
Ahh, perhaps this is actually it, I get this locally @dnolen
ERROR in (test-emit-global-requires-cljs-2214) (analyzer.cljc:2098)
Uncaught exception, not in assertion.
expected: nil
events.js:112
throw er; // Unhandled 'error' event
I’d like hear feedback from compiler contributors before kicking off another pre-release - something could have slipped into REPLs
The cljws chat server thing ran fine. The only very minor thing I've noticed is that when launching just a local cljs repl with clj -m cljs.main
the repl no longer prints the *clojurescript-version*
before the prompt. (lol, nm, cljws would in no way test cljs.main 😂)
tried socket REPL on my kind of big app and still getting a bunch of clojure.lang.ExceptionInfo: pg does not exist {:cljs.repl/error :invalid-ns}
will try to make a minimal repro, weirdly enough CLJS-2613 seems solved
this might be something else
@richiardiandrea I wonder if this is similar to your pg
error https://dev.clojure.org/jira/browse/CLJS-2669
No no I am detecting this with other :npm-deps
as well so that one was solved, you need to get the right combination of -m cljs.main -c ... -r
, trying things out...
will try more later
so it looks like you cannot have socket REPL AND cljs.main
at the same time, probably this is expect, I remember David telling me about this
better phrased as:
$ clojure -J-Dclojure.server.repl="{:port 5555 :accept cljs.servenode/repl :args [{:opts $(cat cljsc_opts.edn)}]}" -Srepro -m cljs.main -re node -r
cljs.user=> (require 'cli-repro.core)
module.js:540
throw err;
^
Error: Cannot find module 'left-pad'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/tmp/out37982595520967933633430947311539/cli_repro/core.js:4:39)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
cljs.user=>
but:
$ nc localhost 5555
cljs.user=> (require 'cli-repro.core)
Reading analysis cache for file:/home/arichiardi/tmp/cli-repros/src/cli_repro/core.cljs
Padded: 00042
nil
cljs.user=>
I wonder if this might confuse a new user going through QuickStart
cljs.user=> (require '[hello-world.core :as hello] :reload)
cljs.user=> Hello world!
(The print happening at the prompt.)
I have no good thought as to a good solution.as with having the apostrophe in the namespace, requiring the user learn about underscored directory names
It appears to be a peculiarity of the async nature of the browser REPL. Here is Node, for example:
cljs.user=> (require '[hello-world.core :as hello] :reload)
hello world
nil
cljs.user=>
I successfully ran through Quick Start with master, with the only thing of note being https://dev.clojure.org/jira/browse/CLJS-2661
I have also seen a lot of CLJS-2661 when trying to test some of my code with clojurescript master…
As a separate effort, I'll check that our :closure-warnings
keyword list mapping is up to date.