Fork me on GitHub
#cljs-dev
<
2018-03-01
>
mfikes00:03:39

It is unfortunate that -t nodejs and -re node have inconsistent values, owing to historical reasons.

dnolen00:03:30

-t node works

dnolen00:03:33

I fixed that

dnolen00:03:25

clarified the docstring

dnolen00:03:28

seems like this shaping is up nicely, if I can finish the jar caching stuff on Friday I think we’re probably set for a release next week

mfikes00:03:02

Just logged a cljs.main node compilation ticket. Hoping it is a simple oversight (or perhaps a misunderstanding on my part). https://dev.clojure.org/jira/browse/CLJS-2586

dnolen00:03:19

Hrm problem is more general, -t implies -re

dnolen00:03:38

But easy to fix

dnolen00:03:45

need to fix up cljs.main normalization

mfikes02:03:25

I wonder if there is some intrinsic startup overhead that we can or can't remove.

$ time clojure -m cljs.main -h
with deps.edn containing
{:deps {org.clojure/clojurescript {:mvn/version "1.10.64"}}}
Comes in at about 5.8 seconds for me. Hrm.

mfikes02:03:44

Ahh

$ time java -jar cljs.jar -h
is much better, coming in at about 1.8 s. Hmmmmm.

mfikes02:03:28

And if you do the same with Clojure:

$ time java -jar clojure.jar -h
you get 0.8 s. Hmmmmmmmmmm.

dnolen02:03:09

@mfikes :classifier “aot”

mfikes02:03:37

Yeah, are we perhaps compiling all of the analyzer and compiler each time right now?

mfikes02:03:20

we have :uberjar {:aot :all :main cljs.main}

dnolen02:03:24

Yes no way around that, that why we have an AOT artifact

mfikes02:03:37

Ahh, I see, the clojurescript-1.10.64.jar in .m2 only has cljs/compiler.cljc, while the cljs.jar has lots of AoT stuff like cljs/compiler$emitln.class. Cool. I wasn't aware of that.

mfikes02:03:36

Makes complete sense, though: You want the Maven-shipped JAR to be compatible with different versions of Clojure, I suppose.

mfikes03:03:37

I think I'll start putting deps.edn in the Environment field in JIRA—that seems like a natural place for it.

mfikes03:03:04

Let me know if this is confusing or easily missed.

dnolen05:03:02

To be clear when we build the jar we create two artifacts, one source only, the other AOTed. The Uberjar is a third manual artifact.

mfikes12:03:30

Ahh, thanks. I missed the point of that. So, with deps.edn containing

{:deps {org.clojure/clojurescript {:mvn/version "1.10.64" :classifier "aot"}}}
then
$ time clojure -m cljs.main -h
drops down to 2.1 s

dnolen12:03:13

Yeah can’t be made faster far as I can tell - ClojureScript is pretty big, start time perf would have to come from Clojure

dnolen12:03:45

With Alex Miller’s lazy loading experiment thing I think that shaves off another 500ms maybe a bit more?

dnolen12:03:52

If more people used the AOT artifact maybe it could become default

mfikes12:03:04

It also makes me wonder if Clojure could do something similar to what ClojureScript does with caching compiled artifacts (class files). Especially a global cache of artifacts compiled from JARs or git deps.

dnolen12:03:07

yeah Alex Miller has mentioned that

dnolen12:03:42

@mfikes I fixed the Node.js compile issue, was simpler than I thought, no need for another pass, what was there was already working

dnolen12:03:59

problem was copying :browser-repl blindly over from the browser repl-env options

dnolen12:03:17

:local/root is a definitely a nice way to test, and given the development process, the git sha deps.edn approach to reporting is interesting

mfikes13:03:44

I was considering writing the "`cljs.main` tour" post in terms of a small initial bit involving setting up a deps.edn pointing to a ClojureScript git dep. If we take that approach, and you end up wanting the post as a "Sneak Preview" kind-of thing, then it could be posted prior to the formal release and people can actually try the things shown in the post.

mfikes13:03:56

The only two disadvantages I can currently think of: No Windows, and no ability to :classifier "aot".

dnolen13:03:03

We could stick with uberjar for now

dnolen13:03:29

And switchover when windows is sorted

mfikes13:03:03

Yeah, in that case, we just need to sort out how users get that uberjar. If the post coincides with the release, that solves it. If it is a "Sneak Preview" that's another matter. No big deal—I'l focus on the meat of the post and not worry about how the user obtains cljs.jar

richiardiandrea15:03:10

I will try master as well..maybe my bug is related to the last changes

dnolen15:03:53

I think how they get won’t change, we’ll just upload as usual

mfikes16:03:49

@dnolen I think I found a few examples in the "tour" post that pretty much cover the bulk of cljs.main's capabilities and flags https://github.com/clojure/clojurescript-site/pull/178

dnolen17:03:19

@mfikes that’s awesome

mfikes17:03:20

I actually still need to test it all on Windows, to be sure it works there too.

dnolen17:03:54

ok, but yes, I like the flow and how much you cover

dnolen17:03:07

it’s really great to see just how much can be done easily on the command (i.e. running tests)

mfikes17:03:32

Yeah. I'll make another edit pass through it, testing, etc. Later we can figure out it if is a "Sneak Preview" kind of post, or one to come out with the release, and how to get the cljs.jar.

dnolen17:03:18

I think we should just post this same time as release announce

dnolen17:03:40

@mfikes since this is visual maybe this post should have screenshots?

mfikes18:03:41

@dnolen Yeah, I see that clojure-site has an assets/images directory that clojurescript-site doesn't yet have. I'll try adding something (following the example of https://github.com/clojure/clojure-site/tree/master/assets/images/content/news/2012-02-17)

mfikes18:03:51

I can see there being an image of the default HTML page (perhaps shrunk down to fit), and an image or two of the circles / canvas stuff in the browser app

richiardiandrea18:03:47

no bug not fixed yet

mfikes18:03:19

Yeah, images are gonna make that post look nicer

mfikes19:03:01

Much better 🙂

dpsutton19:03:17

very nice ^. I like it. I tried the examples in the clojurescript repo and the twitter one and at least one other one no longer work. It was offputting. Be nice to see some examples and patterns right away

richiardiandrea20:03:27

found the bug of CLJS-2582, sending over a patch soon

dnolen20:03:14

@mfikes re: CLJS-2588, what is the source map line?