This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-05
Channels
- # adventofcode (41)
- # bangalore-clj (4)
- # beginners (283)
- # boot (62)
- # clara (9)
- # cljsrn (3)
- # clojure (112)
- # clojure-brasil (1)
- # clojure-greece (1)
- # clojure-korea (6)
- # clojure-russia (99)
- # clojure-spec (29)
- # clojure-uk (12)
- # clojurescript (34)
- # clojurex (5)
- # core-logic (1)
- # cursive (31)
- # datomic (30)
- # devcards (5)
- # editors (19)
- # emacs (31)
- # events (5)
- # garden (4)
- # hoplon (137)
- # lein-figwheel (3)
- # luminus (4)
- # mount (7)
- # off-topic (7)
- # om (18)
- # om-next (3)
- # onyx (88)
- # proton (1)
- # protorepl (6)
- # re-frame (48)
- # reagent (15)
- # spacemacs (41)
- # testing (1)
- # untangled (2)
- # yada (18)
I'm struggling a little bit with working on filesets. I can't seem to figure out how to add a specific file to the fileset.
I'm wanting to add my template.html
file to the fileset so that I can turn that into multiple html
files by changing the name and doing a str/replace
on parts of the html.
@grounded_sage https://github.com/adzerk-oss/boot-template would be something to look at, it substitutes strings in a file
1. find file in fileset, 2. get its contents, 3. create a temp directory to put output into, 4. using the file's contents make the files you want and put in temp directory, 5. add temp directory to fileset, 6. (optional) rm original file from fileset 6. commit! fileset
^ basic recipe
Thanks @alandipert I will take a look. I'm still relatively new to Clojure and programming in general. I am getting there. Been trying to look at documentation, source and play in REPL but really struggling with filesets. I just realised that :resource-paths 'resources
means it is already in the fileset. But not sure how to capture the fileset as a value to then play with it with the Fileset and Tmp dirs API
cool, yeah the key to getting a fileset value is making and running a task
ok thanks for that clarification.
Current status: tracking down a bug that only happens every now and then by running the tests half a dozen times
boot test test test test test test test
❤️ boot pipeline
boot repeat -n 10 test
could be a possible task 😉
Hey, I asked this Friday night but that’s probably a terrible time for it, so once more before I roll my own: is there an idiomatic way in boot to group and exclude tests, e.g. those that integrate with stateful services?
@donaldball how are you running your tests?
In this case, boot test
on circleci
But I have a couple of new integration tests that I’d like to skip. In leiningen, one would mark them via ^:integration
metadata and set up some test mode rules.
> The --filters option specifies Clojure expressions that are evaluated with % > bound to a Var in a namespace under test. All must evaluate to true for a Var > to be considered for testing by clojure.test/test-vars.
So like (comp (complement :integration) meta)
or something along those lines
Solid, thanks
I am a newbie to boot. I am trying to run through the example in the tutorial modern-cljs, which seems to be a good introduction to both Boot and Clojurescript. While running tutorial 2, I am attempting to bring up a ring server using pandeiro.boot-http, but when I attempt to run the boot task boot boot-http -h
, I get the following error:
` results: [#object[org.sonatype.aether.resolution.ArtifactResult 0x19976a65 "adzerk:boot-cljs:jar:1.7.170-3 < clojars (https://clojars.org/repo/, releases+snapshots)"] #object[org.sonatype.aether.resolution.ArtifactResult 0x4bc222e "null < null"]] org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact pandeiro.boot-http:pandeiro.boot-http:jar:jar in clojars (https://clojars.org/repo/) artifact: #object[org.sonatype.aether.util.artifact.DefaultArtifact 0x56dc1551 "pandeiro.boot-http:pandeiro.boot-http:jar:jar"] repository: #object[org.sonatype.aether.repository.RemoteRepository 0x7c921dc0 "clojars (https://clojars.org/repo/, releases+snapshots)"] org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap WagonRepositoryConnector.java: 947`
This error seems to indicate an inability to locate the proper version of the code in the repository. However, when I search the repo via browser, the specific version I'm asking for is there (and all the auxiliary info looks fine).
(set-env! :source-paths #{"src/cljs"} :resource-paths #{"html"} :dependencies '[[adzerk/boot-cljs "1.7.170-3"] [pandeiro.boot-http]] ) (require '[adzerk.boot-cljs :refer [cljs]] '[pandeiro.boot-http :refer :all]) (deftask dev [] (comp (cljs) (target :dir #{"target"})))
is your boot
up to date?
I've tried adding an explicit version to the boot-http reference (0.7.6), but that didn't seem to help either.
uhh you need to specify the boot-http version
boot requires you to specify versions explicitly (better safe than sorry)
(set-env! :source-paths #{"src/cljs"} :resource-paths #{"html"} :dependencies '[[adzerk/boot-cljs "1.7.170-3"] [pandeiro.boot-http "0.7.6"]] )
org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact pandeiro.boot-http:pandeiro.boot-http:jar:0.7.6 in clojars (https://clojars.org/repo/)
the format it's showing in the error message is <group-id>:<artifact-id>:<artifact>:<version>
Hmm... I changed it to pandeiro/boot-http and am still getting the same error: artifact: #object[org.sonatype.aether.util.artifact.DefaultArtifact 0x56dc1551 "pandeiro.boot-http:pandeiro.boot-http:jar:0.7.6"]
Yes. I finally fixed the correct place in the code. It's working now. Thanks for your help. I am, as I said, a boot newbie and my cluelessness is deep.
To be honest, I didn't find much, which means boot probably does pretty much what people expect. The main thing I gather is that the tutorial I'm using is pretty buggy (when my typing isn't already causing problems), so I am having to make changes as I go along. I figure I'm probably learning better due to this, anyhow.