This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-22
Channels
- # admin-announcements (25)
- # beginners (60)
- # boot (277)
- # cider (5)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (82)
- # clojure-art (15)
- # clojure-berlin (2)
- # clojure-boston (1)
- # clojure-italy (40)
- # clojure-russia (118)
- # clojurebridge (1)
- # clojurecup (1)
- # clojurescript (82)
- # component (3)
- # cursive (31)
- # datavis (9)
- # datomic (39)
- # editors (1)
- # editors-rus (9)
- # emacs (15)
- # hoplon (50)
- # ldnclj (2)
- # leiningen (4)
- # off-topic (9)
- # om (123)
- # re-frame (28)
- # reagent (7)
- # vim (1)
- # yada (3)
does anyone know of a codox writer to generate markdown suitable for including in a github repo?
i want to generate markdown api documentation for boot and have a precommit hook so the docs are always reflecting the specific commit
@micha: how do you feel about using boot-heredoc in the boot sources, then parsing doc meta as markdown?
complicates repl dev tho
@alandipert: how so?
oh right, i forgot about that
ok yes, i'm back onboard again
i'm doing the classloader walk thing
any reason not to start with ClassLoader.getSystemClassLoader()
as my parent?
so the gameplan is make a URLclassloader subclass and set system CL as its parent. then, load boot.jar into that
gotcha
oh right it takes URL in ctor
i'm gonna get scalac in the pod too i think
right
i bet we could be the best scala build tool lol
but yeah i'd need to be drunk
but yeah it wouldn't make sense, since the thing that makes scala tenable is IDE support
which our task would never have, probably
i guess we could emit pom.xml
Sounds like I should make frege-boot-task
then? (Given I already made frege-lein-plugin
)
@seancorfield: i'm sure it would be awesome
Today I moved all our code around at work. Tomorrow I’m off (celebrating wedding anniversary). Wednesday onward I’ll be migrating our build system from Ant/Lein to Boot (probably still with bits of Ant around it).
very nice!
i've used the ant api from clojure before, i forget what that was for but i think it worked
@micha: because of https://github.com/boot-clj/boot-bin/blob/master/src/Boot.java#L228 i don't think i need to do anything?
dude sweet
i got confused thinking that your jar would pollute the system classloader, and you'd have the same conflict again
hm tho wouldn't the spark container have polluted the system cl potentially?
yeah let's hope not
there's a layer of hadoop in there, hopefully spark doesn't go above it
any reason not to deploy boot-bin as jar?
err, on clojars i mean
then i could get it with sbt
i will set it up
i'm not sure how different it has to be, if at all
i'll install locally and start playing around, see if this approach actually works
so in App, the main method, i think it would be good if we split the setup and the system.exit call
in the embedded scenario i want at newPod only
actually i want newCore i suppose
doin it
So, boot-as-a-library? Interesting. Leiningen took a long time to go that way...
in this case, just for pads and getting deps
we have a dependency hell situation at work in a scala project - Spark API conflicts with jackson dep in AWS api
*pods
@micha: ^^ to not change boot-bin for now.. ultimately i think we want setup() to go in boot-bin
it wouldn't add code, just split setup and initialization
oh yeah, sorry, i confus
i don't actually even need boot-bin
success!
Welcome to Scala version 2.10.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66).
Type in expressions to have them evaluated.
Type :help for more information.
scala> System.setProperty("BOOT_VERSION", "2.5.3")
res0: String = null
scala> boot.App.setup(Array())
scala> import boot.App;
import boot.App
scala> val worker = App.newWorker().get()
worker: org.projectodd.shimdandy.ClojureRuntimeShim = org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl@f2d3af7
scala> val core = App.newCore().get()
core: org.projectodd.shimdandy.ClojureRuntimeShim = org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl@631790d7
def evalIn(pod: ClojureRuntimeShim, codeStr: String) = { pod.invoke("clojure.core/eval", pod.invoke("clojure.core/read-string", codeStr)) }
import org.projectodd.shimdandy.ClojureRuntimeShim
scala> evalIn: (pod: org.projectodd.shimdandy.ClojureRuntimeShim, codeStr: String)Object
scala> evalIn(core, "(println (+ 1 2))")
3
res4: Object = null
i was surprised that eval/read-string combo worked
i suppose it does because i feed the clj objects back to the classloader that knows about them
but my evalIn function there
it nests pod.invoke
getting dependencies works!
scala> evalIn(core, "(boot.core/set-env! :dependencies '[[clj-time \"RELEASE\"]])")
res6: Object = null
scala> evalIn(core, "(use 'clj-time.core)")
res7: Object = null
scala> evalIn(core, "(str (now))")
res8: Object = 2015-12-22T04:06:25.523Z
@micha: have you seen Pop without matching push
before? coming from shimdandy
i think this was the place https://github.com/boot-clj/boot/blob/embedded/boot/core/src/boot/core.clj#L798
so i should put my invoke
call in a future you think?
man, i think they might have diddled the system CL
although - that might only be locally, or inside intellij
in the sky, maybe it could work
i think we may have to shell out to another jvm
i would call the embeddable boot experiment a success though
@martinklepsch @juhoteperi After re-reading my message I was not clear : 10% gain in my case after cljs optimisation, but this doesn't translate to 10% after gzipping (though it was better) - will have to retest to be sure of the gains if any.
I cannot get boot to run. When I start it, it tries to download boot.2.0.0-rc13 but don’t find it.
I use OSX and isntalled it with homebrew
@danielgrosse: make sure home brew is up to date and if it is check that BOOT_VERSION isn't set
I also tried to download the boot.sh from the repository. But the same error. BOOT_VERSION isn’T set
@danielgrosse: do you have a boot.properties file?
where should it be?=
Ah i found it
Problem solved?
Yeah. I had a .boot folder in my home. Maybe from a former tryout. 😀
Is 2.5.2 just released? It download 2.4.2 at the first time. Now when I used it, the 2.5.2 was downloaded
And I get this
clojure.lang.ExceptionInfo: Unable to resolve symbol: Protocol in this context
data: {:file
"/var/folders/qj/rtsvn3wd7mq4nlj54fnjl3jr0000gr/T/boot.user3494953550947180493.clj",
:line 13}
java.lang.RuntimeException: Unable to resolve symbol: Protocol in this context
Regarding the version I think it is because the homebrew wrapper has not yet been updated to 2.5.2 (latest), but I think that the wrapper did not change since.
Okay. The error seems to come from my boot.file, is there a testing routine?
@martinklepsch: I try to create a cljsjs package. But the boot process always throws errors. Also on exisiting packages
$dropbox> boot package jar install
Downloading dropbox.js
Downloading dropbox.min.js
Sifting output files...
Sifting output files...
Writing deps.cljs
Writing project.jar...
Installing project.jar...
clojure.lang.ExceptionInfo: java.lang.NullPointerException: entry
data: {:file
"/var/folders/qj/rtsvn3wd7mq4nlj54fnjl3jr0000gr/T/boot.user651602337335621290.clj",
:line 19}
java.util.concurrent.ExecutionException: java.lang.NullPointerException: entry
java.lang.NullPointerException: entry
...
boot.pod/pom-xml pod.clj: 162
boot.aether/install aether.clj: 178
...
clojure.core/apply core.clj: 630
boot.pod/eval-fn-call pod.clj: 223
boot.pod/call-in* pod.clj: 230
...
boot.pod/call-in* pod.clj: 233
boot.task.built-in/fn/fn/fn/fn built_in.clj: 725
boot.task.built-in/fn/fn/fn/fn built_in.clj: 618
cljsjs.boot-cljsjs.packaging/eval285/fn/fn/fn packaging.clj: 110
boot.task.built-in/fn/fn/fn/fn built_in.clj: 402
boot.task.built-in/fn/fn/fn/fn built_in.clj: 402
cljsjs.boot-cljsjs.packaging/eval239/fn/G/fn packaging.clj: 86
cljsjs.boot-cljsjs.packaging/eval239/fn/G/fn packaging.clj: 86
boot.core/run-tasks core.clj: 791
boot.core/boot/fn core.clj: 801
clojure.core/binding-conveyor-fn/fn core.clj: 1916
$localforage> boot package jar install
clojure.lang.ExceptionInfo: Unable to resolve symbol: bootlaces! in this context
data: {:file
"/var/folders/qj/rtsvn3wd7mq4nlj54fnjl3jr0000gr/T/boot.user6806057931586254894.clj",
:line 13}
java.lang.RuntimeException: Unable to resolve symbol: bootlaces! in this context
...
boot.main/-main/fn main.clj: 192
boot.main/-main main.clj: 192
...
boot.App.runBoot App.java: 390
boot.App.main App.java: 467
...
boot.Loader.main Loader.java: 253
What am I doing wrong?
@danielgrosse: if it can't resolve bootlaces!
maybe you haven't require
d the namespace and referred in the symbols?
We'd need to see your build.boot
file.
Bootlaces is no longer used by cljsjs packages
How do I slurp a file in resources from within a pod (`pod/with-call-in`)? (slurp "resources/Uglify2/uglifyjs.self.js")
throws an exception
(pod/with-eval-in p
(require '[ :as io])
(slurp (io/resource "Uglify2/uglifyjs.self.js")))
As I said. These were existing packages. (Dropbox, localforage) Later I found that boot package pom jar install
got the desired effect. So maybe the documentation needs an update.
I'm reading http://clojurians-log.mantike.pro/boot/2015-08-23.html and I'm still confused by how to setup cljs properly
I understand that all the generated stuff is ending up in target, but how do I wrap-resource it?
the target is just where you spit out your final artifacts, like jar files or war files etc
Boot-cljs doesn't handle asset-path very well currently
I think I'm setting asset-path manually everywhere
so the serve plugin is doing some voodoo with the classpath and adding "/target"? Or is that just how the JVM works?
the purpose of the target is simply a place to dump the final state of the fileset just before boot exits
it's definitely than cljsbuild where you have to either change your dev/prod bootstrap code, or use :optimization :simple
@kanwei: Changing bootstrap code with Cljsbuild shouldn't be necessary either. ClojureScript has had the :main
option since January.
@kanwei: you can take a look at https://github.com/magomimmo/modern-cljs hope it could help in the migration. just take into account that at the moment it has been pinned to boot 2.4.2
release
I was looking at that yesterday... kind of why I started porting to boot in the first place. Thanks for the work!
am I right in thinking that https://github.com/boot-clj/boot/wiki/For-Cursive-Users
@magomimmo: the 2.5.2 Release should be mostly compatible with 2.4.2 except for some gpg/push related things. The target/ behavior is the same by default, new behavior has to be enabled explicitly.
ok. because of a motorbike accident I’ll stay at home few days….I’ll take care of this
@kanwei: the lein-generate task isn't really composable, most people just call it once or when they change things in build.boot
@magomimmo: oh, I hope you're ok! 😿
@martinklepsch: nothing so tuff. muscle tear...
@micha: I’m getting the following error when trying to to do a push-release
@magomimmo: get better soon
@flyboarder: ah yea
no os x
i have it installed as but i will install the new brew package
/usr/local/bin/gpg
yeah and they show up, seems the reinstall may have fixed it
brew did install a new package
yeah strange cuz my other projects are using gpg fine, hope they keep working 😂
have a question about boot task parameters
want a super permission type, basically {:parse identity, :validate identity}
(well, that wrapped in a set)
don’t see that in the type matrix, is it a terrible idea to figure out getting it in anyway?
well, read-string
tries to read it
just want a string to be a string
then you can use the ^:!
meta on the argument to tell clifn
not to validate the type when called from build.boot or repl
^:!
sounds fine
the use case is that regex / symbol / string punning we talked about the other night
for namespace filters
where does the hint go? on the binding name or the type “hint”?
works like a charm
see you can’t nest it though
tried {^:! str}
first
sure, will update the wiki now
yip, the winner