This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-17
Channels
- # admin-announcements (3)
- # announcements (1)
- # aws (3)
- # beginners (41)
- # boot (109)
- # braid-chat (2)
- # braveandtrue (5)
- # cider (11)
- # cljs-dev (38)
- # cljsjs (15)
- # cljsrn (5)
- # clojure (87)
- # clojure-berlin (16)
- # clojure-ireland (1)
- # clojure-japan (10)
- # clojure-madison (3)
- # clojure-nl (3)
- # clojure-poland (6)
- # clojure-russia (115)
- # clojure-sg (1)
- # clojurebridge (35)
- # clojured (8)
- # clojurescript (36)
- # core-async (24)
- # cursive (18)
- # datavis (1)
- # datomic (27)
- # dirac (22)
- # editors (1)
- # emacs (3)
- # events (19)
- # hoplon (149)
- # ldnclj (7)
- # lein-figwheel (1)
- # luminus (1)
- # off-topic (70)
- # om (196)
- # onyx (63)
- # parinfer (155)
- # proton (36)
- # re-frame (69)
- # reagent (2)
- # ring (2)
- # ring-swagger (1)
- # slack-help (4)
- # spacemacs (9)
- # testing (11)
all by boot tasks now have some form of logging
2016-02-17 12:03:47.005:INFO::main: Logging initialized @5097ms
@jethroksy: I think that is from some task utilizing the org.slf4j/slf4j lib
I get those lines when I use monger for example
should be able to disable it with [org.slf4j/slf4j-nop "1.7.13" :scope "test"]
i dont know if that will work tho
does anybody use boot-midje here? I have no luck doing so. Hereโs my build.boot: https://gist.github.com/be9/5a41d66d845385ba59b3
boot ci
flunks with:
Starting pod...
Running tests...
clojure.lang.ExceptionInfo: java.lang.Exception: No namespace: tms.t-user-profile found
data: {:file
"/var/folders/8c/ks3t17tx7x77ph5tv7r8ckf00000gn/T/boot.user1247824243219449554.clj",
:line 31}
java.util.concurrent.ExecutionException: java.lang.Exception: No namespace: tms.t-user-profile found
java.lang.Exception: No namespace: tms.t-user-profile found
clojure.core/the-ns/invokeStatic core.clj: 4032
clojure.test/test-ns/invokeStatic test.clj: 742
clojure.test/test-ns test.clj: 742
clojure.core/map/fn core.clj: 2646
...
clojure.core/next/invokeStatic core.clj: 64
clojure.core/reduce1/invokeStatic core.clj: 925
clojure.core/reduce1/invokeStatic core.clj: 915
clojure.core/merge-with/invokeStatic core.clj: 2950
clojure.core/merge-with core.clj: 2942
...
clojure.core/apply/invokeStatic core.clj: 648
clojure.test/run-tests/invokeStatic test.clj: 767
clojure.test/run-tests test.clj: 767
What could it be? Of course, tests work fine in dev
with (use 'midje.repl)
and (autotest)
@be9 could you do boot -vvv ci
and check if the file tms.t-user-profile
is in the fileset
I'm thinking it's a test-paths
, source-paths
thing, but I don't use boot-midje so I don't know for sure
@jethroksy: just tried to run boot -vvv ci
on another box, getting
clojure.lang.ExceptionInfo: java.lang.AssertionError: Assert failed: The :source-paths, :resource-paths, and :asset-paths must not overlap.
there's also registering test/clj [:create :modify :delete]
line being printed, so it seems that tests are picked up
@be9: could you inject (clojure.pprint/pprint (get-env))
after your set-env!
to see if it indeed the case that there is overlap?
@jethroksy: it seems there's none:
:source-paths #{"test/clj" "src/clj"},
:resource-paths #{"html" "sql"},
:asset-paths #{},
now to another problem. I use boot-cljs, I have <script src="main.js"></script>
in the index.html. Now the page path is "/this/deep" and main.js reference doesn't work (as it basically refers to /this/main.js
). I tried to make it <script src="/main.js"></script>
, but it still doesn't work because main.js has something like document.write('<script src="main.out/goog/base.js"></script>')
inside, and that's again a relative path
I handle different subpaths in the app by rendering the same exact index.html and figuring out routing on the client-side
currently it's pretty minimal
{:require [tms.core]
:init-fns [tms.core/main]
:compiler-options {}}
ok right, so if you make a file src/cljs/this/deep/main.cljs.edn
that would work, assuming that index.html is in say html/this/deep/index.html
ok, you don't get it. I wanted to mimic Rails URLs which contain user ids in them. Like /users/123/profile, etc. It all works on client side with HTML5 history (I use pushy library). But to make F5 key work on any page, I have to serve index.html everywhere.
So any path is a possible entrypoint to my app. It has worked well so far when I had only subpaths with level 1
well, I might just change everything to level 1 subpaths and use query params instead of ids in the path ..
but it's strange that you can't just force cljs compiler into generating /main.out/.... paths
cosmetic path tweaking always causes problems, imo paths need to be form-follows-function
within that model you don't need to know how source maps need to be configured, for example
my approach with referring /main.js would still work in production, where /main.js is just a js
and the html file itself and the .cljs.edn file should be generated at the framework level
Morning folks. I'm happy to say that boot-gae (boot tasks for Google App Engine development with Clojure) seems to have reached the point of usability, at least for the simple app I'm using to develop it. I'm going to wait a few days before officially announcing it, but would love to get some feedback from boot experts in the meantime. You can find it at https://github.com/migae/boot-gae. The sample app is at https://github.com/migae/gae-hello-boot.
I'm sure my use of boot is far from optimal - I welcome any advice on how to do things better.
@mobileink: congratulations! ๐พ
At least the devserver. The SDK contains everything you need to run the devserver locally; you only need a gae account if you want to deploy to the web.
@mobileink: that looks great! i'l definitely try it out. the documentation looks really good as well, congrats
Great, let me know how it goes. Tried to eliminate dependencies on my local setup but you never know.
I've been wanting something like this for years - appengine-magic/leiningen, gradle-appengine-plugin/clojuresque - way too complicated and inflexible. With boot the user is totally in control! Yay.
anyone have a pointer to a project with a good breadth of datomic boot tasks? thinking dev tasks here, like transact-schema, db tests, etc.
we found a way to write bookmarklets in clojurescript, if anyone's interested in doing such a crazy thing: https://github.com/adzerk-oss/boot-bookmarklet
cool!
shifty sift - I want to move file dcells.js, which is getting placed in the top-level directory of the zip file to the resources directory in the jar file. My sift task doesn't seem to do anything: (deftask dev "Build project for development." [] (comp (cljs :optimizations :simple) (sift :to-resource #{#"^dcells.js$"}) (build-jar) (target)))
I played a bit yesterday with this, have you tried to show -f
after you sift
?
where exactly is dcells.js
? if it is not in :source-paths
or :resource-paths
or :asset
you have to add it manually
Personally I do like the following @laforge49:
(deftask version-file
"A task that includes the version.properties file in the fileset."
[]
(boot.util/info "Add version.properties...\n")
(with-pre-wrap [fileset]
(-> fileset
(add-resource (java.io.File. ".") :include #{#"^version\.properties$"})
commit!)))
@richiardiandrea: dcells.js is the output of the cljs task. It is a js script for a web-worker.
ah it's the regex, because I think boot passes the path
you cannot start with ^
right ^
:to-resource
doesn't have anything to do wiht the directory it will be in in the jar file
so basically dcelss.js
is already a resource when it comes to sift
right?
I mean already an output
, better
ah ok, I completely misunderstood the intent there ๐