This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-12
Channels
- # aws (3)
- # beginners (28)
- # boot (3)
- # cider (28)
- # clara (5)
- # cljs-dev (107)
- # cljsrn (1)
- # clojure (40)
- # clojure-austin (2)
- # clojure-brasil (5)
- # clojure-canada (1)
- # clojure-italy (1)
- # clojure-spec (39)
- # clojure-uk (38)
- # clojurescript (33)
- # community-development (11)
- # cursive (11)
- # datomic (43)
- # duct (6)
- # emacs (7)
- # flambo (1)
- # fulcro (68)
- # graphql (11)
- # jobs (1)
- # jobs-discuss (8)
- # leiningen (16)
- # luminus (2)
- # lumo (1)
- # off-topic (38)
- # om (2)
- # onyx (15)
- # parinfer (32)
- # portkey (5)
- # re-frame (50)
- # reagent (50)
- # reitit (1)
- # shadow-cljs (63)
- # spacemacs (10)
- # sql (27)
- # unrepl (6)
- # yada (2)
finished a prototype last night of sending code from my editor to developing webpage, https://www.youtube.com/watch?v=lOdUfa7TfW0
@jiyinyiyong two things: can you please post you target/shadow-cljs/logging.properties
? the warning you see on startup is NOT normal. Also please dont use the from-remote
call, it is not part of any public API and may change at any time. Just call (shadow.cljs.devtools.api/repl :build-id)
instead.
the file path it still old, coworkflow
has been renamed to calcit-workflow
for some weeks.
also your startup time seems excessively slow? you are probably out of memory and swapping right? maybe setting :jvm-opts ["-Xmx521M"]
helps a little?
CPU in Mac 12 inch is slow. It is obviously faster when I run shadow-cljs in Macbook Pro.
it still seems very slow. just thinking that it might be using too much memory and start swapping
> 1.2GHz dual-core 7th-generation Intel Core m3 processor Turbo Boost up to 3.0GHz 8GB 1866MHz LPDDR3 memory 256GB SSD storage1
Hi, may I ask how to get some other than js files from npm package in the build? In this case css from material-components-web package. I searched the User Guide and web generally, but haven't found anything.
Cause today I spent such a horrible morning with cljsjs and externs problem in production build, I have to move to shadows ASAP 😉
just moved my build script into a .clj
file, from package.json
https://github.com/mvc-works/calcit-workflow/blob/master/cli/build/main.clj
but I still too call yarn build
as an alias for shadow-cljs run-cljs build.main/build
.. the later is quite long.
and when I want to run some bash scripts from clj, I don't have to initialize shadow-cljs before running it.(although calling Bash scripts from Clojure is kind of slow.)
I personally dislike the running of scripts but I can add an option for that if you like
=>> yarn shadow-cljs clj-repl
yarn run v1.3.2
$ /Users/chen/repo/mvc-works/calcit-workflow/node_modules/.bin/shadow-cljs clj-repl
shadow-cljs - config: /Users/chen/repo/mvc-works/calcit-workflow/shadow-cljs.edn version: 2.1.6
shadow-cljs - starting ...
shadow-cljs - HTTP server for ":browser" available at
shadow-cljs - server running at
shadow-cljs - socket repl running at localhost:5900
shadow-cljs - REPL - see (help), :repl/quit to exit
[1:0]~shadow.user=> (require '[build.main :as b])
nil
[1:0]~shadow.user=> (b/build)
{:exit 0, :out , :err }
[:browser] Compiling ...
shadow-cljs node-repl
shadow-cljs - config: /home/joscha/src/realtime-playground/backend/shadow-cljs.edn version: 2.1.6
shadow-cljs - running: lein run -m shadow.cljs.devtools.cli --npm node-repl
Feb 12, 2018 6:17:05 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.8.Final
Feb 12, 2018 6:17:05 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.8.Final
shadow-cljs - server running at
shadow-cljs - starting node-repl
[:node-repl] Configuring build.
[:node-repl] Compiling ...
[:node-repl] Build completed. (39 files, 1 compiled, 0 warnings, 1.96s)
[0:0]~cljs.user=> fs.js:642
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open '/home/joscha/src/realtime-playground/backend/shadow-cljs/builds/node-repl/dev/out/cljs-runtime/goog.debug.error.js'
at Error (native)
at Object.fs.openSync (fs.js:642:18)
at Object.fs.readFileSync (fs.js:510:33)
at global.SHADOW_IMPORT ([stdin]:44:15)
at [stdin]:3003:1
at [stdin]:3042:3
at ContextifyScript.Script.runInThisContext (vm.js:25:33)
at Object.runInThisContext (vm.js:97:38)
at Object.<anonymous> ([stdin]-wrapper:6:22)
at Module._compile (module.js:570:32)
When trying to run the node-repl in my setup I get this error.
My build config is the following:
{:aws-lambda {:id :aws-lambda
:target :node-script
:output-to "target/backend/backend.js"
:main backend.core/main
:optimizations :none
:language-in :ecmascript5}}
What I noticed is that the backend/shadow-cljs/builds/node-repl/dev/out/cljs-runtime/goog.debug.error.js
seems to be missing the target
dir.
Any hints for me?@schnipseljagd oops. there is a bug in the resolve code
the node process for the repl is started by basically doing cat target/shadow-node-repl.js | node
and that filename gets lost in the process
just released 2.1.7
. I also upgraded the Closure Compiler version which may break stuff. Please let me know if you run into any issues. I did some testing and all appears to be working correctly but its really hard writing automated tests for this stuff so I may have missed some stuff.
@schnipseljagd 2.1.7
also fixes the node-repl
Thx a lot. I am going to verify it.
Looks good to me 🙂