Fork me on GitHub
#pathom
<
2021-06-05
>
mauricio.szabo21:06:11

Hi there! @wilkerlucio I was talking with you in private about some resolver problems, and here's what I found: On my current Duck-REPLed project, I'm able to query REPL interactions. To make this happen, I somehow need to know what to query. To make things as simple as possible, I decided to do some "default contents", for example: if I do query [:var/fqn] I probably want the "full qualified name" of the current var in the editor.

mauricio.szabo21:06:58

This made the planner incredibly slow - it's taking +500ms to plan the query. How can I send you more info, so you can check if it's some bug or it's inherently a problem on how I made my resolvers?

mauricio.szabo21:06:16

More info about this problem: here's the "slow" query:

mauricio.szabo21:06:32

And here's the fast one:

wilkerlucio23:06:34

hello, can you send an example of how I can reproduce it?

mauricio.szabo15:06:15

Helpers is duck-repled.repl-helpers eql is generated with duck-repled.core/gen-eql

mauricio.szabo15:06:17

Ok, in theory if you start a REPL with duck-repled and try to evaluate these codes, it should have the same problem that I had

mauricio.szabo15:06:59

The problem is that I'm not being able to connect Viz on them: on Clojure, it always return nil for the eval result, and not give me the trace, and in ClojureScript it's crashing node with:

INFO [com.wsscode.pathom.viz.ws-connector.impl.sente-cljs:81] - Connecting to websocket {:com.wsscode.pathom.viz.ws-connector.core/on-message #object[Function], :com.wsscode.pathom.viz.ws-connector.impl.sente-cljs/send-ch #object[cljs.core.async.impl.channels.ManyToManyChannel], :com.wsscode.pathom.viz.ws-connector.core/parser-id :duck-repled.core/duck}
INFO [com.wsscode.pathom.viz.ws-connector.impl.sente-cljs:62] - Waiting for channel to be ready 1000
INFO [com.wsscode.pathom.viz.ws-connector.impl.sente-cljs:75] - Waiting for channel to be ready 1000

/home/mauricio/projects/duck-repled/.shadow-cljs/builds/tests/dev/out/cljs-runtime/cognitect/transit.cljs:418
        (WithMeta. (-with-meta ^not-native x nil) m)
        ^
TypeError: x.cljs$core$IWithMeta$_with_meta$arity$2 is not a function
    at Transit$JSONMarshaller.transform (/home/mauricio/projects/duck-repled/.shadow-cljs/builds/tests/dev/out/cljs-runtime/cognitect/transit.cljs:418:9)

mauricio.szabo15:06:58

I was only be able to truly connect to Viz and check the query inside the Chlorine project 😞 But then, it's quite hard to setup everything to make it work