shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
misha 2020-10-28T15:55:52.175500Z

greetings! is there a way to access js var foo from js module(?) which does not export it? specifically https://github.com/paulrosen/abcjs/blob/master/src/write/abc_glyphs.js#L21

(:require ["abcjs/src/write/abc_glyphs"]); :refer [glyphs]]
exposes only 1 top-level var:
module.exports = Glyphs;
https://github.com/paulrosen/abcjs/blob/master/src/write/abc_glyphs.js#L234

misha 2020-10-28T15:57:38.176300Z

I tried every combination from table in https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages with no success

thheller 2020-10-28T15:58:53.177Z

which var do you want to access? in general you cannot access var unless it is part of some exported object

misha 2020-10-28T15:59:31.177300Z

1st link:

var glyphs =

thheller 2020-10-28T16:00:21.177500Z

nope can't get that

😞 1
misha 2020-10-28T16:00:42.177800Z

thank you

thomas 2020-10-28T16:41:49.178800Z

For some reason when I change my code the the code in the browser doesn't update.... :thinking_face:

thomas 2020-10-28T16:42:30.179600Z

I can see the reload image, but the DOM doesn't change. I only have a inti function.

thheller 2020-10-28T17:56:21.180300Z

like missing a ^:dev/after-load tagged function to do the actual re-render

thomas 2020-10-28T18:34:53.181200Z

that did the trick, thank you @thheller. I didn't see that in any of the examples though I looked at. I must have missed something.

thheller 2020-10-28T18:49:34.181500Z

maybe they have the old style :after-load in the build config https://shadow-cljs.github.io/docs/UsersGuide.html#_hot_code_reload

Michael W 2020-10-28T19:02:47.183500Z

@thheller What version did hot-reload change? I have a problem with watching telling me the code is stale even if it compiles from scratch. I have a :devtools :after-load function, and nothing is tagged with ^:dev/after-load in my code. I recently upgraded to the newest shadow-cljs.

thheller 2020-10-28T19:15:37.184Z

it didn't change. both versions work.

Michael W 2020-10-28T19:35:27.187100Z

@thheller I had tried to downgrade and still have the same problem with stale output. Thanks anyways. Any pointers on troubleshooting shadow-cljs processes to find my issue? Still new to clojure and not sure how to find my issue. It seemed to start happening when I upgraded several libs but I have gone back to my last working commit and still shadow tells me I have stale output, even when I completely clear all caches, and see it compile everything from scratch. I also rebooted my laptop just in case there was a process running headless or detached.

thheller 2020-10-28T20:23:18.188600Z

@michael819 there isn't much to it. I assure you that you not loading the correct output if you get stale output warnings.

thheller 2020-10-28T20:23:36.188900Z

make sure all your paths are exactly like you expect them

thheller 2020-10-28T20:24:00.189300Z

I mean just delete the output files you think you are working with and reload the page

thheller 2020-10-28T20:24:19.189800Z

if that doesn't give you 404s then you need to track down the files you are actually loading

flyboarder 2020-10-28T23:38:29.190500Z

@thheller is there a way to update closure library to a newer version?

thheller 2020-10-28T23:39:48.191200Z

I guess you can kinda make your own release?

thheller 2020-10-28T23:40:50.192200Z

shadow-cljs is just using the CLJS-released version which has no new release

flyboarder 2020-10-28T23:41:03.192500Z

yeah looks to be a year out of date so far

thheller 2020-10-28T23:42:11.192800Z

yeah its not updated very frequently