Fork me on GitHub
#shadow-cljs
<
2019-12-06
>
deas11:12:28

Out of dependency hell for the moment, but it is still hot around here. 🔥 😜

thheller11:12:05

@deas btw I looked a bit over the CLJS sources yesterday and I'm fairly certain that your "conditional" require is not supposed to work and only works accidentally 😛

thheller11:12:07

CLJS has a bunch of those accidental things 😛

deas11:12:13

We are in the middle of cleaning up dependency hell.

deas11:12:46

Clojure, Java, ClojureScript, JavaScript ... horrible experience.

deas11:12:47

Tons of details to suffer through.

deas11:12:16

Oh wait theres more: Missed python. Comes with it's very own mess (pip).

thheller11:12:32

programming is fun isn't it? 😛

deas11:12:14

Get's even better once YAML enters the mix.

picard-facepalm 4
deas11:12:23

Not sure which one of those is my favorite.

thheller11:12:39

once you get to know the JS npm ecosystem up close and personal it'll definitely become your favorite ... thing to avoid ... :face_vomiting:

😂 8
deas11:12:33

☝️ One does not simply avoid the npm ecosystem.

deas11:12:03

Remember Google closure maintainers struggling with node modules years ago. That still the case?

thheller11:12:08

I really hope they get their act together with this ESM stuff ... thus mess needs to end

thheller11:12:49

if you mean running random node_modules code through :advanced then yes that will never happen

thheller11:12:31

(unless everything moves to strict standard ES6 or so ... so never)

deas11:12:07

Wonder how many really popular but messy node modules are out there. I mean, I would assume that React and others along those lines are pretty strict and clean by now.

thheller11:12:43

I wish ... quite the opposite actually. they also don't ship ESM at all. only precompiled stuff.

deas11:12:50

Autocorrect? :rolling_on_the_floor_laughing:

Hi15:12:09

Hello, why https://github.com/day8/re-frame/blob/master/docs/CodeWalkthrough.md out of the box displays "Not found. Missing index.html." in the browser? Is there any bug reported on this or do I miss some dependencies?

thheller17:12:08

the example tells you to open example.html? which url did you load? there is no index.html?

mikethompson00:12:28

There was a docs bug. Corrected now.

4
Hi16:12:58

in Active Builds window it sais client Watch starting ...

royalaid16:12:34

Hey @thheller, I don't want to clog up https://github.com/thheller/shadow-cljs/issues/611 with possibly off topic stufff so I figured I would move my questions here

royalaid16:12:00

So I removed the :rewrite-polyfills like you suggested but am still encountering the same error

royalaid16:12:51

Running a completely fresh recompile, cleaned out .shadow-cljs and my output folder (not that it is needed) I get....

royalaid16:12:11

Uncaught TypeError: $jscomp.initSymbol is not a function
    at okta-sign-in.entry.js:14983...

royalaid16:12:20

The same... 😞

royalaid16:12:42

Compiled with cli version: 2.8.80 node: v12.3.1 and running on server cli version: 2.8.80 node: v12.3.1 just to confirm

royalaid16:12:06

Not sure that it matters in this case but we are using tools.deps for deps.

royalaid16:12:22

Anything else you want to me to try or post?

deas17:12:46

What is everybody using today? yarnor npm?

aisamu17:12:24

We're thankfully using yarn!

👍 8
✔️ 4
deas17:12:52

"Thankful" sounds like we want to join you. 😜

sogaiu17:12:13

i've had far less problems with npm recently than before -- but am using both (depending very much on the project)

deas17:12:15

Suffered enough already.

Filipe Silva17:12:29

I prefer npm because that generally leaves me closer to what most users are using

Filipe Silva17:12:16

but yarn has two things that help a lot: running any script as yarn scriptname and resolution to pin arbitrary packages

Filipe Silva17:12:28

so I end up using yarn for those

👍 4
sogaiu17:12:28

on a side note, i think one of the values of yarn was (is?) that it may have "motivated" improvements on npm's side :)

deas17:12:59

@UG1C3AD5Z That is in fact what I was wondering: Did yarn get npm to do things properly and can we all get back to using the default thing.

Filipe Silva17:12:08

npm did improve a lot since yarn came along

Filipe Silva17:12:05

at the moment it's almost a matter of preference

deas17:12:17

@UJVKWJTGE I'd say pinning matters a lot. I don't want to get different results every other day - when not changing code myself that is

Filipe Silva17:12:32

if you want to publish things you should still go with npm, because npm is the real registry

Filipe Silva17:12:42

that's different

👍 4
Filipe Silva17:12:56

the thing that prevents you from getting different versions is the lockfile

Filipe Silva17:12:15

both have a lockfile: yarn.lock and package-lock.json

Filipe Silva17:12:48

they have slightly different philosophies but both ensure subsequent installs where your direct deps don't change won't get different dep trees

Filipe Silva17:12:57

when I mentioned resolutions, it's a different feature

deas17:12:24

I know, but somehow what you said appeared as "`package-lock.json`is still not safe".

Filipe Silva17:12:46

oh no, that's even slightly safer than yarn.lock

Filipe Silva17:12:01

package-lock contains more information than yarn.lock

Filipe Silva17:12:47

the thing I like about resolutions is that it lets you control transitive dep versions, which is very useful when they inadvertently break

deas17:12:22

We have tons of deps everywhere. For the project we are working on, I'd aim at maximum defense wrt to dependencies getting out of control.

deas17:12:24

Been using maven for ages, but still learnt a ton about many details that haven bitten me just recently.

thheller17:12:41

@royalaid I can't reproduce your error. I can require @okta/okta-signin-widget just fine and it loads just find in dev and release builds. maybe you can try setting :compiler-options {:output-feature-set :es6} although it works without for me

royalaid18:12:14

I will try and get an isolated repro

royalaid20:12:22

@thheller my super janky repro so far hasn't triggered the issue so I am going to spend some more time trying to figure specifically why this is happening

royalaid20:12:48

So you not seeing the issue makes sense, it must be something that we are doing with our build

thheller20:12:19

if you use multiple :modules try setting :compiler-options {:output-wrapper false}?