@dominicm So you say this issue was fixed in the last 24 hours? I ran the cljdoc generation yesterday when the error happened.
That commit was a month ago.
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
If that was (:require ["react" :as react]
I think it would work.
(at least, as I'm understanding the change that was made in that commit above)
@seancorfield No, that commit is to adjust for non-string requires of react.
Ah, OK. So... why is awb99's build failing?
No idea. I ran out of time while looking into it.
Hm, that issue is odd indeed.
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 "<https://repo.clojars.org/org/pinkgorilla/gorilla-ui/0.1.66/gorilla-ui-0.1.66.jar>", :pompath "<https://repo.clojars.org/org/pinkgorilla/gorilla-ui/0.1.66/gorilla-ui-0.1.66.pom>", :repos {"clojars" {:url "<https://repo.clojars.org/>"}, "central" {:url "<https://repo.maven.apache.org/maven2/>"}}}'
But as @dominicm pointed out react
should be shimmed.
@hoertlehner would you mind opening an issue in the repo mentioned above so we don’t lose track of this?
@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)
@seancorfield there’s no open issues related to this after we thought we fixed them all 😄
@martinklepsch yeah I did, it didn't fix it unfortunately.
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.
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.
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")
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.
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 :)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 "<https://repo.clojars.org/exoscale/coax/1.0.0-alpha4/coax-1.0.0-alpha4.jar>", :pompath "<https://repo.clojars.org/exoscale/coax/1.0.0-alpha4/coax-1.0.0-alpha4.pom>", :repos {"clojars" {:url "<https://repo.clojars.org/>"}, "central" {:url "<https://repo.maven.apache.org/maven2/>"}}}'
I think there is an open issue for it
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. @fabien.rozar might know more
It might be my fault from printlns
oh, no, it reads from a file, so probably not that
Yeah, real problem.
The problem is that ana/analyze-file calls "with-compiler-env" :(
Some of the output files are:
{:publics ()}
{:publics ()}
{:publics ()}
{:publics ()}
{:publics ()}
{:publics ()}
{:publics ()}
{:publics ()}
Going to inject the ns-name in and see what happens :)
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
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
https://github.com/pink-gorilla/gorilla-ui/blob/master/src/pinkgorilla/controls/tab.cljs haha :)
this would be why!
@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?
> 2020-06-10 22:52:35,214 INFO cljdoc-analyzer.runner - Analysis succeeded. Oh yeah :) Now I can go to bed