Fork me on GitHub
#cljs-dev
<
2018-02-09
>
richiardiandrea04:02:06

While compiling some code today using lumo against master Clojurescript today I have run against the following:

this.mseq.cljs$core$ISeq$_first$arity$1(...).cljs$core$IMapEntry$_key$arity$1 is not a function
cljs.core.KeySeq.cljs$core$ISeq$_first$arity$1 (NO_SOURCE_FILE <embedded>:1640:411)
Object.cljs.core.first (NO_SOURCE_FILE <embedded>:507:165)
Function.cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:660:115)
cljs.core.KeySeq.cljs$core$IReduce$_reduce$arity$3 (NO_SOURCE_FILE <embedded>:1640:248)
Function.cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:667:181)
(Object.lumo$cljs-deps$dependency-order)
(lumo/closure:4537:270)
(lumo/closure:4544:3)
(lumo/closure:4550:3)
Function.lumo.closure.build.cljs$core$IFn$_invoke$arity$3 (lumo/closure:4556:3)
Not sure what is going on but today I have to unplug a bit, will explore more tomorrow

dnolen10:02:09

@juhoteperi awesome! Will get to those today

dnolen10:02:42

@richiardiandrea I thought Mike Fikes addressed that, but maybe there’s a missing case

tmulvaney11:02:58

@richiardiandrea my guess it's the PHM with nil entry. I'm double checking now

tmulvaney11:02:00

I can see now that is the case. I'll open up a ticket with a patch. I also did not update the PHM iterator to support that nil case either 😞

richiardiandrea16:02:30

Awesome cool folks i.did not know what that meant but I thought I should report it 😸 @tmulvaney you can send the patch over if you want me to try the fix ;)

dnolen17:02:54

This main support stuff is actually pretty neato

dnolen17:02:16

getting it setup was a little bit fiddly but the fact that we have a generic way to point any REPL at build and run something is pretty cool

dnolen17:02:26

@juhoteperi 2375 needs a rebase on master

dnolen17:02:06

oh never mind, one sec

dnolen17:02:17

was just missing --keep-cr

richiardiandrea17:02:31

@dnolen by any REPL you mean also planck and lumo, wink wink nudge nudge 😄

dnolen17:02:34

@juhoteperi ok 2389 does appear to need a rebase

dnolen17:02:12

@richiardiandrea heh no, not bootstrapped stuff

dnolen17:02:34

but that’s not that challenging anyway

dnolen17:02:58

I mean this isn’t even really a problem there

dnolen17:02:06

not that this is going to extended for that case

richiardiandrea17:02:53

lumo always tries to follow anyways, so we'll adapt so that we can reuse the documentation 😄

dnolen17:02:30

but anyways being able to point at build and load up some abritrary script before running something, or eval some arbitrary expression before seems useful for testing

richiardiandrea17:02:58

I like where this is going

dnolen17:02:31

@juhoteperi I’m going to stop on applying the others until 2389 gets fixed up, if I don’t get to this today will definitely do it some point this weekend

dnolen17:02:46

I think this + global caching of JAR deps would be a very nice release

dnolen17:02:06

as usual there’s tons of other stuff too

richiardiandrea17:02:33

@dnolen if you have some lil' time for CLJS-2492 and CLJS-2493 let me know...i would love to support source maps cleanly in lumo

dnolen17:02:59

@richiardiandrea yes I’ll look at those, unlikely to cut a release this week or next anyway but soon after I hope

dnolen17:02:52

stuff like this works now

dnolen17:02:56

java -cp cljs.jar:src clojure.main -m cljs.repl.node -o out -e "(+ 3 4)" -m foo.core 1 2

dnolen17:02:09

ClojureScript Node.js REPL server listening on 53734
7
Analyzing file:/Users/davidnolen/development/clojure/main-cljs/src/foo/core.cljs
args: (1 2)
*command-line-args* (1 2)

dnolen18:02:47

we could probably supply our own main to clean this up I think?

richiardiandrea18:02:41

@dnolen if I understand correctly, in lumo we execute *main-cli-fn*...when it has been def-ed we run that:

(defn- ^:export run-main-cli-fn
  []
  (when (fn? *main-cli-fn*)
    (apply *main-cli-fn* *command-line-args*)))

anmonteiro18:02:28

@richiardiandrea this has nothing to do with Lumo. David is talking about Java main classes

anmonteiro18:02:33

not portable to Lumo either

richiardiandrea18:02:55

oh sorry, yeah I was afraid I did not get something, too many mains 😄

richiardiandrea19:02:23

@tmulvaney @dnolen CLJS-2496 seems to work fine here, I don't receive that error in lumo anymore