Fork me on GitHub
#boot
<
2018-01-11
>
kenny22:01:51

Is there a way to get rid of this warning?

deftask my-task was overridden
It is preventing me from loading a file in Cursive's REPL.

martinklepsch22:01:19

@kenny why is it preventing you from loading a file?

kenny22:01:15

I attempt to load the file in the REPL and it never finishes. This is what is printed out:

Loading src/boot_tools_deps/core.clj... 
deftask boot-tools-deps.core/deps was overridden
This means my changes were not loaded. The REPL should print out this:
Loading src/boot_tools_deps/core.clj... done

kenny22:01:48

Further, I don't care about that warning at the REPL. It gets especially noisy when trying to develop several Boot tasks.

martinklepsch22:01:32

but really I’d try to figure out why loading that file seems to not return

martinklepsch22:01:55

how are you loading the file? have you tried using just load-file in a terminal? does it behave the same way?

kenny22:01:03

Not sure how Cursive loads the file but I assume it can't be much different than load-file.

kenny22:01:09

(load-file "src/boot_tools_deps/core.clj")
deftask boot-tools-deps.core/deps was overridden
=> #'boot-tools-deps.core/deps

kenny22:01:26

Possibly a Cursive issue?

kenny22:01:50

Either way, I wish that warning was not printed out every time when in a REPL.

martinklepsch22:01:12

@kenny I’m not bothered by it myself but if you want to look into making that configurable you’re welcome to do so, here’s a start: https://github.com/boot-clj/boot/blob/0d1c16f697cfd180ed3856ee808c41b2f0ce3f40/boot/core/src/boot/core.clj#L914-L919

martinklepsch22:01:27

I’m not sure what the best way to toggle this behavior would be though

kenny22:01:04

Perhaps simply disabling the warning when in a REPL? Is there any use-case where you'd like to see that warning when in a REPL?

martinklepsch22:01:39

I feel like that might seriously confuse people who are used to it 🙂

kenny22:01:10

Really? Not sure why that'd confuse people. It seems like a deftask should behave just like any other symbol in the REPL.

seancorfield22:01:49

We just (ns-unmap ...) such symbols before referring in the task we're looking for I believe.

richiardiandrea22:01:40

also, it is only text output with ansi colors, should not break things...unless it is an ansi escaping issue

richiardiandrea22:01:49

there is a way to disable colors

martinklepsch23:01:55

@kenny I’m not attached to the warning, feel free to open an issue for further discussion, maybe encourage people to vote with Github’s reactions stuff

richiardiandrea23:01:17

I am not attached to that too, but I remember that I was questioning once why it is important. We have a couple of warning in the boot build as well btw...I don't remember what @micha or @alandipert told me about that though