Clojurians
#cljs-dev
<
2018-03-21
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

dnolen00:03:20

@jumblemuddle I fixed two things in master 1) build can now take 1 argument, just opts 2) you were right, there was still a bad bug, the orphan stuff was quite wrong - try your failing example with master w/ the method you were using earlier when you get a chance

dnolen00:03:28

and thanks much for being so persistent :slightly_smiling_face:

jumblemuddle00:03:49

@dnolen Thanks! I'm testing now.

jumblemuddle00:03:17

The test passed! :smile: I'm testing on my actual project now.

jumblemuddle01:03:32

@dnolen It works like a charm. Thanks again for your patience. :slightly_smiling_face:

dnolen08:03:01

@jumblemuddle note it’s important to understand if you have an orphan that will lead to worse splits

dnolen08:03:42

you really don’t want things to end up in base, so in this case (cljs.build.api/build opts) is better than (cljs.build/api src opts)

dnolen08:03:38

when using cljs.main you don’t have to think about this since cljs.main isn’t file system oriented wrt. namespaces to find to compile

juhoteperi09:03:37

@dnolen Someone mentioned on #clojurescript that infer-externs doesn't work together with :global-exports and with quick testing I think it does't work

dnolen09:03:27

right but that wasn’t supported before or anything

juhoteperi09:03:48

Yeah. If I understand inference correctly, it happens on analyze-dot and obviously that won't be used with global-exports as there is no dot interop forms.

juhoteperi09:03:40

Not huge problem, global-exports are probably mostly used together with externs anyway. I'll open issue about this.

dnolen11:03:41

thanks, I think we just need to make the local ref as being tagged js

r0man11:03:26

after having a wild ride with code splitting yesterday as well, the current master seems to work fine again. thanks for fixing this. my last remaining problem is that sometimes the module info in cljs.loader becomes empty. but this might be a figwheel problem.

dnolen11:03:42

yes if loader for some reason isn’t compiled last this can happen

r0man11:03:30

calling the cljs build api after this happend fixes this. maybe figwheel need to compile cljs.loader after a reload as well.

r0man11:03:02

it happens when I evaluate a file that references cljs.loader. since :recompile-dependents is true by default I think figwheel recompiles loader again but without cljs.core/MODULE_URIS and 'cljs.core/MODULE_INFOS set properly

mfikes12:03:23

I spent about 5–10 minutes discussing side-effecting macros and :closure-defines in the Virtual Clojure Meetup talk, so perhaps that will help a little with preparation for the shared AOT cache feature.

r0man12:03:01

@dnolen I looked a bit around in figwheel and piggieback, but could not find anything suspicious. I don't know too much about the cljs repl, but I wonder if we need a special case there to handle cljs.loader as well. any idea?

dnolen13:03:56

if you change the dependency graph during REPL interactions then probably we do need a special case

dnolen13:03:52

Actually that’s probably not an issue. We just need to recompile cljs.loader as we do in build from :modules

r0man13:03:46

yes, I think. was investigating but run over this: https://dev.clojure.org/jira/browse/CLJS-2679

r0man13:03:18

I think the transport protocol changed from EDN to JSON recently, but the browser repl still reads EDN?

r0man13:03:52

with this patch I can get the code splitting guide working again. before the browser repl was failing for me

r0man13:03:52

david, can you point me to the code where you think we should handle the cljs.loader in the repl?

dnolen13:03:43

browser REPL doesn’t use edn, never has

dnolen13:03:43

@r0man that ticket needs more explanation

dnolen13:03:01

I’ve been using master since the latest changes w/o issue

dnolen13:03:08

for at least 3-4 days

dnolen13:03:22

please add some basic -e case that fails

r0man13:03:55

ok, the new quickstart also failed for me. I'll add an example

dnolen13:03:01

@r0man I guess it’s possible I missed this somehow but that’s very strange

r0man13:03:51

I already saw this some days ago when debugging the code split example.

jumblemuddle13:03:36

@dnolen That makes sense. In this case the orphan was part of cljs-time, and I'm using boot-cljs to build.

r0man13:03:02

@dnolen I can't reproduce the issue with just -e. The most minimal example I have so far is the example of the code splitting guide. The JIRA has the steps to reproduce.

dnolen14:03:37

@r0man that’s really weird

dnolen14:03:23

@jumblemuddle the orphan had to be in your own code

dnolen14:03:31

you can’t have orphans from JARs

john15:03:34

got the per-socket printing working for the websocket socket repl last night

john15:03:18

I'll hopefully have an example up later

petterik15:03:28

@mfikes filed https://dev.clojure.org/jira/browse/CLJS-2681 for the --watch enhancement

jumblemuddle16:03:49

@dnolen Huh, that's weird. The issue was definitely turned on and off in my project when adding and removing cljs-time, and it's fixed with this latest version.