This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-02
Channels
- # boot (227)
- # carry (1)
- # cljs-dev (3)
- # cljsjs (2)
- # cljsrn (19)
- # clojars (2)
- # clojure (93)
- # clojure-belgium (1)
- # clojure-dev (2)
- # clojure-italy (1)
- # clojure-spec (22)
- # clojure-uk (5)
- # core-async (15)
- # cursive (33)
- # emacs (8)
- # ethereum (1)
- # hoplon (3)
- # jobs (2)
- # leiningen (1)
- # off-topic (24)
- # om (32)
- # perun (1)
- # protorepl (1)
- # re-frame (13)
- # reagent (53)
- # rethinkdb (4)
- # ring-swagger (1)
- # vim (12)
- # yada (14)
Hey Everyone, here is a link to today's FreeCodeCamp session: https://youtu.be/zrbGAxF8jYU Topics include Clojure Boot and Hoplon. An edited version will be posted later that actually has all the desktop stuff, it seems our recording app couldn't handle all the codes.
Silly question maybe. At the REPL, in a running application (with boot), I would like to inspect the fileset object. What is the API call I want?
LOL. That's not in Boot. It was something I added to my profile.boot
ages ago. Forgot about it completely.
Still not what I want. A task can't return a value, since it's integrated in the call chain, returning a fileset. What I would like is something like (get-env)
, but for the fileset, say (get-fileset)
.
@danielsz: probably worth looking into the show task, maybe
It has the show -f
option which shows the fileset
I mean, look in Boot's source
Yeah I understood
Look in Boot's source for ideas is what I was suggesting
Here is my build.boot
(set-env!
:source-paths #{"src"}
:dependencies '[[adzerk/bootlaces "0.1.13"]]
:repositories [["" {:url ""}]])
(require '[adzerk.bootlaces :refer :all])
(task-options!
pom {:project 'html
:version "1.0.0"
:description "Tools for writing html as clojure"
:url ""
:scm {:url ""}
:license {"Public Domain" "Public Domain"}})
When I use
boot build-jar push-release
it says Writing pom.xml and pom.properties...
Writing html-1.0.0.jar...
Installing html-1.0.0.jar...
CLOJARS_USER and CLOJARS_PASS were not set; please enter your Clojars credentials.
Username: bcbradle
Password: clojure.lang.ExceptionInfo:
data: {:file
"C:\\Users\\brian\\AppData\\Local\\Temp\\boot.user5953030130723587153.clj",
:line 13}
java.lang.NullPointerException:
adzerk.bootlaces/eval131/fn/fn/fn bootlaces.clj: 52
adzerk.bootlaces/eval171/fn/fn/fn bootlaces.clj: 62
boot.task.built-in/fn/fn/fn/fn built_in.clj: 815
boot.task.built-in/fn/fn/fn/fn built_in.clj: 717
boot.task.built-in/fn/fn/fn/fn built_in.clj: 433
boot.core/run-tasks core.clj: 938
boot.core/boot/fn core.clj: 948
clojure.core/binding-conveyor-fn/fn core.clj: 1938
@micha have you seen the http://gittup.org/tup/ex_a_first_tupfile.html build system? what do u make of it?
they claim it's better because the dependency graph is directed bottom to up instead of up to bottom...
i feel like the effectiveness of the DAG approach is limited because you need to be able to express to the bool all the weird ways things can depend on each other
they have a paper about it too http://gittup.org/tup/build_system_rules_and_algorithms.pdf but anyway i was just curious wether u came across it before or not
(Trying to get boot-sassc to run with a perun project. So far, it is working.. except I don’t get CSS out in the end. lol.)
Hmm. I’m not even sure where things are compiling to in Perun. target
is empty. That’s odd.
I’ve been just inspecting source in the browser, so I didn’t even think to figure out where the files are going before they get served by boot-http
hey guys I'm trying to depend on and require https://github.com/bcbradle/html but I can't seem to get it to work, are you able to require it?
@bcbradley It looks like your jar didn’t build right.
@bcbradley interesting project, have you seen hoplon?
@bcbradley ah, it is fine.
In which case, if it didn’t get a SNAPSHOT release, you might have to go clear it out of your maven
(defproject garb "0.0.1-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.8.0"]
[html "1.0.1"]])
all i want to do is verify that I can depend on the html library that you see on github through lein
@bcbradley try removing ~/.m2/repository/bcbradley/html/1.0.1/
— it sounds like you installed it locally while working on it, and it isn’t the “complete” version that is on clojars.
barp $ jar tf ~/.m2/repository/html/html/1.0.1/html-1.0.1.jar
META-INF/
META-INF/maven/
META-INF/maven/html/
META-INF/maven/html/html/
META-INF/maven/html/html/pom.xml
META-INF/maven/html/html/pom.properties
META-INF/MANIFEST.MF
Didn’t realize https://github.com/bcbradle/html/blob/master/build.boot was manual version of what bootlaces does
@bcbradley https://github.com/mathias/boot-sassc/blob/master/build.boot for comparison
not sure what version of boot that is meant for, though. You might want to grab the latest bootlaces version number off clojars.
@bcbradley i'd recommend testing with your local maven repo before pushing to clojars
@bcbradley Your local source directory with .git/
dir is the local repo
you can manage that all manually by having a lib dir with all your jar files and then add them to the classpath and whatnot
also because there are a lot of dependencies, and because jars in maven are immutable, it keeps a local cache, usually in ~/.m2/
your local ~/.m2/repository/ directory has the same exact structure oas the clojars repo
so to get back to your immediate problem: your jar is missing sources because you did (set-env! :source-paths #{"src"})
boot.user=> (set-env! :dependencies '[[html "1.0.1"]])
...
boot.user=> (require 'html.core)
(deftask push-release!
"Deploy release version to Clojars with no gpg."
[f file PATH str "The jar file to deploy."]
(comp
(pom)
(jar)
(install)
(fn [next-handler]
(fn [fileset]
(let [creds (atom {})]
(print "Username:")
(#(swap! creds assoc :username %) (apply str (.readPassword (System/console))))
(print "Password:")
(#(swap! creds assoc :password %) (apply str (.readPassword (System/console))))
(merge-env! :repositories [["deploy-clojars" (merge @creds {:url ""})]])
(next-handler fileset))))
(push
:file file
:gpg-sign false
:ensure-release true
:repo "deploy-clojars")))
those warnings are just because you're defining names that collide with names in clojure.core namespace
when i try it in nightcode i get "illegalArgumentException No value supplied for key: true clojure.lang.PersistentHashMap.create (PersistentHashMap.java: 77)
@juhoteperi sass4clj is great. I’m tempted to mark boot-sassc
as deprecated in favor of it. (I think I broke boot-sassc
at some point, but not sure. It’s too fickle with its shelling-out to be debuggable)
I just got Windows CI tests working on both less4clj & sass4clj and pushed new snapshots for both projects
New sass4clj snapshot should be a lot better as it is using much newer jsass version, as I don't use sass myself it would be good for someone to check the snapshot
I’ll give it a try since I’m currently fighting to make http://bulma.io compile better 🙂
honestly, I think my problem is that in an attempt to be modular (and depending on most sass compiler behavior where things @import
ed in one file are available to all subsequent files) I keep hitting sub-files in bulma that don’t have mixins or whatever. So I might just end up rewriting the @import
structure
The compile errors look better, @juhoteperi 😉
@mathiasx oh man now that you're back in the mix, you gotta check out https://github.com/hoplon/ui
almost totally subsumes CSS
agreed, it needs way more
@juhoteperi working great btw
@juhoteperi any interest in something like :ignore-paths #{“scss/someframework”}
so I can get around compile errors without having to go maintain an edit / fork of a framework?
Huh, why would all files get compiled?
And I have it checked out into my source tree, because there isn’t a good package for me to import
[org.webjars.bower/bulma "0.2.1"]
?
All bower packages should be available from webjars
hah, dang. I searcher http://bower.io and it wasn’t on there
@alandipert so hoplon/ui is all constraint-based styling?
(I would like to avoid such options if possible, and I think using Maven deps is preferable instead of adding bower etc. stuff to fileset)
I have some old hoplon apps that have both npm node_packages and bower_components repos, for example
@juhoteperi is there any step to require webjars then, or is it just known and something that sass4clj will look in per https://github.com/Deraen/sass4clj#import-load-order ?
Just add the maven dep and @import
It is just special case of importing files from classpath, with handling to remove package version etc. from path so it is easier to import files
You can easily check the package file contents using http://webjars.org
Bulma for example contains META-INF/resources/webjars/bulma/0.2.1/bulma.sass
and to import that you would use @import "bulma/bulma.sass";
Yeah, I’m not importing that specifically because it doesn’t compile cleanly due to above @import
assumptions
Which should be imports like I’ve got: @import "bulma/sass/utilities/variables.sass”;
I may put down the front-end stuff for awhile. I already got tired of fighting CSS for today for this little personal site 😉
I got enough of dealing with java.net.URI and just wrote simple URL normalization function myself: https://github.com/Deraen/sass4clj/blob/master/src/sass4clj/core.clj#L20-L41
lol, of course someone put one on one of those “print your logo on a shirt” sites: https://www.zazzle.com/lisp_made_with_secret_alien_technology_t_shirt-235474742020769821
If you want to fill a whole drawer full of these: https://www.zazzle.com/lisp_shirt-235017044261893615 https://www.zazzle.com/theres_a_el_for_that_t_shirt-235341608629692697 https://www.zazzle.com/repl_t_shirt-235905405181197568 https://www.zazzle.com/cons_cell_t_shirt-235934138785555839
If you guys decide to put this on a tshirt, let me know and I’ll order one 😉 https://github.com/boot-clj/boot-clj.github.io/blob/master/assets/images/logos/Boot-logo-trans.svg
Hi guys - I have a question about the sift command. Can the :to-resource flag take a single filename regex as an argument? Or can it only be a path regex?