This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-17
Channels
- # admin-announcements (17)
- # announcements (1)
- # aws (8)
- # beginners (5)
- # boot (125)
- # cider (28)
- # clojure (33)
- # clojure-berlin (21)
- # clojure-italy (1)
- # clojure-japan (1)
- # clojure-nl (12)
- # clojure-poland (90)
- # clojure-russia (120)
- # clojurescript (284)
- # clojurex (2)
- # cursive (6)
- # datomic (14)
- # devcards (4)
- # events (2)
- # funcool (2)
- # hoplon (238)
- # ldnclj (32)
- # off-topic (27)
- # onyx (9)
- # re-frame (3)
- # reagent (22)
@micha Sorry I'm a bit late to the discussion, but you don't have to write your own ClassLoader, you can use instances of the standard ones. If you're inclined, and really want to be able to "remove" things from the classpath, You just create a new CL instance, add the paths to it, and set it as the thread's contextClassLoader. A lot of the Java EE containers manage classpaths that way. The default CL is a java.net.URLClassLoader
. Ping me if you want to go that direction...I've done some pretty weird things with CLs.
@kirked: wouldn't that do crazy things with the Clojure runtime? Clojure uses the TCCL for its mutable state
you would also have to track down all references to things that have been "removed", i guess
I'd think it would be more explicit than that; remember, you're not "removing" individual classes, but rather classpath entries
We're just adding in to the new CL the paths we want, vs. diff'ing against something. We just don't add the paths that were "removed"
Yeah, when I noticed them I'd guessed you were just using different classloaders to implement pods
Let’s say that there is a task `x`. When (boot (watch) (x))
is run, is there a way for task `x` to detect whether certain files have changed since the last time it was run within the current pipeline?
My use case is that I have a task that takes a considerable amount of time to occur, but its output changes rarely. I also have tasks that depend on the first task’s output, and those downstream tasks are frequently modified.
I could use cache folders, but I’d like to ask first if there’s a way to do it this way. Caches seem dirtier, since they introduce incidental state that I have to additionally manage.
@cigitia: there is boot.core/fileset-diff
. See https://github.com/tailrecursion/boot-heredoc/blob/master/src/boot/heredoc.clj#L42 for an example.
How do people use boot projects in IDE like cursive? manually maintaining an associated project.clj?
I'm hoping the authors of lein-generate task would package it as a library
You could compose lein-generate task with your other tasks
Do you mean having a boot task calling lein-generate to create a project.clj from my build file?
Ideally I’d want to have everything transparent. Are there plans in that regard or are people happy the way it is?
I understand from @micha recent comment cursive couldn’t possibly support boot without running tasks.
jeluard: most of our machines are a bit underpowered (2.5GHz i5 + hdd)
so we are just using sublime text 3 which is still lightning fast + terminal to run ~ boot watch serve hoplon cljs speak
we don't really use repl much either. no one really feels the need for more, at least until we have more cutting edge machines i guess
Ok so I guess sublime doesn’t rely on data from your build file in this case. One nice feature of cursive is understanding your dependencies (completion, doc, arity check, ..). That requires extracting this information from your build file.
it's a nice thing until u realize how rarely u need to rely on this.
i see arity error maybe once a week and i might pop into a boot -BP repl
or a planck
recently maybe every second day.
i might check documentation out on http://conj.io 1-2 times every day and of course refer to github pages
otherwise i have a ~/r/
directory with hoplon
, boot-hoplon
, castra
, javelin
, etc source in it and i have that whole directory open in a 2nd sublime window and i can do a full-text search on it in 2-3 seconds or a fuzzy search for a filename instantaneously...
our primary window contains all of our company specific source code.
they are in different git repos but under the same dir, so i can just open it up with subl ~/exicon
all this is not as accurate as cursive might be, but in practice it's just not a problem
opening 4-5 repos as different projects in different windows in intellij IS a problem though, because it's annoyingly laggy even on our 3.8GHz i7 quad-core mac...
tab completion for symbol names are the same story. sometimes it completes to the wrong one, but 95% of the time i just type some fragment of what i want, even "soem grabage" and sublime autocompletes it correctly, since it corrects swapped letters...
i just tried, so i can give u a realistic example of our experience:
if i type sre
<tab> or ser
<tab> it gets autocompleted to search-results
(in a 100 line file)
in summary: fck accurate (~=costly) language analysis...
i often feel like im not typing on the keyboard, i just "think" into/onto the keyboard, like a monkey (or my 11months old daughter by pounding on it roughly and the correct text just appears automatically
(without that annoying autocompletion dropdown dialog constantly obscuring the surrounding source code...
Cursive requiring to run boot to find the dependencies shouldn't be a problem I think. It could just run some custom task each time it sees that build.boot has been changed and cache the value.
Might even be possible for Cursive to run the tasks in Cursive JVM (it would need to add Boot to the classpath somehow)
Or Cursive could use pods!
show -e
should contain all the necessary data
deraen: but cursive is not open source, right? and it wont planned to be opened either, no?
Yeah. But it only means that we need for @cfleming to implement it 😉
i.e. source directories where the user's source files are instead of the tempdirs used internally by boot for the real classpath
micha: the same paths are in env? :source-paths
:resource-paths
it contain both
dependencies, directories, source-paths, resource-paths, asset-paths, target-path, repositories
pretty much the same format as what lein has
though Cursive usually differentiates source, test and resource paths. But I'm not sure if that has any real effect.
I usually have some special source paths for dev mode merged during some specific tasks execution. Would those show with boot show
?
@juhoteperi: i had an interesting conversation with @jumblerg this morning about a web.edn
spec
it would be cool if we could maybe get together and work out something simple to start with
Hmm what would http server need to do to support servlet spec?
I still fear that Http-kit doesn't support servlet stuff
and in this case it might make sense to allow only one spec file (web.edn) per fileset?
but once we have the spec file we can use it to coordinate different tasks that contribute to the overall aim
but like .cljs.edn we might discover that the filename itself could contain the info we need to disambiguate
Also web.edn might be too general name and cause clashes
@micha: a static, “basic” map of dependencies? In my experience the majority of projects don’t dynamically add critical dependencies in separate tasks. “critical” is a bit vague here but maybe let’s say it means something like “needed in uberjar”
@martinklepsch: what about like boot watch foo bar baz show --leiningen project.clj
yeah i understand the need, but making things that only work when you don't make new abstractions is a really bad way to go imo
a better option is to let boot do its thing and then when eevrything is computed write a file
but we're not stuck in the declarative world of having to be able to specify everything sttically
I’m going to sleep. I think I agree with what you’re saying. The cases where you would benefit most is when you use lein/boot side by side which arguably isn’t a common situation.
Can I quote you on that “boot shouldn’t be a build tool”? 😄
and provide some library functions for getting your program fully bootstrapped and convenience functions for building jars and other things
cool, didn’t know.
our main idea was that your project will inevitably need its own unique build tool once it reaches a certain level of complexity
but when you make your tasks, or at the command line, you can specify these things very easily
I -> bed (should have done that a while ago already)
Good night @micha