pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
markaddleman 2021-03-08T19:12:21.065200Z

This query fails due to "insufficient data" for the formatted-metric-query resolver even though the unformatted-metric-query resolver succeeds and requires a subset of inputs and produces the necessary output.

markaddleman 2021-03-09T14:38:33.000900Z

Thanks!

wilkerlucio 2021-03-09T15:08:20.001100Z

were you able to upgrade? I remember you having issues yesterday

markaddleman 2021-03-09T15:56:37.001300Z

Thanks for checking in. I'm still having a problem but it's a bit different than yesterday. I'm beginning to suspect something is corrupted in my cursive/intellij setup

wilkerlucio 2021-03-09T15:59:08.001500Z

yeah, I can't reproduce the issue, and the CI in other projects is able to download and use the dep fine, so I guess it is something on your setup, but if you find something please let me know

markaddleman 2021-03-09T16:17:25.001700Z

So, it's not an intellij problem. I created a new project whose deps.edn is

{:deps {com.wsscode/pathom3 {:git/url "<https://github.com/wilkerlucio/pathom3>"
                             :sha     "beaf0053e906a18d8bc9d96995e9903995c6926d"}}}
When I run clj -X:deps tree I get
org.clojure/clojure 1.10.1
  . org.clojure/spec.alpha 0.2.176
  . org.clojure/core.specs.alpha 0.2.44
com.wsscode/pathom3 <https://github.com/wilkerlucio/pathom3> beaf005
  . com.fulcrologic/guardrails 1.1.4
    . expound/expound 0.8.5
  . com.wsscode/cljc-misc 2021.03.09
  . com.wsscode/log <https://github.com/wilkerlucio/log> 1ac6100
    X com.fulcrologic/guardrails 1.1.3 :older-version
  . org.clojure/core.async 1.3.610
    . org.clojure/tools.analyzer.jvm 1.1.0
      . org.clojure/tools.analyzer 1.0.0
      . org.clojure/core.memoize 1.0.236
        . org.clojure/core.cache 1.0.207
          . org.clojure/data.priority-map 1.0.0
      . org.ow2.asm/asm 5.2
      . org.clojure/tools.reader 1.3.2
  . funcool/promesa 6.0.0
  . edn-query-language/eql 1.0.2
    . org.clojure/spec.alpha 0.2.176
    . org.clojure/core.specs.alpha 0.2.44
  . potemkin/potemkin 0.4.5
    . clj-tuple/clj-tuple 0.2.2
    . riddley/riddley 0.1.12
The only weird thing is the gaurdrails entry. Should my deps reference on gaurdrails directly?

markaddleman 2021-03-09T16:19:02.001900Z

ah, on closer inspection, I see that pathom3 depends on guardrails 1.1.4 and com.wsscode/log depends on 1.1.3. I'm guessing this is the issue? I'm going to figure out how to force a version in deps

wilkerlucio 2021-03-09T16:21:20.002100Z

it shouldn't be an issue to have then in different versions, it should just pick the latest

wilkerlucio 2021-03-09T16:21:46.002300Z

but strange that its listing both on the deps tree

wilkerlucio 2021-03-09T16:21:55.002500Z

tried bumping clojure as well?

wilkerlucio 2021-03-09T16:23:37.002700Z

I got the same output]

wilkerlucio 2021-03-09T16:23:42.002900Z

but I think its only saying that this is not used

wilkerlucio 2021-03-09T16:23:49.003100Z

when I just do clj it opens the REPL fine

wilkerlucio 2021-03-09T16:23:56.003300Z

is that different for you?

markaddleman 2021-03-09T16:28:30.003500Z

Opening a repl is fine but requiring a pathom ns causes a problem:

➜  test-pathom3 clj
Clojure 1.10.1
user=&gt; (require 'com.wsscode.pathom3.connect.built-in.resolvers)
Execution error (FileNotFoundException) at user/eval146 (REPL:1).
Could not locate com/wsscode/pathom3/connect/built_in/resolvers__init.class, com/wsscode/pathom3/connect/built_in/resolvers.clj or com/wsscode/pathom3/connect/built_in/resolvers.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
user=&gt; 

markaddleman 2021-03-09T16:47:57.003700Z

More info: I forked pathom3 and downgraded com.wsscode/cljc-misc to 2021.02.27 (based on nothing but a hunch). I can require a pathom3 namespace successfully. I'll look at cljc-misc and see if something obvious pops out

wilkerlucio 2021-03-09T18:16:46.003900Z

strange, I still can't reproduce your issue

wilkerlucio 2021-03-09T18:16:57.004300Z

this is in a blank folder that only has a deps.edn with pathom3 latest

markaddleman 2021-03-09T19:27:47.004500Z

I wonder if clojars has a corrupted cljc-misc jar? Are you building that locally?

markaddleman 2021-03-09T19:28:16.004700Z

To refute my own theory: I exploded both versions of cljc-misc locally and they look ok

wilkerlucio 2021-03-09T20:33:42.004900Z

I got a repro and fix, check this out:

wilkerlucio 2021-03-09T20:33:46.005100Z

wilkerlucio@Wilkers-MacBook-Pro-2 pathom-simple % rm -rf ~/.m2/repository/com/fulcrologic/guardrails
wilkerlucio@Wilkers-MacBook-Pro-2 pathom-simple % rm -rf ~/.m2/repository/com/wsscode/cljc-misc
wilkerlucio@Wilkers-MacBook-Pro-2 pathom-simple % clj
Clojure 1.10.1
(require 'com.wsscode.pathom3.connect.built-in.resolvers)
Syntax error (FileNotFoundException) compiling at (com/wsscode/pathom3/connect/built_in/resolvers.cljc:1:1).
Could not locate com/fulcrologic/guardrails/core__init.class, com/fulcrologic/guardrails/core.clj or com/fulcrologic/guardrails/core.cljc on classpath.
^Der=&gt;
wilkerlucio@Wilkers-MacBook-Pro-2 pathom-simple % clj
Clojure 1.10.1
^Der=&gt;
wilkerlucio@Wilkers-MacBook-Pro-2 pathom-simple % clj -Stree
Downloading: com/wsscode/cljc-misc/2021.03.09/cljc-misc-2021.03.09.pom from clojars
Downloading: com/fulcrologic/guardrails/1.1.4/guardrails-1.1.4.pom from clojars
Downloading: com/wsscode/cljc-misc/2021.03.09/cljc-misc-2021.03.09.jar from clojars
Downloading: com/fulcrologic/guardrails/1.1.4/guardrails-1.1.4.jar from clojars
...

wilkerlucio 2021-03-09T20:34:01.005400Z

after that, it downloaded things and worked again

wilkerlucio 2021-03-09T20:34:58.005600Z

(first delete guardrails and cljc-misc, all versions, then started CLJ, at that point I was abro to repro your issue)

wilkerlucio 2021-03-09T20:35:18.005800Z

I expected it to download again on a simple clj, it didn't, but it did when I ran clj -Stree

wilkerlucio 2021-03-09T20:35:50.006Z

after that I got back working as normal

markaddleman 2021-03-09T22:14:59.006200Z

Thanks for digging into this! I'm slammed with another task right now but I'll take a look at this tomorrow

markaddleman 2021-03-10T18:25:20.006900Z

I'm just getting back to this. As it turns out, my issue was resolved by rm -rf ~/.gitlibs . Something must have been corrupted in there

wilkerlucio 2021-03-10T18:36:28.007100Z

glad to hear its all back 🙂

👍 1
markaddleman 2021-03-08T19:13:26.065500Z

This is my first time using Pathom Viz (very nice tool, btw!). From what I can tell of the plan, it looks like unformatted-metric-query and formatted-metric-query end up as siblings when I think they one should be a child of the other.

markaddleman 2021-03-08T19:13:48.065700Z

markaddleman 2021-03-08T19:17:47.066800Z

When I try to include the latest pathom3 sha, clj reports the following error:

Error building classpath. Manifest type not detected when finding deps for com.wsscode/pathom3 in coordinate {:git/url "<https://github.com/wilkerlucio/pathom3>", :sha "96fc43469b4f1049dbbdc375d698e1c64e44de01"}

wilkerlucio 2021-03-08T19:27:49.066900Z

strange, just tested on a new project and worked fine, can you try cleaning the .cpcache and trying again?

wilkerlucio 2021-03-08T19:30:57.067100Z

👀

markaddleman 2021-03-08T19:34:07.067300Z

I get the same error 😕

wilkerlucio 2021-03-08T19:35:08.067500Z

seems wrong, will take a closer look later today

👍 1
markaddleman 2021-03-08T19:58:16.067800Z

I tried on a fresh computer and got the same results