简体   繁体   English

引导克隆的refer-clojure

[英]refer-clojure for boot repl

I'm trying to set up boot to let me use better-cond in the REPL. 我正在尝试设置引导程序,以允许我在REPL中使用更好的条件 I've put this into my build.boot: 我已将其放入build.boot中:

(refer-clojure :exclude '[rand rand-int struct cond])
(require '[better-cond.core :refer [cond]])

However, when I start boot repl , I get this warning: 但是,当我启动boot repl ,出现以下警告:

WARNING: cond already refers to: #'clojure.core/cond in namespace: boot.user,
being replaced by: #'better-cond.core/cond

cond does invoke better-cond, but how do I get rid of the warning? cond会调用条件更好的条件,但是如何摆脱警告呢?

I don't want to get into the habit of ignoring compiler warnings. 我不想养成忽略编译器警告的习惯。

If you would prefer to work in boot.user , you can use ns-unmap instead of refer-clojure : 如果您希望在boot.user工作, boot.user可以使用ns-unmap而不是boot.user refer-clojure

$ boot -d better-cond:1.0.1 repl
boot.user=> (run! #(ns-unmap *ns* %) '[rand rand-int struct cond])
boot.user=> (require '[better-cond.core :refer [cond]])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM