Fork me on GitHub
#pathom
<
2022-05-03
>
andrewzhurov10:05:41

Hi, I'm getting myself familiar with pathom3. I have a couple of resolvers registered that derive such data:

:project/path -> :project/analysis -> :analysis/var-definitions -> :project/vars [:var/ns :var/name :var/expr]
:project/path -> :project/analysis -> :analysis/var-usages      -> :project/vars [:var/ns :var/name {:var/uses-var [:var/ns :var/name]}]
I can't figure out a couple of things: 1. How to have :project/vars normalized by :var/ns + :var/name? 2. How to be able to perform such queries:
[{:project/vars [{:var/uses-var [:var/expr]}]}]

wilkerlucio18:05:54

hello andrew, not clear to me what you intending to do here yet, can you make a running example to point where the misunderstanding may be?

souenzzo15:05:16

Hello I'm trying to make the Index Explorer tab at Fulcro Inspector work with pathom3 I tried to make a simple resolver that returns the index:

(pco/defresolver index-explorer [env _]
  {::pco/input  [:com.wsscode.pathom.viz.index-explorer/id]
   ::pco/output [:com.wsscode.pathom.viz.index-explorer/index]}
  {:com.wsscode.pathom.viz.index-explorer/index (select-keys env
                                                  [:com.wsscode.pathom3.connect.indexes/index-resolvers
                                                   :com.wsscode.pathom3.connect.indexes/index-attributes
                                                   :com.wsscode.pathom3.connect.indexes/index-io
                                                   :com.wsscode.pathom3.connect.indexes/index-oir
                                                   :com.wsscode.pathom3.connect.indexes/index-mutations])})
It did not work. Probably because the inspector expect that the index contains a pathom2-style index. There is some buitin function to do this transformationw

xceno17:05:17

There's an old thread in #fulcro about it: https://clojurians.slack.com/archives/C68M60S4F/p1645018882724239 TL;DR: Might have something todo with RAD internals, but no one figured it out yet

wilkerlucio18:05:03

Fulcro Inspect unfortunally uses some old code that doesn't support Pathom 3 yet

wilkerlucio18:05:36

Im glad to help anyone that would like to work on this, because I can't work on it at the moment, but its something I would like to do (or help someone else to do it)

wilkerlucio18:05:05

for start we need to migrate Fulcro Inspect to use Fulcro 3 (because the new versions of Pathom Viz are already in Fulcro 3)

1
xceno18:05:38

Well, I forked fulcro-inspect a while ago because I wanted to build a dark-mode and add some virtualization for the dom, but imho it should first be converted to fulcro 3. So in the end I didn't get very far, but I could try again. Will take some weeks though, I'm very busy this month

dvingo14:05:57

lol @U012ADU90SW I also wanted a dark theme! I had some time last winter and ported the inspector to f3 and also added a dark theme. I can make a pass this week to clean up what I have and push it out. I've been using it to develop my own apps and seems to work fine.

wilkerlucio14:05:42

@U051V5LLP can you share this with me? would love to merge it back to Fulcro Inspect repo, is there any notes/considerations you think we need to merge it back?

dvingo16:05:12

hey @U066U8JQJ sure! - I'll just post the fork here after I clean it up

xceno20:05:12

@U051V5LLP lol no way 😂 but that's great! I'm going to have a look at your fork then once you have it ready

dvingo15:05:31

greetings gentlemen, here is what I have: https://github.com/dvingo/fulcro-inspect/tree/dvingo/fulcro3-port I did a pass to remove any silly comments (I hope all of them), and there are a few log statements that you may want to comment out. There's likely a few bugs remaining, I haven't been working on it lately so the memories aren't fresh. Check out the contributing.md for more dev notes, I have run through the instructions there so it should work, but feel free to fork it and have fun!

🙌 1
wilkerlucio14:05:59

awesome! looking forward to check it out