This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-14
Channels
- # admin-announcements (2)
- # beginners (32)
- # boot (217)
- # cider (20)
- # cljsjs (25)
- # cljsrn (9)
- # clojure (87)
- # clojure-android (7)
- # clojure-austin (4)
- # clojure-belgium (10)
- # clojure-canada (13)
- # clojure-dev (28)
- # clojure-dusseldorf (2)
- # clojure-greece (119)
- # clojure-nl (1)
- # clojure-russia (22)
- # clojure-spain (3)
- # clojure-spec (81)
- # clojure-uk (54)
- # clojurescript (32)
- # community-development (2)
- # core-async (19)
- # cursive (18)
- # datascript (5)
- # datomic (1)
- # dirac (22)
- # emacs (22)
- # hoplon (198)
- # incanter (1)
- # instaparse (4)
- # jobs (3)
- # keechma (15)
- # ldnclj (2)
- # lein-figwheel (14)
- # mount (8)
- # om (78)
- # om-next (4)
- # onyx (37)
- # other-languages (1)
- # pedestal (6)
- # re-frame (22)
- # reagent (25)
- # ring-swagger (17)
- # robots (1)
- # slack-help (1)
- # spacemacs (7)
- # specter (50)
- # spirituality-ethics (3)
- # uncomplicate (5)
- # untangled (1)
- # yada (17)
@richiardiandrea: Is it possible to close postgres after boot is killed? No idea if this is a feature boot can support. A sort of "end of stream" call.
@dominicm: boot.core/cleanup
is a thing, not sure if that helps with killing postgres though
@martinklepsch: Looks to be on the mark
@dominicm: cleanup
is also useful for stopping things (cleaning up side effects from tasks) when the pipeline ends, like in the REPL
so like if you do (def f (future (boot (dev))))
and then later do @f
and C-c, it will cleanup after itself so you can run (boot (dev))
again without starting more servers on the same ports or whatever
@dominicm: it is a good idea and I'd add it in order to kill the docker instance in this case
I have a really weird problem, an exception with tools.reader
, which seems old clojure.lang.ExceptionInfo: Unable to resolve var: reader/*alias-map* in this context
but the version in show -d
is 1.0.0-alpha1
@richiardiandrea: is this in the repl?
when I launch boot-cljs-repl
not with the compiler
which is super weird
so maybe the dep in boot-cljs-repl
is old? does it download it itself?
i'll check
that dynamic var was added back in the latest versions
actually no, it was from 0.10.0-alpha2
mmm no boot-cljs-repl
does not fetch tools.reader
Did someone try calling "sub boot projects" from boot? I'm wondering if I could use Boot to build all Cljsjs packages from from single root project
@juhoteperi: the only thing is the CWD
Does it have to start new Java for each cwd?
I don't think that's going to be feasible 😞
There is 235 projects currently
i think you could do it, as long as the build.boot things in each subproject don't assume that . is the subproject dir
haha yeah @richiardiandrea is the expert here
I could probably eval all the build.boots for version info
And then start separate JVMs for each changed subproject
Any examples of how to eval sub build.boots?
perhaps rather than eval you could make a namespace that defines tasks in each subproject
Perhaps, and that might save some boilerplate in each subproject
But currently it is easy for contributors to build a single subproject from the subproject dir
And simple (similar to normal boot projects)
yeah with this scheme you'd need ot build the subprojects from the main one like boot build -p jquery
perhaps
weird, for the problem above I recloned the repo and everything worked
@micha so the problem was something else, basically a dep in profile.boot
was importing tools.reader
so I needed to add an :exclusions
in it, the :exclusions
clause does not work in build.boot
...did you know that (of course you did 😸) ?
@richiardiandrea: how do you mean doesn't work?
just noting, because maybe we should write it somewhere, i don't know if I would change the behavior
exactly
the solution is to package whatever you need in profile.boot as functions or tasks in a library that has no transitive deps
right, so basically deps in profile.boot
adds to the global classpath and I was not expecting that, but now it makes sense
executing in a pod looks a bit cumbersome but at least no deps leak in the main environment: https://gist.github.com/arichiardi/9072fdddd0fe3ac855550718dc7eb59e
@richiardiandrea: you could use cleanup
to shut the container down, too, or add a shutdown hook
Yeah next step it will be that...no well, the problem was the deps leak from profile.boot only..solved with a pod
I seem to be inconsistently getting this error when writing the target dirs after a reload. It goes away if I restart my boot process. Is this a known problem?
Writing main.cljs.edn...
Compiling ClojureScript...
• main.js
Writing target dir(s)...
java.util.concurrent.ExecutionException: java.nio.file.NoSuchFileException: target/some/project/myns.cljs___jb_tmp___
java.nio.file.NoSuchFileException: target/some/project/myns.cljs___jb_tmp___
file: "target/some/project/myns.cljs___jb_tmp___"
sun.nio.fs.UnixException.translateToIOException UnixException.java: 86
sun.nio.fs.UnixException.rethrowAsIOException UnixException.java: 102
sun.nio.fs.UnixException.rethrowAsIOException UnixException.java: 107
sun.nio.fs.UnixFileSystemProvider.implDelete UnixFileSystemProvider.java: 244
sun.nio.fs.AbstractFileSystemProvider.delete AbstractFileSystemProvider.java: 103
...
boot.filesystem/delete! filesystem.clj: 163
boot.filesystem/patch! filesystem.clj: 178
...
clojure.core/apply/invokeStatic core.clj: 652
clojure.core/partial/fn core.clj: 2534
...
boot.core/fileset-syncer/fn/iter/fn/fn/fn core.clj: 930
clojure.core/binding-conveyor-fn/fn core.clj: 1938
...
Elapsed time: 0.162 sec
Here is the task:
(deftask web-dev
[]
(comp
(serve :dir "target/")
(watch)
(cljs-repl)
(speak)
(reload)
(cljs)
(target)))
as an experiment you can try switching to vi for a minute and see if you can make it happen
Hmm. Not sure on that one either. I should've been logging each error when it happened but I haven't been. I know it happens in different projects.
it's either an obscure bug in the boot filesystem patching code, or another process is deleting files in the target dir
@cfleming: Does Cursive create a file that looks like target/some/project/myns.cljs___jb_tmp___
?
@kenny: Cursive doesn’t, but that ‘jb’ is suspicious, it might be a JetBrains thing which might mean IntelliJ is doing it.
Cursive doesn’t have a separate process, the PID of IntelliJ is what you want for lsof
I’d be surprised if that were an IntelliJ file though, since IntelliJ doesn’t do anything with cljs
private static final String EXTENSION_TMP = "___jb_tmp___";
private static final String EXTENSION_OLD = "___jb_old___”;
Why does it happen inconsistently? Seems like it should always happen. Is it a race condition?
it's still an issue if other processes are writing to files that boot puts in the target dir
as boot will use hard links where it can to be more efficient, but if something writes to them while boot is still running that will corrupt the fileset
lol is that the above?
if boot makes a hard link to myns.cljs
, which it will by default, and something writes to it, that will change the contents of the file in the fileset storage
but that would corrupt the fileset storage if the contents change, because those internal files are organized by their contents checksum
when you use --no-link
boot will make copies of the files and put those in the target dir, rather than hard links
can you diff the cljs file in the target dir against the one in your project resource paths
@richiardiandrea: actually no, the editor lockfiles are a different issue
there isn't any way for boot to know the difference between one of your files and an editor temp file
yeah so what's happening there is that something in intellij wants to write to myns.cljs in the target dir
renaming can be done atomically, so it ensures that you don't ever see myns.cljs
while it's beig written to
so diffing myns.cljs
in the target dir against the one in your project would provide some insight i think
I have continued working so I don't have the file set from when the error occurred anymore
you'll only see the error occasionally, when intellij creates the file at exactly the right time
Will also save the file set so I can run additional tests if needed. Need any other info now?
Shouldn't I do that after the error occurs, otherwise we won't really know if the bootignore solved the problem or not?
BTW, not sure if this is apparent or not but the error occurs after using boot for a while. It doesn't occur at boot start up.
Not sure what extent Cursive knows about boot temp dirs. My project is configured as a lein project. The project.clj is generated using boot lein-generate
. boot web-dev
is being ran in IntelliJ external tools.