This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-21
Channels
- # aws (2)
- # bangalore-clj (14)
- # beginners (20)
- # boot (20)
- # cider (7)
- # cljs-dev (38)
- # cljsrn (13)
- # clojure (487)
- # clojure-argentina (3)
- # clojure-dev (15)
- # clojure-gamedev (4)
- # clojure-italy (3)
- # clojure-poland (1)
- # clojure-russia (1)
- # clojure-spec (25)
- # clojure-uk (47)
- # clojurescript (127)
- # datomic (125)
- # defnpodcast (1)
- # hoplon (27)
- # jobs (4)
- # lein-figwheel (2)
- # leiningen (1)
- # luminus (5)
- # off-topic (3)
- # om (25)
- # onyx (9)
- # parinfer (3)
- # pedestal (20)
- # planck (65)
- # re-frame (43)
- # reagent (4)
- # remote-jobs (1)
- # ring-swagger (2)
- # rum (9)
- # spacemacs (1)
- # unrepl (37)
- # vim (1)
@mfikes if you have planck at hand, could you try evaluating (require 'clojure.tools.reader)
in the repl? Throws for me in lumo, but I have a hunch it's a bug upstream
sorry should've given all
11326-storage:link_dataflow bfabry$ planck
Planck 2.5.0
ClojureScript 1.9.562
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Exit: Control+D or :cljs/quit or exit or quit
Results: Stored in vars *1, *2, *3, an exception in *e
cljs.user=> (require 'clojure.tools.reader)
nil
@moxaj It is broken with Planck against ClojureScript master:
cljs.user=> (require 'clojure.tools.reader)
No such macros namespace: cljs.tools.reader, could not locate cljs/tools/reader.clj or cljs/tools/reader.cljc
cljs.user=> *clojurescript-version*
"1.9.820"
@moxaj Perhaps a minimal self-host repro can be trivially produced with https://clojurescript.org/community/reporting-bootstrap-issues
(require 'cljs.js)
(cljs.js/eval-str (cljs.js/empty-state)
"(ns cljs.user (:require [clojure.tools.reader]))"
nil
{:eval cljs.js/js-eval}
println)
@moxaj Right, that is a more complicated regression where you actually need to handle code loading. I bet the single-form version on the site works for this, since it is just a require form.
Yes, if that repro’s. A slightly more minimal version is to replace the ns
with (require 'clojure.tools.reader)
@mfikes I think I got it:
(require 'cljs.js)
(cljs.js/eval-str (cljs.js/empty-state)
"(require 'clojure.x)"
nil
{:eval cljs.js/js-eval
:load (fn [{:keys [name macros]} cb]
(cb (when (and (= name 'cljs.x)
(not macros))
{:lang :clj
:source "(ns cljs.x)"})))}
println)
hope i'm using load-fn
right, thinking of the (not macros)
part. I'd assume this should not trigger loading cljs.x
as a macros namespaces (but it tries to, hence the error)
It will first try loading 'clojure.x
and that is supposed to fail, and then cljs.js
will fall back to 'cljs.x
Or, more importantly, we should be able to see whether your repro successfully worked in the past
Interestingly, you can see a hint of how it derails in 1.9.660:
(cljs.js/eval-str (cljs.js/empty-state)
"(require 'clojure.x)"
nil
{:eval cljs.js/js-eval
:load (fn [{:keys [name macros]} cb]
(prn name macros)
(cb (when (and (= name 'cljs.x)
(not macros))
{:lang :clj
:source "(ns cljs.x)"})))}
println)
clojure.x nil
cljs.x true
{:error #error {:message No such macros namespace: cljs.x, could not locate cljs/x.clj or cljs/x.cljc, :data {:tag :cljs/analysis-error}}}
nil
But yes, @moxaj I think that’s a good minimal (REPL-driven) repro, very useful for bisecting on as well
oh, if I wasn't on windows 😞. I don't see any windows equivalent for script/clean && script/bootstrap && rm -rf .cljs_node_repl && script/noderepljs
There is script\bootstrap.ps1
, and yes, script\repljs.bat
. You can probably figure out the way to remove the .cljs_node_repl
tree, and the one last bit missing is a Windows version of script/clean
Oh, just look at the contents of script/clean
@moxaj , you could probably write a bat file that does that
I added a back-link as well https://dev.clojure.org/jira/browse/CLJS-2069?focusedCommentId=46481&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-46481
wouldn't it be nice if the scripts were cljs scripts ran with planck/lumo 🙂 would be really meta
But, that would be a dep in ClojureScript that wouldn’t be desired, I would guess. It would make the script portable, on the other hand 🙂
there could be a small shell/powershell script which bootstraps planck/lumo, which then would bootstrap cljs
I am intrigued with the implication of Alex Miller’s deps talk might be with respect to easily firing up Clojure-based scripts.
@mfikes last year it took a couple months