This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-25
Channels
- # aatree (10)
- # beginners (59)
- # boot (314)
- # braveandtrue (4)
- # cider (50)
- # cljs-dev (12)
- # cljsrn (6)
- # clojure (206)
- # clojure-austin (2)
- # clojure-gamedev (90)
- # clojure-japan (1)
- # clojure-poland (12)
- # clojure-russia (10)
- # clojure-sg (1)
- # clojurescript (86)
- # core-async (2)
- # core-matrix (3)
- # cursive (40)
- # datomic (2)
- # dirac (13)
- # editors (25)
- # emacs (7)
- # hoplon (2)
- # immutant (10)
- # jobs (24)
- # jobs-discuss (1)
- # ldnclj (8)
- # lein-figwheel (19)
- # leiningen (1)
- # mount (7)
- # off-topic (34)
- # om (147)
- # onyx (11)
- # parinfer (151)
- # pedestal (2)
- # re-frame (31)
- # reagent (13)
- # ring-swagger (7)
- # spacemacs (1)
- # yada (11)
hey guys, in boot-test-cljs
/`doo` is there are way to perform the equivalent of Phantom's require('webpage')
?
@danielsz: thanks for the quick system release; we are putting it into production today or tomorrow.
btw, i don't quite understand what's going on w the various github org names.
the https://clojars.org/org.danielsz/system/versions/0.3.0-SNAPSHOT page shows a github link to tracksun/system
which in turn redirects to https://github.com/tsonntag/system (which i can understand; the original org was renamed.)
where is tracksun
still coming from?
is it a clojars org?
i would expecet to see danielsz/system
in that header too 😕
@onetom Yes, you are right, I would have expected that too. I'll check it out. Thanks for pointing it out. 👍
Oh, @juhoteperi already did. My hero, again. Well, thanks!
driving benchmarks (highly unscientific) with boot: https://github.com/dm3/clojure-bench/blob/master/build.boot
@onetom: Unfortunately, I let the url from a contributor slip inside the scm url during the release of system 0.2.0. Because the artefact is already deployed and can't be overwritten, I can only fix it by releasing a new version. I can either bump the minor version and release now, or just wait it out until the proper 0.3.0 release.
@danielsz: it doesn't cause any practical issues, so no point making a new release just fixing that. i just asked because it bothers me if i dont understand something which seems simple enough that i should
however, it would be good if u could git push --tags
just so the stable branch releases could be correlated with the commits easily from github
Yes, I was doing that and then I got sloppy. Sorry about that. I'll properly tag the releases in the future. It is important.
it was a bit of annoyance when i tried to check if an issue was related to a specific version or not, that's why im asking
as i see u created quite a crucial library which many people will rely on in the core of their app, so all the boring bits of maintenance should be done well otherwise users will annoy the hell out of u
i dont know docker well enough yet, but i imagined it would be possible to ship a bunch of Dockerfiles w system, so a test instance of every service which it has a component for could be spun up temporarily for a test run.
In FOSS, there are often misconceptions about roles and responsibilities. I don't remember where I saw this tweet about FOSS users often behaving as customers.
I am doing what interests me, and make it available. Others are welcome to join, and put their expertise.
I run the tests manually, and I have most of the external resources installed on my development machine.
That's an area where the devops expert would laugh at my amateurism. But I say, please step in, please contribute.
So all in all there is a fine line to tread. Both for the FOSS maintainer as for the FOSS consumer.
A question about conditional tasks. I have a situation where I want to do (comp (A) (if foo (B)) (C) (D))
. That doesn't work so I tried to make (if ...)
act more like a task: (comp (A) (if foo (B) (fn [next] (fn [fs] fs))) (C) (D))
, i.e. tried to insert a nop/identity task. it sorta worked, but tasks C and D don't get run. in this case, B and C are both sift tasks so i solved it this way:
(let [sift-args (concat [:move {#"(.*\.clj$)" "WEB-INF/classes/$1"}] (if keep [:to-asset #{#"\.clj$"}]))] (comp (A) (apply builtin/sift sift-args) (D)))
egad. first thing i tried and it didn't work. i must have bungled the syntax, it works. thanks, sorry for the bother
Isn't it more a matter of remembering how comp works? Not a boot issue at all but a matter of making the point in the comp documentation.
for me it was a matter of the concept of task. tasks may be functions but they don't feel like mere functions; at the least, they're higher-order fns. i think a doc section on pipelines would be helpful to newcomers.
... and i just noticed the section on "The Null Task" on the wiki, so i guess it's already there. oy.
is there a way with boot-cljs-repl to have a file that corresponds to the default namespace of the repl, similar to how the clojure repl loads up in user.clj?
actually looking at the boot-cljs-repl source I'm probably better off just using the lower level piggyback/weasel stuff manually right?
if I have a task that is doing setup prior to the with-pre-wrap
, but I would like that setup to have access to the fileset somehow, I have to move it into the with-pre-wrap
right?
i think it's always best to do extra work if there is a chance that the cached values will be wrong
I'm not 100% sure, but my hypothesis is that to serve non-stale resources, I need to get them directly from the fileset
unfortunately I think that will mean I can't use the existing ring wrap-resource
stuff
wow yeah @micha, running with httpkit instead of jetty, the served resources aren't stale
@laforge49: weren't you setting something about a file-mapped buffer to get jetty to work on windows?
For what it is worth then, https://github.com/pandeiro/boot-http/wiki/Using-with-windows
i guess i'll see how far i make it into http://www.eclipse.org/jetty/documentation/current/ tonight before i fall asleep
i've entered bizarro programming land again... i made a simple println
debugging statement in ring-jetty-adapter's proxy of the handler class and reloaded boot, and now i'm not seeing the stale resources from jetty anymore
i think this calls for http://memesvault.com/wp-content/uploads/Dog-Meme-I-Have-No-Idea-What-Im-Doing-03.jpg
@micha - if you're interested, the result of my yesterday's struggles with with-env
(which I didn't use in the end) : https://github.com/dm3/clojure-bench/blob/master/build.boot
yeah so I misunderstood my problem, it doesn't seem to be jetty-specific at all, but rather something to do with ring's wrap-resource
and how it resolves a filename
like if a boot task modifies index.html
and commits the modified version to the fileset, and later in the pipeline, another task slurps (io/resource "index.html")
, it should obviously see the modified version right?
ah-ha, and only if watch
is not involved and the resource-modifying task comes before the serve
task
how can I determine what classloader is being used / what classloaders exist within a boot process?
https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/util/response.clj#L289
and i'm testing and what is happening is that sometimes the resource URL is resolving to the modified version's resource, and sometimes to the previous
i guess one factor is the time it is taking jetty to start up could determine which resource URL is used?
b/c i have a simple reproduction case and literally half the time, it's one and half, the other
ok guess i will move the instantiation of the server into with-pre-wrap
and see if that makes it more predictable
and without the watch task it works if you have the serve task after the task that modifies things, right?
what does seem true is that the resource is much less likely to be stale when watch
is involved and when the resource-modifying task is after (not before) serve
but again, even with no watch and resource-modifier before serve, sometimes the updated resource URL is used
i did file /home/mu/.boot/cache/tmp/home/mu/boothttpbug/csp/f0sqpx/foo.html
and it says it's ASCII text
i can't tell if that's what's going on or not, but i don't understand what the alternative would be, to serve the html files, then to include them in a dir specified by :resource-paths
it's all moot too if I just choose to serve from the target
dir, as the modified one is always what ends up there
barp $ boot dev-once-broken
file:/home/micha/.boot/cache/tmp/home/micha/git/pandeiro/boot-http-bug/kpy/-rcsl8f/foo.html
before update :: <h1>foo</h1>
file:/home/micha/.boot/cache/tmp/home/micha/git/pandeiro/boot-http-bug/kpy/f0sqpx/foo.html
after update :: <h4>foo</h4>
resources-handler called
2016-02-25 17:03:32.266:INFO::clojure-agent-send-off-pool-0: Logging initialized @3235ms
file:/home/micha/.boot/cache/tmp/home/micha/git/pandeiro/boot-http-bug/kpy/f0sqpx/foo.html
after serve :: <h4>foo</h4>
i didn't include the instrumented version of ring/util/resource-response
in the repo, that just does another .toString
and verifies which resource URL it matches
i have another crazy observation in the meantime: if you wait 4-5s before curl
, much more likely to be h1
what distro/windows manager is this? https://youtu.be/TcnzB2tB-8Q?t=7m31s
in my PR there is also the "task-src" dir, but that's just because the task is not in a jar
and if a file in :resource-paths
gets changed during the watch
pipeline, how does that work?
well whenever the serve task is hit in the pipeline it copies all the output files from the fileset into the docroot
the pod would not need that normally, but in this case it needs to load the impl namespace from there
instead, an anonymous temp dir is on the classpath, and files are copied from "src" to there whenever they change
Man I lost the talk, can you link me up? 😄
@pandeiro an example for you , I have been there as well: https://github.com/Lambda-X/cljs-repl-web/blob/devel/build.boot#L196
I wanted to keep the generation isolated and I added what I needed through add-classpath
@richiardiandrea: this the one i'm referring to https://youtu.be/TcnzB2tB-8Q