This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-23
Channels
- # announcements (3)
- # architecture (10)
- # babashka (37)
- # beginners (69)
- # calva (2)
- # cider (10)
- # clerk (22)
- # clj-kondo (33)
- # cljdoc (44)
- # clojure (45)
- # clojure-conj (4)
- # clojure-denmark (7)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (4)
- # clojurescript (10)
- # clr (19)
- # conjure (1)
- # emacs (28)
- # events (1)
- # fulcro (1)
- # jobs (1)
- # joyride (1)
- # lsp (18)
- # malli (30)
- # membrane (3)
- # off-topic (23)
- # pathom (45)
- # portal (29)
- # proletarian (7)
- # rdf (15)
- # re-frame (21)
- # reagent (2)
- # releases (6)
- # remote-jobs (1)
- # reveal (6)
- # shadow-cljs (36)
- # slack-help (7)
- # sql (5)
- # tools-deps (3)
can anyone help me see why I’m getting “We could not find the git repository for your project or link a commit to this release. API docs work regardless of this but consider https://github.com/cljdoc/cljdoc/blob/master/doc/userguide/for-library-authors.adoc#git-sources.” on https://cljdoc.org/builds/65430, for #sicmutils? obviously something is wrong, since clojars also agrees: https://clojars.org/sicmutils
but the scm entry in the pom.xml seems okay? https://gist.github.com/sritchie/226dc7d2e57458e2f84c30ef7e98ae92
hmm, analysis failed too… looks like cljdoc’s analyzer is taking the clj path in the forked macro: https://github.com/sicmutils/sicmutils/blob/main/src/sicmutils/util/def.cljc#L139
Sure @U017QJZ9M7W, I can take a peek!
If I look https://repo.clojars.org/sicmutils/sicmutils/0.23.0/sicmutils-0.23.0.pom, I see the following for scm config:
<scm>
<tag>v0.23.0</tag>
</scm>
The tag
looks good, I see it on the https://github.com/sicmutils/sicmutils/tags, but the other entries are missing from scm
, which means cljdoc (and clojars for that matter) won't know where your sources are.Ok... Clojure analysis is passing. It is ClojureScript analysis that is failing...
Huh, you are attempting import-vars-ish-ness for cljs. At one point, I did have an import-vars version working for cljs. It is buried in the history of rewrite-cljc. But as part of that effort I also updated cljdoc to understand such manipulations for cljs.
(personally, I abandoned load time import-vars due to too many oddities, I got fed up and went for code generation instead)
I'd like to see stuff in cljs passing/working before taking a deeper peek into what might be happening with cljdoc here.
Back to problem 1, https://github.com/sicmutils/sicmutils/blob/02e7a6edaab345e5c6a516f663ecaeb6507cda26/build.clj#L42. That's fine if you also have a pom.xml
that specifies the other scm values, but you don't seem to have that.
Ohhh @UE21H2HHD nice catch. Locally weirdly the entries from my Pom.xml template were making it in, vs getting bumped by what you found. That would have taken me forever to find, thank you!
My pleasure. That's some extensive test suite @U017QJZ9M7W, it is still running...
Close to 7300 and counting
Lots of generative tests too… it is a little nuts for sure
So... dunno yet about the cljs failure. Can take a peek. One diff is that cljdoc uses the plain old ClojureScript compiler, and your test runs under shadow-cljs.
I’m happy to rewrite that macro- I really just want (def something somewhereelse.something) in cljs, nothing fancier
Haha I definitely found other trip reports of clojurists dashed against these surprisingly rocky shores, just like us
Not sure if it is agreeable to you, but you could https://github.com/cljdoc/cljdoc/blob/master/doc/userguide/for-library-authors.adoc#api-languages.
That’s fine, the APIs are the same so I’ll turn it off for now, fix the scm entry and publish an incremental version
Do you want me to file a ticket with the build etc,
You can do it in your https://github.com/sicmutils/sicmutils/blob/main/doc/cljdoc.edn, you have to fix that pom anyway, so would get will get picked in next release.
I don't know much about how shadow-cljs works but I'm thinking that might be the difference. If I try to run sicmutils under plain old (outside cljdoc) ClojureScript I get a similar error.
Okay I can use that info to make a small repro. What command do you use to run it with vanilla cljs?
Lemme get back to you on that. I'm just pasting from other projects to explore. Have to knock the rust off my cljs knowledge, it has been a while!
No problem
Ok, this seems like a maybe a simple way to trigger the issue in sicmutils with plain old ClojureScript:
First, I added a :lee-cljs
alias to sicmutils deps.edn
:lee-cljs
{:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.60"}}}
Then I fired up a REPL using this alias:
❯ clj -M:lee-cljs -m cljs.main --repl-env node
ClojureScript 1.11.60
Then I required the namespace I saw failing on cljdoc to see a similar error:
❯ clj -M:lee-cljs -m cljs.main --repl-env node
ClojureScript 1.11.60
cljs.user=> (require '[pattern.rule :as rule])
Unexpected error (AssertionError) macroexpanding cljs.core/resolve at (def.cljc:140:14).
Assert failed: Argument to resolve must be a quoted symbol
(core/and (seq? quoted-sym) (= (quote quote) (first quoted-sym)))
Very possible I am missing something you are doing via some shadow config...I can make a tiny version of that macro and get a repro up
thanks for this, @UE21H2HHD, I should have some time this evening and I’ll see what the cljs folks think
Here's me naively trying the same thing under shadow-cljs:
❯ npx shadow-cljs node-repl
shadow-cljs - config: /home/lee/proj/oss/sicmutils/sicmutils/shadow-cljs.edn
shadow-cljs - starting via "clojure"
shadow-cljs - server version: 2.20.14 running at
shadow-cljs - nREPL server started on port 32805
cljs.user=> shadow-cljs - #4 ready!
cljs.user=> (require '[pattern.rule :as rule])
nil
Lemme know how it goes. If you are really married to roughing the choppy seas with an import-vars type approach, I can dig up my old rewrite-cljc work for you.
I have to do it to give folks a namespace that has everything , so they can use it as a replacement for the original scheme library… and MIT scheme has no namespaces at all
@U017QJZ9M7W interesting recent https://clojurians.slack.com/archives/CQT1NFF4L/p1674180518666799 about import-vars that might interest you