This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-24
Channels
- # beginners (108)
- # boot (16)
- # bristol-clojurians (1)
- # cider (20)
- # cljs-dev (167)
- # clojure (64)
- # clojure-greece (4)
- # clojure-hamburg (1)
- # clojure-russia (1)
- # clojure-uk (27)
- # clojurescript (235)
- # datomic (1)
- # devops (2)
- # fulcro (80)
- # graphql (6)
- # heroku (2)
- # jobs-discuss (1)
- # jobs-rus (2)
- # lein-figwheel (1)
- # lumo (2)
- # nyc (1)
- # off-topic (22)
- # portkey (4)
- # re-frame (44)
- # reagent (39)
- # ring-swagger (9)
- # shadow-cljs (90)
- # tools-deps (5)
- # vim (8)
- # yada (2)
i’ve dug around here https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/devtools/api.clj#L81 looking for the reason that I cannot seem to get (devtools.api/watch build-id)
to work, and it seems like there’s some stateful dependencies in an existing runtime?
i get the issue assert failed (map? http)
, which if you backtrack quite a bit seems to be coming from an existing supervisor who has some http config. i’m not sure if there’s an alternative way I should be using the clj-run
api or not, but this doesn’t seem to be correct 😕
on my way to bed. please open a ticket. there should be an option for clj-run to run a full server to enable watch
This would be great. I’d like to have a script for dev which always compiles a few static assets before beginning ‘watch’, and I think clj-run would be the simplest way to set that up.
This would be great. I’d like to have a script for dev which always compiles a few static assets before beginning ‘watch’, and I think clj-run would be the simplest way to set that up.
Is there are way to use shadow-cljs and browserify together? I'm trying to require a npm module (pouchdb-adapter-memory), but when I include it in my namespace requires it throws the following error:
shadow.js.js:91 Uncaught ReferenceError: Buffer is not defined
at Object.shadow$provide.module$node_modules$buffer_from$index (index.js:5)
at shadow.js.jsRequire (shadow.js.js:88)
The solution of Buffer is not defined
error is to run the module through browserify, but I'm not sure how to integrate that with shadow-cljs.
in the namespace that includes pouchdb-adapter-memory
add an extra require for a (ns bugfix.buffer (:require ["buffer" :as buffer])) (js/goog.exportSymbol "Buffer" buffer)
I could a hack to do this automatically but most packages these days behave properly and don't use a global Buffer
if you require bugfix.buffer
(or whichever ns you use for this) before the pouchdb
thing it should work
Thanks, that did the trick. Where I got stuck is that I didn't think to set the global in a separate namespace - I tried setting it in the same namespace which of course didn't work. Thanks for the quick reply.
They do state on the npm page "Designed to run in either Node or the browser".
I've found some of the other less maintained pouch plugins have similar issues, one plugin had a requirement for Process
Thanks for this quick reply, appreciate the help!
I want to give some of those cljs devtools a try again, looking at dirac there's suggested way to start their agent (assumable on nrepl server) with :init in lein
:repl-options {:init (do
(require 'dirac.agent)
(dirac.agent/boot!))}
source: https://github.com/binaryage/dirac/blob/master/docs/installation.md
is there an option like that available in shadow-cljs?ok, I'm also planing to look at integrating the clj
cli tools into nixOs so I can use them later today. So I'll continue with the devtools quest tomorrow. Thanks thheller!
hello, I'm trying to compile something with shadow, but I'm getting this error:
I had a lot of code changes since the last time I compiled (was working on the clj side), and just bumped shadow as well, not sure what might caused
I"m trying to rever t and see if I get teh same with old shadow, but you guys have seen this before?
reverting shadow to 2.1.18
makes it generate warnings instead of breaking
is there a way to fix? when I reverted I was able to compile by fixing some macro requires, but now I bumped again and the error persists
ok, I think I'm starting to understand, but the cljs version is the same on both cases for me, when did the closure get updated? and it seems like this way I can't compile anything at all, the only way is to revert shadow here then?
but reverting shadow here makes it work, I think I'm missing something
I'm still on cljs 1.9.946
previously I used a hack to provide a custom cljs.closure
namespace but that had other issues
it is kind of tricky trying to stay up to date with the closure compiler and clojurescript itself lags behind
gotcha, just feel a little danger using those non-release versions, seems people are getting bitten by new things still, like the new map stuff
sorry, map* stuff (new map keys been entity)
but for my current project it's work, I'm just wondering for people relying on it for real prod stuff
I guess they should lock the shadow-cljs if they have problems with new cljs things
well you want to fix those things anyways. clojurescript isn't going to change how MapEntry works
for me 1.10 has been stable. the only non-stable part is all the new cljs.main stuff but we don't use any of that anyways so it doesn't matter
yeah, I agree, but sometimes you depend on a library that you don't have much control, and it might take a while to fix, and on those cases you get locked, unless you decide to fork... tradeoffs
at least people seem to be fixing it fast 🙂
specter was broken, but was fixed already
ok, I think I'm hitting another hookie mistake, but on runtime I'm getting these: https://www.dropbox.com/s/vx09tnx0cu4si7c/Screenshot%202018-03-24%2017.36.45.png?dl=0
I was using React 16 with project already before, did something changed about loading the cljsjs deps?
shadow.process
is the cause. don't know why that wouldn't exist though. maybe cache issue?
how can I burst it?
@thheller still getting the same, tried bursting and recompiling twice
what does the main.js look like? it should contain a goog.addDependency
for shadow.js
and shadow.process
I have no idea why shadow.process
wouldn't exist since it shouldn't even compile if it can't find it
wait, I forgot to delete the old files thenselves as well
yeah, now it works, thanks 🙂
worked after removing the compiled files, first I just deleted the cache
I was thinking this kind of things happens most often when I get back to a project that I didn't ran for a while
I was thinking if would be a good idea to store the last compilation run, and just burst everything after some amount of time (maybe 3 days or something)
has anyone gotten shadow-cljs to work with vim-fireplace? Im not quite sure why, but none of the shadow-cljs tasks ever say shadow-cljs - nrepl running at localhost/127.0.0.1:8202
, which makes me think I need to manually configure it to actually start an nrepl?
so if you start a server, the server will say what port its running on. i configure to always use port 9000 :nrepl {:port 9000}
. i know thomas has been reluctant to use lein’s nrepl port file