Fork me on GitHub
#clojurescript
<
2018-04-06
>
dehli00:04:52

yes! that will help a lot. thanks so much!

✌️ 4
soulflyer00:04:51

@jpaulorio I tend to agree with @milomord. If you start with react, try re-com for its really useful layout components, then re-frame for it's nice handling of state. I would say don't let the initial complexity of re-frame put you off. Once you get through the intro pages it's not so hard, and I really like the way it encourages me to write clean code. Note: re-com does come with a warning about not working with older browsers as it relies on flexbox. Personally I don't see this as a problem but it might be, depending on what you are trying to create.

andre.stylianos00:04:34

Also, @dehli. You can use doo directly as a library instead of using lein-doo (which is what cljs-test-runner does under the hood) https://github.com/bensu/doo#library

andre.stylianos00:04:05

At the moment cljs-test-runner only allows you to use either node or phantomjs to run your tests

dehli00:04:16

oh very cool. i’ll give that a look as well.

andre.stylianos00:04:26

so if you want chrome-headless or something similar it’s best to use doo directly

andre.stylianos00:04:35

(it’s what we’ve been doing)

dehli00:04:42

gotcha. are you using core async?

dehli00:04:28

I’ve seen that there is a fork for node, and was wondering if you had to use that

dehli00:04:16

with lumo, the regular core.async library doesn’t work but it’s sounding like it’s working for you all

andre.stylianos00:04:00

our code targets the browser, and for that the regular core.async works just fine

andre.stylianos00:04:36

we don’t use lumo or planck

andre.stylianos00:04:09

just the standard compiler

dehli00:04:29

Gotcha. Well if this works well for us, we’ll just be going that route too 🙂 Thanks again for your help! Lots of really good resources there

andre.stylianos00:04:08

glad to help ✌️

richiardiandrea01:04:40

I am debugging a problem with dependencies and I want to be sure of a newbie question, with :simple, are all the node_modules dependencies bundled in the produced file? Meaning, am I required to deploy only that file with no node_modules?

richiardiandrea01:04:49

ok no, I am always going to need node_modules

akiroz03:04:34

Currently on the verge of despair trying to use :npm-deps, has anyone seen this error or know how to get the compiler to print more info on what it's doing behind the scenes? Setting the :verbose true compiler option didn't help... 😞

throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'path', 'string');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:1091:7)
    at Deps.<anonymous> ([eval]:199:40)
    at Deps.emit (events.js:185:15)
    at endReadableNT (node_modules/readable-stream/lib/_stream_readable.js:1010:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)
I don't even know where to begin with this little info to work on....

richiardiandrea03:04:06

@akiroz how many :npm-deps do you have? Can you isolate the one that breaks?

akiroz03:04:34

Right, let me give that a try~ Reminds me of the old days of debugging bare-metal code bind by commenting stuff out lol

justinlee03:04:52

@akiroz this probably isn’t what you want to hear, but i gave up ages ago trying to get that feature to work, because I was having just the kind of problems you are having. I’d really think about other techniques to include npm libraries. The feature is pretty fragile.

akiroz03:04:10

@lee.justin.m yeah, I'd probably have given up too if this was a serious project... but I want to get this working for my personal learning projects

justinlee04:04:27

oh okay that’s different. i just didn’t want you to get stuck if you just wanted to get it workin

akiroz04:04:37

@richiardiandrea Found the culprit to be grommet on my end but this guy has a massive dependency tree. Time to break out the ol' bisection method 😶

richiardiandrea04:04:10

@akiroz that's good to know what breaks, tomorrow I will try it out as well

richiardiandrea04:04:15

@akiroz some time ago I saved this, might be useful:

richiardiandrea04:04:26

Prints out the data structure used to feed npm deps to the GCC, maybe you can paste it here at some point with grommet and folks can double check if that's ok

👍 4
akiroz04:04:49

@richiardiandrea the modules in npm-deps.edn shows every entry with :module-type :es6, is that normal?

richiardiandrea04:04:19

@akiroz yes that is normal as of last Cljs version. The type will be filled after GCC finishes processing

akiroz05:04:13

@richiardiandrea I've created a minimal project with grommet as an npm-dep here: https://github.com/akiroz/npm-deps-test

borkdude11:04:42

I get a java.io.NotSerializableException: clojure.spec.alpha$regex_spec_impl$reify__2436 when I make a ns mistake. Is this a clojure.spec, cljs or boot-cljs issue? :thinking_face:

pesterhazy11:04:41

Sounds like it’s boot related

pesterhazy11:04:44

As boot seralizes exceptions to send from pod to the main container AIUI

richiardiandrea17:04:16

@akiroz I am having a go with cljs.main and your project compiles fine

richiardiandrea17:04:44

actually no, there is an error in

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: module not found: "./locale-data/complete.js" from file /home/arichiardi/git/npm-deps-test/node_modules/intl/index.js

richiardiandrea17:04:15

will send a PR over

john20:04:31

Looks like I'm going to be putting together a multi-module project (which may get open sourced in the future). Are there any good, recent examples of multi-module projects out there to explore?

athomasoriginal19:04:45

By "multi module" do you mean a mono-repo? I would be very interested int the progress made here as I am working on seeing how a mono-repo would work using clj

john19:04:42

Specifically, I'm talking about code splitting with goog closure's module-based code-split mechanism

john19:04:08

But I'm using the clj/cljs.main stack in a monorepo like way. It definitely kicks ass.

john19:04:47

juxt has a project called edge that has some good architecture for clj usage too

athomasoriginal19:04:32

I have been digging through edge. The next thing they need is an example of another repo to flesh out how multiple projects would look

athomasoriginal19:04:47

Nice work on the demo repo though!

john19:04:47

yeah, once the bugs are ironed out, it should be pretty useful. I'm going to be setting up a fairly sizable project. Trying to model it off of google's new MDC project, which uses goog-closure module code splitting functionality.

athomasoriginal19:04:14

Do you have a link to this project?

john19:04:27

it's basically MDL part 2

athomasoriginal19:04:14

Nice. Are you using the project as a proof of concept or to actually use in your own projects?

john19:04:53

Proof of concept. I work at Yetanalytics and we build re-mdl which is a reframe thing for mdl. That fact that MDC is closure-fied is sweet and we'll probably come out with a re-mdc as well, which wraps MDC. This project is more related to analytics, but I want to make it equally modular as MDC

akiroz20:04:58

@richiardiandrea Thanks for the help! 🙂

steveb8n23:04:50

I want to use a number of react libs in my app. each of them has a different version of react that they depend on. how are people dealing with this?

steveb8n23:04:24

I’ve tried using cljsjs but then I have to find the best guess at an explicit react dep that works for all

steveb8n23:04:34

I’m wondering if npm-deps might help because npm apparently download each lib using it’s own specific react dep but I’m not sure how Google Closure will handle this