This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@juhoteperi: oh man, i totally didn't see that
we should have involved the expert here
but then again, we started out with looking into hoplon first...
Any idea why is this happening?
Im in the https://github.com/exicon/hoplon-multipage-example repo
and trying [adzerk/boot-cljs "1.0-SNAPSHOT"]
onetom@retinatom ~/e/hoplon-multipage-example> boot -u
Retrieving boot-2.2.0.jar from
#
#Sun Aug 09 13:59:55 HKT 2015
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.2.0
#App version: 2.2.0
WARNING: update already refers to: #'clojure.core/update in namespace: clj-http.client, being replaced by: #'clj-http.client/update
onetom@retinatom ~/e/hoplon-multipage-example>
If I got a directory which doesn't have a build boot, I still get the warning, but it downloads more files:
onetom@retinatom ~/exicon> boot -u
#
#Sun Aug 09 14:07:19 HKT 2015
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.2.0
#App version: 2.2.0
Retrieving worker-2.2.0.jar from
Retrieving tools.namespace-0.2.11.jar from
Retrieving aether-2.2.0.jar from
WARNING: update already refers to: #'clojure.core/update in namespace: clj-http.client, being replaced by: #'clj-http.client/update
@juhoteperi, im trying the examples from the boot-cljs/next/README:
onetom@retinatom /t/x> mkdir src
onetom@retinatom /t/x> echo -e '(ns foop)\n(.log js/console "hello world")' > src/foop.cljs
onetom@retinatom /t/x> boot -s src -d adzerk/boot-cljs cljs # which is understandable
org.sonatype.aether.resolution.DependencyResolutionException: Failed to collect dependencies for [#object[org.sonatype.aether.graph.Dependency 0x6b57696f "adzerk:boot-cljs:jar:RELEASE (compile)"]]
...
onetom@retinatom /t/x> boot -s src -d adzerk/boot-cljs:1.0-SNAPSHOT cljs
ERROR: No ClojureScript dependency.
Writing main.cljs.edn...
clojure.lang.ExceptionInfo: java.lang.NullPointerException
i was installing the boot-cljs next branch using boot pom jar install
maybe it's not the correct way to do so?
@onetom: You'll need to add clojurescript dependency to the project (1.7.28)
running it now:
onetom@retinatom /t/x> boot -s src -d adzerk/boot-cljs:1.0-SNAPSHOT -d org.clojure/clojurescript:1.7.48 cljs
Retrieving google-closure-library-third-party-0.0-20150805-acd8b553.jar from
Retrieving closure-compiler-externs-v20150729.jar from
Retrieving clojurescript-1.7.48.jar from
Retrieving closure-compiler-v20150729.jar from
Retrieving google-closure-library-0.0-20150805-acd8b553.jar from
Writing main.cljs.edn...
clojure.lang.ExceptionInfo: java.lang.NullPointerException
data: {:file
"/var/folders/9d/9j3pmgps4y54_dj8bwyngks40000gn/T/boot.user2769719586904406429.clj",
:line 15}
java.util.concurrent.ExecutionException: java.lang.NullPointerException
java.lang.NullPointerException:
io.clj: 404
io.clj: 416
io.clj: 418
...
adzerk.boot-cljs.middleware/main middleware.clj: 44
adzerk.boot-cljs/eval363/fn/fn/fn boot_cljs.clj: 107
adzerk.boot-cljs/eval335/fn/fn/fn boot_cljs.clj: 61
boot.core/run-tasks core.clj: 695
boot.core/boot/fn core.clj: 705
clojure.core/binding-conveyor-fn/fn core.clj: 1916
...
Not sure yet
im getting an error still:
onetom@retinatom /t/x> boot -s src -d adzerk/boot-cljs:1.0-SNAPSHOT -d org.clojure/clojurescript:1.7.48 cljs
Writing main.cljs.edn...
clojure.lang.ExceptionInfo: java.lang.NullPointerException
data: {:file
"/var/folders/9d/9j3pmgps4y54_dj8bwyngks40000gn/T/boot.user2769719586904406429.clj",
:line 15}
java.util.concurrent.ExecutionException: java.lang.NullPointerException
java.lang.NullPointerException:
io.clj: 404
io.clj: 416
io.clj: 418
...
adzerk.boot-cljs.middleware/main middleware.clj: 44
adzerk.boot-cljs/eval363/fn/fn/fn boot_cljs.clj: 107
adzerk.boot-cljs/eval335/fn/fn/fn boot_cljs.clj: 61
boot.core/run-tasks core.clj: 695
boot.core/boot/fn core.clj: 705
clojure.core/binding-conveyor-fn/fn core.clj: 1916
...
Looks like you don't have main.cljs.edn created, could be something broken in that case
I think I see the problem
The problem is in the implementation
Oh, I had a old Boot binary. Doesn't -u take care of updating the binary?
thats the whole point of the separation between the libs and the bin, so they can evolve independently
@onetom: Pushed fix to next branch
since updating the binary is a lot trickier (from file system permissions point of view)
I had still binary from rc1 😄
so, is this the right way to install the lib:
onetom@retinatom ~/r/boot-cljs> time boot pom jar install
Should be okay, boot build-jar
is the proper way but it does exactly same
would u mind deploying this snapshot version to clojars, just for the sake of convenience?
Ah, bootlaces doen't like that the branch is not master
the multipage repo compiled, but i got
WARNING: Multiple .cljs.edn files found, you should use `id` option to select one.Elapsed time: 9.478 sec
i suppose hoplon might need some adjustmentsYeah, you need one cljs task per different build
i usually call it based on the version number and an x in to suggest which part of the version can change on that branch
and let's use this new implementation which relies on the newer cljs compiler the master
Hmh, does boot-hoplon create separate cljs edn for each .cljs.hl file?
I think separate envs for multiple builds will make that significantly slower
Is there a way to check if a ns is already loaded?
Ohhhhh... Figwheel does just (load changed-clj-file)
for changed clj files which contain string (defmacro
That can't work when macro uses something from other ns which changes
Or maybe it's reloading all changed clj files
I got macro reloading working with boot-cljs: https://github.com/adzerk-oss/boot-cljs/compare/macro-reload
@micha: Why are we manually dependency ordering the files 😄
Closure could already take care of that
goog.net.jsloader.loadMany(uris, opt_options) Loads and evaluates the JavaScript files at the specified URIs, guaranteeing the order of script loads.
Or not...
But I'm thinking it should be possible as if cljs_deps.js is loaded first, Closure knows the dependency graph
@juhoteperi: if goog can do it that would be awesome
i mean metadata about the relationship between js files and the corresponding cljs namespaces, etc
it would make it much easier to make more powerful tooling later in the pipeline after cljs
@juhoteperi, @onetom i was thinking about the multiple build thing
perhaps in boot-cljs we loop over cljs.edn files, creating a pod and output-dir for each
@micha: Perhaps the parallel running could be done as a special task
clone input files and merge output files
or well no cloning really required
It keeps cljs task cleaner when there is separate tmp-dir for each build... though then user needs to sift the files to keep them from colliding... hmph
@juhoteperi: i was thinking unique output-dir for each cljs.edn file
separate pods also, I think
Btw. other thing, what do you think about boot-cljs versioning and clojurescript dependency? Even though boot-cljs is now using Cljs API it looks like for a while it will require the latest Cljs version because API changes and fixes
So boot-cljs should still follow cljs versioning
maybe
@martinklepsch: I'm thinking Weißbier is the best recovery drink after sports
😄 I’m not so much into Weißbier, sometimes really enjoy cold Radler (Sprite + Beer) on hot days & after sports
@martinklepsch: Yeah Radler is definitely nice on hot days
@juhoteperi: good work on the macro reloading
I don't like that it must depend on ns-tracker but it's simplest way I can see
new pod would be another but I fear it would be really slow
you can use a separate pod for ns tracker?
I don't think
(I probably don’t see the complete picture)
It contains lots of objects
they can't be persisted
and the compiler state is not even the part I'm worrying, just loading all namespaces would take some time
Also it would be hard to see when we have to refresh the pod
we don't want to do that when backend code is changed
btw, in boot-garden there has been an seemingly caused by :init
when the task is being used multiple times: https://github.com/martinklepsch/boot-garden/pull/8/files
If only clojure require
had :reload-recursively
option...
Is there such thing?
Oh, :reload-all
. I wonder what it does.
:reload-all implies :reload and also forces loading of all libs that the
identified libs directly or indirectly load via require or use
Looks like it would be what I want. Maybe there are some problems with it or why do ns-tracker and c.t.n.refresh exist?
@micha: I’m not sure, it seemed to cause the exception pasted here: https://github.com/martinklepsch/boot-garden/issues/7#issuecomment-128425504
https://github.com/clojure/tools.namespace#reloading-code-motivation but I don't think ns-tracker does take care of those problems either
@micha: you mean this? :init (fn [pod] (pod/require-in pod 'garden.core))
@juhoteperi: i may take a stab at the parallel compiler thing, is that cool?
@micha: Sure. What solution are you thinking?
i was thinking to first generate the output-dir path from the cljs.edn file path, like foo/bar.cljs.edn
--> :output-dir "foo/bar.out"
this would ensure that all compiled js have their own output dir in the proper relative path
Yeah sounds good. Check the new master and create new branch.
I'll probably revert Clojurescript dependency changes sometime
i did some TDD with onetom yesterday and i want to see how it goes, so i'll add tests too
Yeah tests are good
I did add some myself... but I think they didn't make it into the current version :d
@martinklepsch: Radler sounds amazing, i will try it
as a child i made and drank a lot of spezi
I did test :reload-all vs. ns-tracker
if the macro ns requires e.g. schema.core, compojure.core and other heavy namespaces, :reload-all takes about 3 seconds 😄 with ns-tracker the compilation takes only 0.2 seconds.
Are there any problems with ns-tracker?
Not that I can see
I guess it's fine. I just wanted to be sure if it's necessary.
You can put it in a pod if you want to right?
It's in pod yeah
@juhoteperi: should it be removed from build.boot then?
@martinklepsch: No, it's test scoped there. It's for testing the project.
It's not transitive.
testing the project as in real tests?
as in repl
Helps a lot that I can load the impl ns in repl. For autocompletion etc.
Excited to see what you come up with regarding tests, Must be awesome with boot/filesets
I'm not sure if it's that useful to test on that level
Source map configuration is not that bad I think
But yeah, shim configuration is quite complex
Nothing special there anymore
I'm thinking shim could be satisfactorily tested just unittests, fileset + params -> should set these options
or well, it shold also write the shim file. But no compilation required, I think.
we were using phantomjs with a dump.js script to debug that yesterday, it was pretty good
compiling cljs and loading the page is nice because it exercises all the things, like cljs_deps.js, goog/base.js, etc
@colin.yates: Have you tested https://github.com/adzerk-oss/boot-cljs/issues/75 ?