day8 / re-frame-debux

A fork of debux for tracing re-frame code (for eventual consumption by re-frame-10x)
Eclipse Public License 1.0
43 stars 7 forks source link

Conflict with using original debux #25

Closed jefffriesen closed 4 years ago

jefffriesen commented 6 years ago

I'm trying to use both the original debux and re-frame-10x (which depends on re-frame-debux). AFAIK, re-frame-debux doesn't have functionality like the original debux. For example, I can't use this in re-frame-debux:

(* 2 (dbg (+ 10 20)))
; => 60

; dbg: (+ 10 20) =>
; |   30

So I'm trying to load both and getting this error when compiling with shadow-cljs:

File: jar:file:/Users/jeffers/.m2/repository/day8/re-frame/tracing/0.5.1/tracing-0.5.1.jar!/day8/re_frame/tracing.cljc
failed to require macro-ns "debux.dbgn", it was required by "day8.re-frame.tracing"
{:tag :shadow.build.macros/macro-load, :macro-ns debux.dbgn, :ns-info {:rename-macros nil
...
Caused by:
CompilerException: java.lang.RuntimeException: No such var: sk/insert-spy-first, compiling:(debux/dbgn.clj:134:30)

Dependencies:

[day8.re-frame/re-frame-10x "0.3.3-react16"]
[day8.re-frame/tracing "0.5.1"]
[philoskim/debux "0.5.1"]

I'm not sure where the conflict is, but I'm guessing it's from the forking of debux. Is this a bug that needs fixing or config on my part?

Thanks

lucywang000 commented 4 years ago

I encountered this problem too. Seems re-frame-debux keeps the original clj/cljs ns like debux.cs debux.common.util so is not able to be used together with original debux.

In the README it says

This fork contains a few substantial extension/modifications to debux and, longer term, we would like to investigate merging them back into mainline debux, 

Is anything like that planned? If not, I think renaming the ns could solve this problem, e.g. change all debux inside this project to debux2 would do the trick.

@superstructor does that make sense? If so I can prepare a patch. Thanks!