Hey, I'm going through the Etudes for Clojurescript
book, and would like to know the general consensus now on which parts of the described ecosystem are up to date
for example, the book mentions the libraries (`dommy`, domina
, enfocus
) but the last commit for these one are ~6 years ago
I don't know the book but that sounds rather outdated. clojurescript hasn't changed much though so those generic parts will still be accurate. Just some libs have changed.
mostly react based these days. so reagent/re-frame/fulcro/etc
I've used dommy
and domina
a few years ago. Eventually rewrote everything to use clojure.browser.dom
where needed.
And there's also goog.dom
which clojure.browser.dom
itself uses.
thanks! Could you also suggest a library for interactively displaying graphs (by which I mean, DAGs, not charts)? Is binding to d3 the current choice?
I find Vega really pleasant to work with. Theres a project called Oz by metasoarous that wraps it and works on both clojure and clojurescript.
When i switch from clojurescript 1.10.741
to 1.10.773
I started getting this error:
Uncaught Error: find-ns-obj not supported for target bundle
Whenever I try to use cljs.js, does anyone have any idea why this might be happening?The debug trace isn't particularly helpful:
core.cljs:11642 Uncaught Error: find-ns-obj not supported for target bundle
at Object.cljs$core$find_ns_obj [as find_ns_obj] (core.cljs:11642)
at Function.cljs$core$IFn$_invoke$arity$1 (core.cljs:11660)
at cljs$core$create_ns (core.cljs:11657)
at Function.cljs$js$compile_str_STAR__$_compile_loop (js.cljs?rel=1606166244828:918)
at Function.cljs$core$IFn$_invoke$arity$3 (core.cljs:3918)
at Function.cljs$core$IFn$_invoke$arity$2 (core.cljs:3913)
at Function.cljs$core$IFn$_invoke$arity$2 (core.cljs:3948)
at core.cljs:10831
at Function.cljs$core$IFn$_invoke$arity$1 (core.cljs:10826)
at Function.cljs$core$IFn$_invoke$arity$variadic (core.cljs:10831)
react-dom.development.js:327 Uncaught Error: find-ns-obj not supported for target bundle
at Object.cljs$core$find_ns_obj [as find_ns_obj] (core.cljs:11642)
at Function.cljs$core$IFn$_invoke$arity$1 (core.cljs:11660)
at cljs$core$create_ns (core.cljs:11657)
at Function.cljs$js$compile_str_STAR__$_compile_loop (js.cljs?rel=1606166244828:918)
at Function.cljs$core$IFn$_invoke$arity$3 (core.cljs:3918)
at Function.cljs$core$IFn$_invoke$arity$2 (core.cljs:3913)
at Function.cljs$core$IFn$_invoke$arity$2 (core.cljs:3948)
at core.cljs:10831
at Function.cljs$core$IFn$_invoke$arity$1 (core.cljs:10826)
at Function.cljs$core$IFn$_invoke$arity$variadic (core.cljs:10831)
@dnolen It's my first time debugging something like this so please excuse me if I spurt out some nonsense but it seems that 0c557550
has broken this scenario.
It works in 1.10.758 and doesn't in 1.10.764. The former has *target*
bound to "default"
while the latter has it bound to "bundle"
.
I don't think you can dynamically created namespaces in a non-boostrapped CLJS.
I thought I was in bootstrapped CLJS?
target bundle
says otherwise.
Like, I'm evaluating this with cljs.js/compile.str
I see.
So may I ask why it used to work?
Or was that just some bug that happened to make it work just fine?
Dunno. Seems like the code of find-ns-obj
hasn't changed in years.
Maybe someone with more knowledge will chime in.
I see.
If you have the time, I would create a minimal reproducible example.
Sure, I can do that.
Okay, I've made a fairly minimal example of this problem: https://github.com/LeifAndersen/cljs-find-ns-example
When you move the comment from line 3 to line 4 (switching from 1.10.773 to 1.10.741) the program works.
(Run lein figwheel
and 3
will appear in the browser console.
)
But when you don't, you'll get that error.
Oh, tagging @p-himik again
hmmm. I was able to reproduce the issue (works with one version, but not with the other). there is a #bootstrapped-cljs channel that you can try for issues relating to bootstrapping
fwiw, I was able to get it to "work" with the :target
set to nodejs
bash-3.2$ node js/development/app.js
{:ns cljs.user, :value 3}