This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-06
Channels
- # beginners (20)
- # boot (221)
- # cider (16)
- # clojure (140)
- # clojure-berlin (2)
- # clojure-dev (2)
- # clojure-germany (2)
- # clojure-japan (4)
- # clojure-korea (44)
- # clojure-russia (2)
- # clojure-uk (6)
- # clojurescript (202)
- # core-async (7)
- # datomic (9)
- # editors (1)
- # euroclojure (3)
- # ldnclj (21)
- # liberator (4)
- # off-topic (4)
- # om (8)
- # reagent (17)
(cljs-repl)
Connection is null
Writing boot_cljs_repl.cljs...
#object[clojure.core$comp$fn__4495 0xea7623c "clojure.core$comp$fn__4495@ea7623c"]
Hi I have a hard time getting the cljs-repl to work 😞
I am using it with boot-reload could that have anything todo with it?
@mitchelkuijpers: I've got boot-cljs-repl working with boot-reload and am trying to squash remaining bugs. Can you post your boot.properties and build.boot files, here or on refheap?
@meow: if you feel inclined, a PR to tenzing with the updated repl stuff etc would be most welcome :)
@martinklepsch: I'd like to go from "0.1.10-SNAPSHOT" to "0.1.10" first.
I think the code needs some improvements and I want to make sure it's working for everyone.
:thumbsup:
Maybe the plan should be something like this. Make sure we've gotten the major bugs out so we can push a "0.1.10" version out the door to fix the problems everyone has been having. Then we migrate the dependency version checking out of boot-cljs-repl and boot-cljs and into boot itself. I believe @micha and @juhoteperi are on board with this. Then we can push out a "0.1.11" that's nice and solid.
Anyone have suggestions on the best way to develop a cljs library using boot? Specifically, I have a cljs app that I use boot to run that uses boot-cljs-reload, which works great. But now I moved some of my code into a shared library that I also manage using boot to do a build-jar and locally install. What I'm missing is the automatic recompile/reloading of my app when I change/reinstall the library. Suggestions?
Would be nice if I could maybe change my app dev classpath so that it picks up the library file right out of my local git repository.
Would be even nicer if watch picked up changes to the library file, just like it used to when it was part of my app.
@meow: checkout task should work for that
@juhoteperi: That would get me close, but I'd have to have that second boot process that was watching and rebuilding the jar file. Is there any way to avoid that?
I don't think so
And as the library boot process doesn'ẗ need to do cljs compile it should be quite fast
I even think this is better way, Leiningen checkouts work so that it adds the source paths of checkout lib to main project which causes loads of problems with configuration
It's just more steps that I have to take every time I work on this project because the library and app are being developed together.
What you describe as the Leiningen way was what I was thinking I might be able to do but, yeah, that might just create a different kind of headache for me.
I'm yet to test boot checkout so I don't know about the performance etc. but in theory I think it should work 😄
I'm looking at the source code https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/task/built_in.clj#L61
This task facilitates working on a project and its dependencies at the same
time, by extracting the dependency jar contents into the fileset. Transitive
dependencies will be added to the class path automatically.
You'll need at least two boot instances---one to build the dependency jar and
the other to build the project. For example:
$ boot watch pom -p foo/bar -v 1.2.3-SNAPSHOT jar install
to build the dependency jar, and
$ boot repl -s watch checkout -d foo/bar:1.2.3-SNAPSHOT cljs serve
to build the project with the checkout dependency [foo/bar \"1.2.3\"]."
pkobrien: the biggest difference between boot checkout and lein is that the boot one cleanly separates the checkout dep's build from your project build
@micha: Does the checkout task jar unpacking for each build? Or only when jar has changed?
I'm trying to understand how the task sees when the jar file has changed
Ah the .m2 dir where the jar is?
Yeah I don't see a problem with that. Boot process takes so much less memory than leiningen etc. that running multiple boots shouldn't be a problem.
okay, so on the library side, right now I've been doing a build which is a comp of (pom) (sift) (jar) (install)
Like, I was going to add a task to my build.boot file but I just figured it would be easier to just do boot poly build
if I want it to run one time and boot poly watch build
if I want it to sit there rebuilding as I work.
No need to change my file and the more I learn the built-in vocabulary the easier it gets (and I do mean easier).
And I still like driving multiple projects from my one libary repo with one build.boot file as it is making it so much easier to keep in my brain.
So my repo approach is somewhere in between one monolithic repo and a separate repo for each.
Now in my app build.boot I have this main task that I use:
(deftask dev []
(comp (serve)
(watch)
(speak)
(reload)
(cljs-repl)
(cljs :source-map true :optimizations :none)))
Not quite working for me with this:
(deftask dev []
(task-options!
checkout {:dependencies [[ion/cuss:"0.1.0-SNAPSHOT"]
[ion/poly:"0.1.0-SNAPSHOT"]]})
(comp (serve)
(watch)
(checkout)
(speak)
(reload)
(cljs-repl)
(cljs :source-map true :optimizations :none)))
without the colons in the dependencies I got this error:
clojure.lang.ExceptionInfo: No such namespace: ion
(task-options!
checkout {:dependencies '[[ion/cuss "0.1.0-SNAPSHOT"]
[ion/poly "0.1.0-SNAPSHOT"]]})
we should be accepting like
(set-env! :dependencies [[:ion/cuss "0.1.0-SNAPSHOT"] ...])
So now my task mostly works, but I did get this error:
Checking out poly-0.1.0-SNAPSHOT.jar...
Checking out cuss-0.1.0-SNAPSHOT.jar...
java.io.IOException: Couldn't delete C:\Users\Patrick\.boot\cache\tmp\Users\Patrick\code\decomplect\ing\informing\4f8\7o
2s6s\cuss-0.1.0-20150704.164132-1.jar
I think this is related to some problem I saw in one of the issues about a timing problem on windows.
@meow: are you on windows?
@martinklepsch: sadly, yes
So, changing my library file and saving it isn't triggering a reload in my app, because the watch process for building my library jar keeps erroring out
Are things mostly working though? :)
@martinklepsch: Mostly, yes.
What's poly? 😊
I don't think I'll be able to help really, basically just hanging out w/ my iPad on a couch :D
Here is the error I'm getting:
C:\Users\Patrick\code\decomplect\ion [master +0 ~2 -0]> boot poly watch build
Starting file watcher (CTRL-C to quit)...
Writing pom.xml and pom.properties...
Sifting output files...
Writing poly-0.1.0-SNAPSHOT.jar...
Installing poly-0.1.0-SNAPSHOT.jar...
Elapsed time: 0.695 sec
java.io.IOException: Couldn't delete C:\Users\Patrick\.boot\cache\tmp\Users\Patrick\code\decomplect\ion\66g\gg42n1\poly-
0.1.0-SNAPSHOT.jar
io.clj: 426
Then repl?
Tried with -vv
?
this is my boot file: https://github.com/decomplect/ion/blob/master/build.boot
pkobrien: i don't know if this will help you, but i think these problems are fixed in windows 10
In line 35 better use version
Not fixing anything but small typo could break things as they are
@martinklepsch: good catch - tyvm
@podviaznikov: Pegdown (and now Endophile) creates something like this:
(is (= [[:h1 [:a {:name "foo" :href "#foo"} "Foo"]]]
(md2h/to-hiccup (mp "# Foo" {:extensions {:anchorlinks true}}))))
I wonder if it would be more useful it the header text was not wrapped in anchor
@juhoteperi are you also seeing this problem? https://github.com/sirthias/pegdown/pull/164
@martinklepsch: I havent tried aside tag
@meow: could it be that you're missing the install task?
Or is build = build-jar from bootlaces?
@martinklepsch: Might be good if you pinged sirthias in twitter about that, I asked him today to make a new release because anchorlinks is broken in release but fixed in master
@juhoteperi: will do this
martinklepsch: Did you test pegdown directly or through endophile?
@juhoteperi: don't exactly remember tbh, probably through endophile
martinklepsch: Endophile is currently using historical version of pegdown. But I can reproduce the problem with latest version.
Also I had a hard time just figuring out how to install it into my local m2
sbt package && cp ....
@juhoteperi: yeah, I also tried master and whatnot
I think sbt only has build in command to install into local ivy repo
I found something that day, but don't remember now
Interestingly pegdown & parboiled don't really depend on anything where I think that error would come from
@martinklepsch: The problem is in endophile.
@martinklepsch: https://github.com/theJohnnyBrown/endophile/blob/master/src/endophile/core.clj#L97
jtidy doesn't know about those tags
I'm not quite sure even why it's used there
One comment test just broke when I removed tidy
https://github.com/tailrecursion/boot-hoplon/blob/master/src/tailrecursion/boot_hoplon/markdown.clj
In my library build.boot I'm setting :resource-paths #{"src/ion/poly"}
but when I run boot -vv poly build
I see that boot is poking around into directory branches that I don't expect it to:
C:\Users\Patrick\code\decomplect\ion [master +0 ~3 -0]> boot -vv poly build
←[1;36mregistering src [:create :modify]
←[m←[1;36mregistering src\ion [:create :modify]
←[m←[1;36mregistering src\ion\cuss [:create :modify]
←[m←[1;36mregistering src\ion\poly [:create :modify]
←[m←[1;36msending change event
←[mSyncing project dirs to temp dirs...
@meow: bootlaces adds src to paths
I don't know what boot means when it says it is registering
a directory, but why is it doing that for src
and src\ion
and src\ion\poly
yeah the workaround for you could be to just move that dir to "source" or something other than "src"
And there is no way to configure it since it's just hardcoded in there:
(defn bootlaces!
[version & {:keys [dev-dependencies]}]
(merge-env! :resource-paths #{"src"})
I mean bootlaces is useful and 99% generic, or so it seems to me - it certainly made it easy to push to clojars
I can understand it not being part of boot.core, but what it provides is surely fundamental for anyone writing a library
or writing boot tasks for general consumption, which is why it is used so much in the wild
Or maybe some clojars tasks could be introduced in boot core, then bootlaces wouldn't so necessary
deraen: yeah i think the functions for getting creds interactively and whatnot might be useful in boot core
Hah, I wrote my own html tidier for endophile tests 😄
9 lines with postwalk
@martinklepsch: https://github.com/theJohnnyBrown/endophile/pull/8/files this fixes figure etc. tags
Not to bash figwheel, but I must say I really don't like the idea of the ^:figwheel-always meta data.
I just see that metadata in a lot of cljs apps and every time I think "But what about me? I use Boot. Don't you like me?" 😉
I mention figwheel because I just read the Quick Start guide to see if boot was missing any figwheel features and nothing really jumped out at me.
It looks like figwheel is more capable from one jvm where in boot we need two: one to serve the app and another for the browser repl.
Is there anything boot/boot-cljs/boot-cljs-repl is missing from what is possible with the current state of cljs tooling?
I am still using figwheel because of the HUD, I find it useful.
It has a little bit more information (warning and line number) than the boot voice, and leaves out the ridiculous stack traces of the console.
@timothypratley: good point, yes.
Just to be clear, I think figwheel is great. I'm just trying to make sure that boot is on an even playing field. I have no personal desire to work on a HUD. I mostly just want to make sure boot isn't broken any more when it comes to cljs, since the situation was in a bit of flux for a while there due to all the upstream changes.
Would be cool if non-tools specific parts (client) of figwheel could be separated and used with boot also
I remember bhauman looking into that (or in general, how easy it would be to create boot-figwheel)
cool FWIW boot has some major advantages I am really excited about it and am using it in some cljs projects and find it is better. Just mentioning the HUD because yeah I’m hoping bhauman or someone will port it I think I saw a tweet or something that he was working on it while at Clojure West so haven’t looked further.
@micha: The figwheel client has to HUD parts etc.
Nope, just a absolute positioned div or something like that
Sure we could implement everything ourselves
I doubt notifications can show complete stacktraces
But notifications + some DOM to show stacktracers would be cool
Does boot-reload have logic to skip reloads if build had errors? If cljs task has errors the next tasks won't be called?
although reload task could of course catch the exception when it calls the next handler
Right
@juhoteperi: thanks dir looking into the pegdown stuff, makes perfect sense now that I see it. Had a hard time tracing down where that warning comes from :/
@meow: repl needs to be before compilation
It adds things to the compiled is
@martinklepsch: ok, thanks
I'm consistently getting errors using checkout: java.io.IOException: Couldn't delete
one or more jar files
pkobrien: i think that's a windows issue where it doesn't let boot delete files when there are open input streams
a lot of java code relies on the finalization before garbage collection to close streams
does figwheel do an implicit/behind-the-scenes (require '[app.namespace])
thus allowing users of its repl to simply do in-ns 'app.namespace
?
Check this out, though. Figwheel does do some work behind the scenes in its repl:
This REPL is a little different than other REPLs in that it has live compile information from the build process. This effectively means that you will not have to call (require or (load-namesapce unless it is a namespace that isn't in your loaded application's required dependencies. In many cases you can just (in-ns 'my.namespace) and everything you need to access will be there already.