Fork me on GitHub
#cljdoc
<
2020-06-10
>
awb9904:06:32

@dominicm So you say this issue was fixed in the last 24 hours? I ran the cljdoc generation yesterday when the error happened.

seancorfield05:06:02

That commit was a month ago.

seancorfield05:06:59

The problem is that Reagent 0.10.0 doesn't use a string require for React, so cljdoc thinks it's a normal dependency https://github.com/reagent-project/reagent/blob/v0.10.0/src/reagent/core.cljs#L4

seancorfield05:06:25

If that was (:require ["react" :as react] I think it would work.

seancorfield05:06:58

(at least, as I'm understanding the change that was made in that commit above)

dominicm08:06:26

@seancorfield No, that commit is to adjust for non-string requires of react.

seancorfield08:06:02

Ah, OK. So... why is awb99's build failing?

dominicm08:06:33

No idea. I ran out of time while looking into it.

martinklepsch16:06:44

Hm, that issue is odd indeed.

martinklepsch16:06:09

Running this in https://github.com/cljdoc/cljdoc-analyzer reproduces the problem

clj -m cljdoc-analyzer.cljdoc-main '{:project "org.pinkgorilla/gorilla-ui", :version "0.1.66", :jarpath "", :pompath "", :repos {"clojars" {:url ""}, "central" {:url ""}}}'

martinklepsch16:06:37

But as @dominicm pointed out react should be shimmed.

martinklepsch16:06:42

@hoertlehner would you mind opening an issue in the repo mentioned above so we don’t lose track of this?

martinklepsch16:06:12

@dominicm did you by any chance test this with your deps.cljs fork (which I haven’t had a chance to look at yet unfortunately)

martinklepsch16:06:54

@seancorfield there’s no open issues related to this after we thought we fixed them all 😄

🙂 4
dominicm17:06:00

@martinklepsch yeah I did, it didn't fix it unfortunately.

dominicm17:06:55

I did narrow it down to being the result of analyzing a file which required reagent, but didn't go further than that. react was definitely in the js dependency index though. It might be that it goes elsewhere too, I've been hacking a bit on cljs lately, so this might be a fun one to dig into if I find time/energy.

👍 4
dominicm21:06:26

after much fiddling, I figured out how to use a custom build of clojurescript. I'll slowly hack on this as I find a few minutes in the evening.

dominicm21:06:03

Somehow our js-dependency-index is being lost, here's the keys we end up with (excluding goog*) ("fake.BaseClass" "proto2.TestAllTypes" "proto2.TestAllTypes.RepeatedGroup" "proto2.TestAllTypes.NestedMessage" "someprotopackage.TestPackageTypes" "fake.ChildClass" "proto2.TestDefaultChild" "proto2.TestAllTypes.NestedEnum" "proto2.TestAllTypes.OptionalGroup" "proto2.TestDefaultParent")

dominicm21:06:42

The call to analyze-file should be (ana/analyze-file state file nil), by not passing a state, it defaults to a fresh, empty, state.

martinklepsch21:06:24

I remember reviewing this and remember something like if you use with-state (or whatever its called) you don’t need to explicitly pass it. @UQHFZ5EBE might know more

dominicm21:06:33

The problem is that ana/analyze-file calls "with-compiler-env" :(

dominicm21:06:06

Getting this now:

2020-06-10 22:34:02,728 ERROR cljdoc-analyzer.runner - Spec assertion failed
{:publics ()} - failed: (contains? % :name) in: [:analysis "cljs" 1 0] at: [:analysis 1] spec: :cljdoc.analysis/namespace
might be my hacking though :)

martinklepsch21:06:24

Noticed a similar error before but couldn’t quite figure out what’s causing it, this was with

clj -m cljdoc-analyzer.cljdoc-main '{:project "exoscale/coax", :version "1.0.0-alpha4", :jarpath "", :pompath "", :repos {"clojars" {:url ""}, "central" {:url ""}}}'

martinklepsch21:06:36

I think there is an open issue for it

dominicm21:06:32

It might be my fault from printlns

dominicm21:06:48

oh, no, it reads from a file, so probably not that

dominicm21:06:47

Yeah, real problem.

dominicm21:06:29

Some of the output files are:

{:publics ()}
         {:publics ()}
         {:publics ()}
         {:publics ()}
         {:publics ()}
         {:publics ()}
         {:publics ()}
         {:publics ()}

dominicm21:06:09

Going to inject the ns-name in and see what happens :)

dominicm21:06:52

Okay, so… guessing ahead of time that it's related to this: DoneWARNING: JavaScript file found on classpath for library leaflet, but does not contain a corresponding goog.provide declaration: jar:file:/tmp/cljdoc-org.pinkgorilla-gorilla-ui-0.1.6616162605126260294040/downloaded.jar!/leaflet.js WARNING: JavaScript file found on classpath for library leaflet, but does not contain a corresponding goog.provide declaration: jar:file:/tmp/cljdoc-org.pinkgorilla-gorilla-ui-0.1.6616162605126260294040/downloaded.jar!/leaflet.js

dominicm21:06:17

Woah, what the:

{:publics (), :ns cljs.user.alert9CC2A73} - failed: (contains? % :name) in: [:analysis "cljs" 1 0] at: [:analysis 1] spec: :cljdoc.analysis/namespace
{:publics (), :ns cljs.user.tab87C64B4} - failed: (contains? % :name) in: [:analysis "cljs" 1 1] at: [:analysis 1] spec: :cljdoc.analysis/namespace
{:publics (), :ns cljs.user.modal1423A26} - failed: (contains? % :name) in: [:analysis "cljs" 1 2] at: [:analysis 1] spec: :cljdoc.analysis/namespace
{:publics (), :ns cljs.user.sidebar3B38213} - failed: (contains? % :name) in: [:analysis "cljs" 1 3] at: [:analysis 1] spec: :cljdoc.analysis/namespace
{:publics (), :ns cljs.user.dropdown94C22E7} - failed: (contains? % :name) in: [:analysis "cljs" 1 4] at: [:analysis 1] spec: :cljdoc.analysis/namespace
{:publics (), :ns cljs.user.description_listF24A57B} - failed: (contains? % :name) in: [:analysis "cljs" 1 5] at: [:analysis 1] spec: :cljdoc.analysis/namespace
{:publics (), :ns cljs.user.menu74859A5} - failed: (contains? % :name) in: [:analysis "cljs" 1 6] at: [:analysis 1] spec: :cljdoc.analysis/namespace
{:publics (), :ns cljs.user.badgeB08BC2D} - failed: (contains? % :name) in: [:analysis "cljs" 1 7] at: [:analysis 1] spec: :cljdoc.analysis/namespace

dominicm21:06:06

this would be why!

dominicm06:06:08

coax is different, that's failing on a file that's non-empty

dominicm21:06:38

@martinklepsch to handle the empty file problem, I propose that we just don't return anything at all if we can't find the ns after analysis. How does that sound?

dominicm21:06:44

> 2020-06-10 22:52:35,214 INFO cljdoc-analyzer.runner - Analysis succeeded. Oh yeah :) Now I can go to bed