Fork me on GitHub
#boot
<
2017-10-03
>
felipebarros01:10:02

Do we still need to first require a namespace from a namespace declaration in order to be able to require it in the bREPL?

seancorfield02:10:20

@anantpaatra Not sure what you're asking... could you explain?

felipebarros02:10:57

I'm following modern-cljs and I believe it is a tad dated. It mentions an existing (at the time) limitation of boot, one that forces us to first require a namespace in a namespace declaration of a clojurescript file in our project in order to be able to require that namespace in the bREPL to get to know it..

felipebarros02:10:22

Sorry, modern-cljs is a tutorial, I don't know how well known it is. https://github.com/magomimmo/modern-cljs

seancorfield04:10:27

@anantpaatra I'm still not sure what you're asking -- it doesn't sound like a limitation of Boot so I'm wondering if something you're reading is confusing you? Can you link to the exact page that talks about the "limitation" you're asking about? The way you've phrased it doesn't make any sense to me, I'm afraid...

felipebarros20:10:20

This is the part of the tutorial that mentions the "bug".

felipebarros20:10:44

I'm sorry about my phrasing, I'm very new to all this.

felipebarros20:10:00

It states that you first need to use the (:require [namespace]) in a file in order to (require '[namespace]) from the bREPL.

seancorfield22:10:58

I think it's just saying that you can't (require '[arbitrary.namespace]) in the bREPL -- it either has to be a namespace in your cljs source files or else a library namespace that your own cljs source specifically (:require ...)s (and that you need to (require ...) the namespace matching that source file first). No idea whether that's still a limitation. I don't do anything with cljs these days, only clj.

seancorfield22:10:42

But I think the author of boot-cljs-repl is here in this channel and might be able to give you a better answer? Or at least, the author of the modern-cljs tutorial?

seancorfield22:10:22

FWIW, that limitation isn't really a big deal. It just means you (probably) need to require one of your own project's namespaces first (and that will make the library namespaces available) -- which would be your most common workflow anyway I think.

felipebarros13:10:30

Your explanation helped me grasp the implications. I believe you are right and I've given too much attention to this. Also, I'll keep in mind that I can contact the authors through this medium as well, I'm not used to that possibility. Thanks again!

djebbz09:10:33

Hello, how to add a dependency at runtime in the repl ? I tried (boot.core/merge-env! :dependencies '[org.clojure/core.match "0.3.0-alpha5"]) but it tells me java.lang.UnsupportedOperationException: nth not supported on this type: Symbol

nfisher12:10:49

Hii all, I’m trying to use boot-test and it seems as a default it exercises all loaded namespace is this intended behaviour? (e.g. not artefacts in my project) As an example this is the output I get: `

nfisher12:10:11

boot test -n prequote.test-suite                                                                                                           RC: 0 - (git)-[master] 

Testing clojure.spec.gen.alpha

Testing clojure.set

Testing prequote.test-suite

Testing boot.from.io.aviso.exception

Testing clojure.stacktrace

Testing clojure.string

Testing boot.from.io.aviso.writer

dominicm13:10:32

@nfisher I don't think it's supposed to test other namespaces, according to a quick skim of the source

nfisher13:10:50

@dominicm external keyboard error… I didn’t use a regex with (run-all-tests)

nfisher13:10:19

Just found it after coming back from lunch. 🙂

phreed14:10:30

It looks like core/cache-dir! can be used as a persistent alternative to core/tmp-dir! .

dominicm14:10:19

I think that requires a cache key

dominicm14:10:26

but if you have one, yep

dominicm14:10:31

(I might be misremembering that)

phreed15:10:39

@dominicm Yes it requires a namespace qualified key but that is easy enough to get. It is still not preserving enough. I really need all of the temporary directories participating in the filesets to be preserved. The wait task does what I want, obviously.

dominicm15:10:46

Best thing I can think of is to hash all of the files in those directories together, to use as your key

phreed15:10:52

What is a good way to capture the messages emitted to stdout and stderr ? [from within a task]

dominicm15:10:11

with-out-str maybe?

phreed15:10:29

@dominicm of course, thanks, but it does not capture err. I made a copy and called it with-err-str any idea why such a function does not already exist?

phreed16:10:43

If a task needs to bail out on what it is doing what should it return? Clearly the next-handler should not be called.

dominicm17:10:57

I think you can call an error function

alandipert17:10:12

throwing an exception will stop the pipeline also, if it needs to bail because of an error

phreed17:10:03

So, util/fail or throw (Exception. "busted")

phreed21:10:50

I have started a boot task and repl tools for working with Antlr4. https://github.com/babeloff/boot-antlr4 It is immature but already doing some useful things.