This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-09
Channels
- # admin-announcements (1)
- # boot (225)
- # braid-chat (1)
- # cider (25)
- # cljs-dev (35)
- # cljsrn (1)
- # clojars (6)
- # clojure (81)
- # clojure-berlin (1)
- # clojure-dev (21)
- # clojure-france (2)
- # clojure-japan (6)
- # clojure-poland (1)
- # clojure-russia (10)
- # clojure-uk (3)
- # clojurescript (121)
- # code-reviews (1)
- # core-async (4)
- # core-logic (2)
- # cursive (15)
- # datomic (8)
- # hoplon (4)
- # jaunt (112)
- # jobs-discuss (35)
- # om (41)
- # parinfer (8)
- # re-frame (3)
- # reagent (4)
- # ring (2)
- # untangled (38)
Does the following mean that I am chaining to many tasks?
clojure.lang.ExceptionInfo: java.lang.RuntimeException: Method code too large!, compiling:(NO_SOURCE_PATH:0:0)
data: {:file "/tmp/boot.user1305866973653506383.clj", :line 67}
clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Method code too large!, compiling:(NO_SOURCE_PATH:0:0)
java.lang.RuntimeException: Method code too large!
clojure.asm.MethodWriter.getSize MethodWriter.java: 1872
clojure.asm.ClassWriter.toByteArray ClassWriter.java: 775
...
clojure.core/eval core.clj: 3081
boot.pod/eval-in* pod.clj: 437
...
boot.pod/eval-in* pod.clj: 440
confetti.boot-confetti/eval2819/fn/fn/fn boot_confetti.clj: 155
replumb.boot-pack-source/eval2560/fn/fn/fn boot_pack_source.clj: 45
boot.task.built-in/fn/fn/fn/fn built_in.clj: 416
... repeating tasks over and over
Hey I am trying to get a bare bones boot build working so I can figure out how it works but I am struggling. I am trying to make a task that will compile my cljs files, automatically reload them, and then start a cljs repl but I can’t seem to get it to happen. I have put together a demo repo here: https://github.com/adam-r-kowalski/demo When I run my dev task it seems as if no javascript files are ever made but it goes through and it says compiling js/main.js in the terminal.
however i think the problem you're seeing in this specific case is the order of the tasks in your pipeline
the reload
and cljs-repl
tasks actually emit clojurescript that needs to be compiled by the cljs
task
interesting, when I run it with the show task it seems like a bunch of things are being created, and I even get notified that the build succeeded, yet I still can’t actually use the js files
here is the output of boot show http://pastebin.com/gpwkr3w0
well the thing that isn't working is actually using the compiled js index.html. It seems like nothing actually gets served js wise
I can serve the index hiccup page, but it says that there isnt any js/main.js
im not using the http serve task, I just wrote a really basic aleph server
its in src/clj/demo/server.clj
well I wanted to have two repls, one for the client and one for the server
so rather then having the dev task start the server, I first ran a boot repl and just called (server/start) which would fire up the server and show my index.html
then i started the boot task and wanted to get a cljs repl with that
yeah I think what i was doing was running boot dev boot repl -> (server/start) boot repl -> (start-repl)
that way I was thinking that I would have the dev task which takes care of reloading, compiling, etc, and I would have one repl for the client, and another for the server
but it seems like the server has no way of actually getting the generated files from boot dev
@adamkowalski: ok i cloned the repo
and it loaded the js/main.js?
i think all it should be doing is log that the application started for now
any luck?
yeah I wanted to do that on purpose
that way I can manage all my routing clientside
hmm, so is there an example of like a barebones setup that shows how to get a backend, frontend, and boot working together?
just launch a server like jetty/http-kit/whatever, serve an index html and the javascript and get all the reloading?
thanks looks interesting
haha, do you have any recommendations for an alternative
im not opinionated about my stack
but like we were having a lot of problems with compojure automatically doing things that would cause problems
oh my resource path is not setup correctly?
ok thanks i’ll try that
@adamkowalski: let me know if that doesn't work i'll investigate further
oh that looks cool
our app is actually running in a proxy, with some requests being routed to a legacy backend, and some being processed locally
Compojure was one of the early recommendations, and I think people encounter it a lot in tutorials/blogs/etc. Bidi feels more Clojure-y. Data all the way down. Just routing.
yeah we have a lot of stats, logging and other things that we need to do in the proxy to process the responses
so things that make the assumption that they can return a response directly to the client won't work
ok this is really weird… i have [ring “1.4.0”] in my dependencies in my set-env! but I cant access the ring.middleware namespace
all that is available is ring.util lol
@adamkowalski: boot show -d
and boot show -p
are your friends there
oh and @dominicm: how is bidi on cljs? have you made it work with the html5 history api?
@micha: yeah its got it in boot show -d
oh wow boot show -p is awesome
@richiardiandrea: did the send!
stuff work out for you?
@adamkowalski: 90% of bidi is: take string and routes, resolve value in route structure. And also take routes and value, and return string.
@martinklepsch: I was trying than I noticed a problem on my side, I need to fix it and try again
I'm not sure if the html5 history api is implemented by bidi itself, but it might be, and I've just not used it
so you do hash based routing?
@micha: whats the boot equivalent of lein clean -> lein deps
@adamkowalski: there is no "clean" task!
alright i gotta head out but thanks for all the help!
one thing that would be great is to be able to change the routes as they appear in the URI without changing the names of the routes (for the bi-directional rendering)
@martinklepsch: I confirm that send!
solves the problem, opening a PR as we speak
@micha are you creating the array?
ah sorry
you just need the type hint
well yeah there is a weird way, let me find it
it actually follows the Java notation, I have it somewhere (when I was contributing to Counterclockwise I needed it)
maybe this: http://asymmetrical-view.com/2009/07/02/clojure-primitive-arrays.html
then there is a reader macro
so I think I found an old post where it is discussed, dunno if it has been improved: https://groups.google.com/forum/#!topic/clojure/TFLUw8GSAbY
@richiardiandrea: i dont' really understand the issue with boot.main/-main and the reloading warnings
yeah but from what I understood this line https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/main.clj#L200
loads the script again
probably not in an isolated pod
i might be wrong, maybe I did not follow the threading properly, but
so maybe I am using runBoot in the wrong way?
https://github.com/arichiardi/boot/blob/parallel-boot/boot/core/src/boot/parallel.clj#L60
this was the original runboot
https://github.com/boot-clj/boot/blob/master/boot/base/src/main/java/boot/App.java#L389
let me check
https://github.com/arichiardi/boot/blob/parallel-boot/boot/core/src/boot/parallel.clj#L54
so there is maybe something else going on
runboots are comp-ed https://github.com/arichiardi/boot/blob/parallel-boot/boot/core/src/boot/parallel.clj#L144
creating a new middleware every time
now I am worried that I have done something horrible 😄 😱
no no, no watch
batching is here: https://github.com/arichiardi/boot/blob/parallel-boot/boot/core/src/boot/parallel.clj#L190
forcing the calls, but this was introduced later
it was generating warnings earlier
i don't see any changes to boot.App, so i don't think any regressions were introduced with this PR
yes I have not touched that, and runboot
is your original task as well
indeed
yes I was checking the clojure source
i don't think so, because i think require
ends up being load-file
at the end, and require
seems to work okay
and how would it "escape" a pod for instance, it would need to modify the classpath basically right?
it is static which is already scary 😄
ok I am not going to paste anymore source I swear 😉
I see LOAD-FILE is interned but not declared anywhere...
Compiler/loadFile
yeah, probably the former
DDOS for boot
@micha but you see load
calls RT.makeClassLoader()
line 7200
so it is escaping the pod right?
yes probably better
then @micha my patch should not be changed right? do you want me to open an issue with this to keep track?
yeah...that's why I was thinking it requires you assistance and maybe some hammock time 😉
I would like to keep them separate, I already kept only the most "significant" but it depends on you too of course
yeah I would merge like this (do I have access to merge myself?)
it is a pity that all these warnings are going to show up
mmm...nope...in any case I have to fly in 4 mins..:D
and I still think that in case of parallel execution we should not reload the script, so we should not pass by that part of -main
...
but at least we found the culprit