Fork me on GitHub
#cljs-dev
<
2020-05-01
>
dnolen18:05:47

I haven't heard much since last weekend's release issues, anything I missed that should go into a bugfix release?

lilactown18:05:55

haven’t had the chance to play with the :bundle target in depth yet, but to respond to the above re: the guide, I think that tekacs was reading the guide step by step and didn’t understand the state they were in would be remedied by executing the next step. I am puzzled why :bundle creates a main.js or the cljs http server serves a main.js if one isn’t there, let alone why it appears to be in such a broken state (it contains clearly invalid JS)

lilactown18:05:43

might not be worth fixing atm, since the happy path does work once we figured it out

dnolen18:05:32

@lilactown :bundle doesn't create anything itself, it respects :output-to like all other targets

dnolen18:05:33

the browser REPL attempts to serve main.js if it exists

dnolen18:05:22

so I'm really still not clear on what the problem was

dnolen18:05:10

other than something lacking clarity in the guide

lilactown18:05:01

it appeared to be serving a main.js that did not exist on disk

dnolen18:05:28

I don't understand

dnolen18:05:32

how could the next step fix it?

dnolen18:05:21

maybe pointing to the specific part of the guide where this happens would shed some light

dnolen18:05:30

I just copy and paste the steps when I do it and it works

dnolen18:05:36

so something must have happened out of order

lilactown18:05:44

the user setup a cljs build with target :bundle, but did not try to bundle it in any way with a JS bundler yet

lilactown18:05:22

they ran a CLJS REPL and navigated to localhost:9000 and get a broken main.js

dnolen18:05:34

so they didn't follow the tutorial

dnolen18:05:37

there's nothing to do here

lilactown18:05:39

bundling the code with parcel or webpack to generate a main.js on disk fixed it

dnolen18:05:12

they never generated main.js

dnolen18:05:22

the browser repl couldn't find it

dnolen18:05:26

nothing is going to work

dnolen18:05:32

the order of the tutorial prevents this

lilactown18:05:56

😄 if you see no issue here, then I’ll drop it. I think the user had an expectation to follow the guide step by step and when they got into a broken state, instead of continuing they tried to understand the broken state.

lilactown18:05:17

serving a broken main.js if one isn’t on disk seems weird, but if you see no issue then I won’t pursue further

dnolen18:05:23

@lilactown there's just lack information in nearly everything that has been said so far 🙂

tekacs18:05:25

Yup it’s the latter that’s a concern more than anything else @dnolen

dnolen18:05:30

so I can't help if I don't understand

tekacs18:05:49

So — if you don’t run the bundler, it serves a main.js even if there’s not one on disk

tekacs18:05:56

Seemingly one that’s generated on the fly?

dnolen18:05:07

but what does "broken" mean here?

tekacs18:05:31

Broken in the way I outlined in the original thread — it has incorrectly generated JS syntax in it

tekacs18:05:44

I appreciate that you’re told to run the bundler first, but if (like me) you’re trying to adapt the tutorial for another bundler and it fails to generate main.js, you’re going to be fairly confused when the server ‘correctly’ serves a main.js when there’s none on disk... only one that’s broken

dnolen18:05:42

so I found the bug in browser REPL and that is fixed

dnolen18:05:55

but that not going to help w/ any confusion about :bundle and browser REPL

dnolen18:05:04

since they are in fact independent features

tekacs18:05:30

If it served a 404 that’d be amazing — or even a working (but not the bundled) file.

dnolen18:05:34

browser REPL generates a main.js if none found so you can use the browser REPL anywhere you want

dnolen18:05:48

@tekacs what I just said makes that undesirable

dnolen18:05:08

you don't need a project to start browser REPL

dnolen18:05:12

or any source files at all

dnolen18:05:16

just like the Node REPL

tekacs18:05:31

Yup that makes total sense — I think even this is less confusing

tekacs18:05:45

If it weren’t broken then you could continue without feeling that something is blocking

dnolen18:05:08

for sure, thanks for bringing up again @lilactown and being patient with my confusion about what was going on

❤️ 8
tekacs18:05:14

Thank you for fixing that!

tekacs18:05:50

When I saw invalid generated JS I thought I was going crazy :)

dnolen19:05:27

Building 1.10.753 now

dnolen19:05:55

feel free to give it a spin when it appears, if I don't hear anything bad over the weekend will put together an announce post

👍 4