This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-13
Channels
- # announcements (3)
- # babashka (130)
- # beginners (73)
- # calva (22)
- # cider (46)
- # cljdoc (18)
- # cljs-dev (196)
- # cljsrn (18)
- # clojure (255)
- # clojure-europe (2)
- # clojure-finland (8)
- # clojure-gamedev (1)
- # clojure-germany (2)
- # clojure-losangeles (6)
- # clojure-nl (1)
- # clojure-spec (16)
- # clojure-uk (33)
- # clojurescript (32)
- # community-development (1)
- # conjure (40)
- # core-logic (11)
- # cursive (4)
- # datascript (8)
- # devcards (17)
- # emacs (21)
- # exercism (2)
- # fulcro (29)
- # funcool (15)
- # graalvm (18)
- # jobs (17)
- # jobs-rus (1)
- # lambdaisland (1)
- # lumo (1)
- # malli (19)
- # off-topic (15)
- # pathom (22)
- # quil (7)
- # re-frame (3)
- # reagent (3)
- # shadow-cljs (14)
- # spacemacs (41)
- # specter (2)
- # sql (5)
- # tree-sitter (1)
- # unrepl (16)
- # vscode (3)
- # xtdb (11)
- # yada (1)
is it possible to always have functions available in the cljs-repl? e.g. if I'd want (:require [cljs.repl :refer [doc]])
regardless of which ns I'm in
you can just call (cljs.repl/doc foo)
from anywhere. having (doc foo)
available does not work without you requiring it
Will fully qualified ns'es always work without requiering them in Cljs? This is not the case in Clj, right?
no. I was assuming that at some point in time (require 'cljs.repl)
was done somewhere so that the ns is loaded
Hello! Why does this code from https://clojurescript.org/reference/google-closure-library#import-a-class fail in shadow REPL?
(shadow/repl :main)
;=> [:selected :main]
(import 'goog.Uri)
;------ REPL Error while processing ---------------------------------------------
;(import 'goog.Uri)
;...
;ExceptionInfo: ns* not supported (require, require-macros, import, import-macros, ... must be part of your ns form)
; shadow.build.compiler/post-analyze (compiler.clj:95)
? OK, the error says I cannot use import, but why not / why does the page above (which, of course, is not about Shadow) talks about REPL? Is that a limitation of shadow REPL compared to vanilla cljs?
(I can use the classes, just not import them)Anyone managed to have pprint activated automatically in the repl as well?
for just pprint, in shadow-cljs.edn
:
{:devtools {:repl-pprint true}}
doc: https://shadow-cljs.github.io/docs/UsersGuide.html#_repl_3Yeah... I tried but it doesn’t work with Cider.
@holyjak I just haven't implemented import since (require 'goog.Uri)
does the same
Thanks! I have misunderstood > :import for Closure classes (which are also namespaces, like goog.Uri) and enums as "use import for classes". Now I understand.
you can open a ticket so I don't forget it again. I personally just never use import
so I keep forgetting to implement it properly
BTW thanks for all your hard work and the amazing tool you have created!