Fork me on GitHub
#shadow-cljs
<
2020-02-02
>
thheller09:02:47

@darwin FWIW I rewrote the entire parse-invoke/emit logic in the last few days to address cases where the compiler falls backs to generic ifn arity dispatch and there was no way to tell it not to

thheller09:02:05

so in master (def ^function my-create-element react/createElement) is possible and the compiler will always emit a direct function call in instead of the usual my_create_element.ifn1 ? ...

thheller09:02:18

that means it'll also skip binding the args in case they aren't all values

darwin13:02:27

@thheller thanks for this suggestion, it looks that this will be my preffered way how to directly refer to npm symbols I want to rename on my side, but since the code is in a library, I’m looking for some general solution which would work with vanilla cljs compiler as well, does it support ^function as well?

thheller16:02:00

it does not. I'm testing out the changes I'm making first and will eventually make a proper patch

jmckitrick13:02:37

I’m seeing an odd error when building in release mode:

jmckitrick13:02:39

[:app] Compiling ...
------ WARNING #1 - ----------------------------------------------------------- Resource: com/cognitect/transit.js:649:8 variable module is undeclared -------------------------------------------------------------------------------- ------ WARNING #2 - ----------------------------------------------------------- Resource: com/cognitect/transit/impl/writer.js:256:8 variable isObject is undeclared --------------------------------------------------------------------------------

jmckitrick13:02:51

I have transit in my dependencies, so….

jmckitrick13:02:13

I actually have luminus-transit. If I include [com.cognitect/transit-clj "0.8.319"] I get a warning that it was ignored, and still see the above error.

jmckitrick13:02:39

But I feel I’m making progress. This is why my app.js is missing. I think.

jmckitrick13:02:49

Thought I wouldn’t think a warning would result in no output at all.

jmckitrick13:02:14

It works fine in ‘watch’ mode, however.

thheller16:02:32

@jmckitrick thats not an error. those are warnings. safe to ignore those.

jmckitrick16:02:31

Hmm. I thought so too. But no app.js is being generated

dakra16:02:32

I try to make a minimal cljs only app but I always get The required namespace "carcalc.core" is not available. I think I must have some stupid mistake somewhere but can't find it.. Does anyone see what's wrong with this repo? https://github.com/dakra/carcalc

dpsutton17:02:12

:source-path should be :souce-paths

dakra18:02:34

ha. Thanks. I thought it's just a typo somewhere. Thank you very much