Fork me on GitHub
#shadow-cljs
<
2018-05-21
>
wilkerlucio11:05:02

@thheller I tried to make a chrome release, but I see it says not implemented, any chance you can prioritize that? :)

thheller12:05:02

yeah I'll fix that first. I'll be back in a couple hours and take a look at it then

parrot 4
thheller12:05:34

it should already be compiling and outputting the correct files. only the part updating the manifest is missing

thheller15:05:35

@denik no one reported this so far and I haven't seen anything like that myself. not sure what could cause this. log looks fine.

4
Geoffrey Gaillard16:05:30

Scratching my head around an issue with shadow.loader where the moduleInfo is undefined, and thus 'isLoaded' is undefined. I have modules defined as in {:module-loader true, :modules {:main {:entries []}, :login {:entries [app.login] :depends-on #{:main}}}}. It compiles fine. I get a module-loader.edn and module-loader.json in my :output-dir, containing {:module-uris {:login ["files paths", …]} :module-infos {:login #{}}} In the console:

shadow.loader.load("login");  // => Error: Unknown module: login
shadow.loader.set_loaded("login") // => Cannot read property 'onLoad' of undefined
shadow.loader.mm.getModuleInfo("login") // => undefined
I have been through the doc multiple times but now I'm feeling stuck. Did I miss something ?

thheller16:05:03

@ggaillard check the last line of you main.js. it should contain a call to shadow.loader.setup

👀 4
Geoffrey Gaillard17:05:25

My main.js ends with SHADOW_ENV.load(["path", …]) and no call to loader.setup in the file unfortunately. Neither in login.js 😕

Geoffrey Gaillard17:05:37

main.js is the first file to load, no code is referencing shadow.loader before it finish loading

thheller17:05:44

ah you are still in dev mode. that its in the last file mention in the load call

thheller17:05:54

shadow.modules.main.append or so

Geoffrey Gaillard17:05:02

Indeed ! I got 2 lines in there:

shadow.cljs.devtools.client.browser.module_loaded('main');

shadow.loader.enable();

thheller17:05:13

hmm thats supposed to have a setup call?

thheller17:05:10

hmm try adding cljs.core to the entries of main. there might be a bug with empty :entries

thheller17:05:24

since it can move everything into login then

Geoffrey Gaillard17:05:17

I don't know ... if I recall correctly, lein-cljsbuild is outputing modules infos to the build by defining a goog constant. How is the goog ModuleLoader parametrized in shadow ? I'll try adding cljs.core 🙂

thheller17:05:46

it is parameterized by injecting the setup call

Geoffrey Gaillard17:05:02

Ok got it, I'm looking at the source code. I'll try to find out what's going on

thheller17:05:51

it seems like the isLoaded call was renamed to isActive. so that explains why that fails

Geoffrey Gaillard17:05:16

A change in the closure compiler api ?

thheller17:05:50

closure library

thheller17:05:05

but I just tested in my build and it works fine

thheller17:05:27

ah no isLoaded is still around. you are just missing the setup call for some reason.

thheller16:05:46

if you are trying to use the loader before that call that might be why

alvina17:05:52

hello is there any way connect repl using cider

thheller18:05:32

the latest version of cider should have support for that

thheller18:05:01

or configure a fixed nrepl port https://shadow-cljs.github.io/docs/UsersGuide.html#nREPL and user cider-connect

alvina18:05:18

my cider version is 0.18.0spanshot

alvina18:05:34

when is try to "cider-connect" localhost:PORT

alvina18:05:06

Sync nREPL request timeouot

alvina18:05:18

(op clone id 1 timestap ...)

alvina18:05:43

sorry used wrong port

alvina18:05:11

trying again ..

thheller18:05:15

@wilkerlucio master has support for release. I changed :entry to :shadow/entry as you suggested so you need to update those.

bananadance 4
thheller18:05:51

also added support for multiple different content-scripts should that ever become necessary. no config change for that.

alvina18:05:24

no luck with cider

thheller18:05:10

best ask in #cider. I personally do not use emacs and can't really comment on whats going on over there. maybe something new they added recently.

thheller18:05:18

0.17.0 worked AFAIK

alvina18:05:08

which editor you use

thheller18:05:23

@wilkerlucio master had a bug. update again if you already did.

wilkerlucio18:05:20

@thheller thanks for the heads up, I'm at the office now, so I'll be checking it later today

wilkerlucio22:05:25

@thheller I just tried the compilation, it seems to work mostly, something weird is around some special UTF-8 chars, I use for example the chars and for tree views, but on adv compilation they are rendering as â–¼ and â–¶, you know what that can be about?

wilkerlucio22:05:38

ps: that is not the chrome build, it's on the devtool build, which is a :browser target

wilkerlucio22:05:26

nah, seems something about the chrome devtool, weird it works on normal compilations though