This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-22
Channels
- # announcements (39)
- # architecture (9)
- # aws (2)
- # babashka (17)
- # beginners (73)
- # calva (6)
- # cider (27)
- # clj-kondo (140)
- # cljdoc (67)
- # cljsrn (1)
- # clojure (99)
- # clojure-dev (4)
- # clojure-europe (35)
- # clojure-nl (7)
- # clojure-spec (19)
- # clojure-uk (2)
- # clojurescript (40)
- # community-development (3)
- # cursive (10)
- # datalevin (2)
- # datavis (2)
- # datomic (27)
- # deps-new (5)
- # events (2)
- # fulcro (38)
- # integrant (6)
- # jobs (3)
- # keyboards (1)
- # leiningen (13)
- # lsp (3)
- # malli (10)
- # meander (5)
- # membrane (1)
- # membrane-term (9)
- # missionary (3)
- # off-topic (29)
- # polylith (3)
- # reagent (3)
- # reitit (5)
- # remote-jobs (2)
- # reveal (7)
- # shadow-cljs (20)
- # tools-build (4)
- # tools-deps (8)
- # vim (10)
- # xtdb (3)
Were there any further updates on the error complaining about a missing cli-matic? I just tried running locally with Docker, and got the same error Toby did a month ago:
~/Documents/Code/manifold |master:zap:*
❯ docker run --rm \
--volume "$HOME/.m2:/root/.m2" \
--volume /tmp/cljdoc:/app/data \
--entrypoint clojure \
cljdoc/cljdoc -M:cli ingest \
--project manifold/manifold \
--version 0.2.0
Syntax error (FileNotFoundException) compiling at (cljdoc/cli.clj:1:1).
Could not locate cli_matic/core__init.class, cli_matic/core.clj or cli_matic/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
strange
could it be that you have to use -A:
due to an older clojure CLI version?
docker run --rm \
--volume "$HOME/.m2:/root/.m2" \
--volume /tmp/cljdoc:/app/data \
--entrypoint clojure \
cljdoc/cljdoc -A:cli ingest \
--project manifold/manifold \
--version 0.2.0
like thisWell, I can check real quick…
That worked to trigger a download of cli-matic, though it also warned me -A was deprecated.
But I downloaded the Docker image for the first time just a couple hours ago
And did it work in running the ingest?
Yes, once I used -A
(It’s not building my latest local version properly, but that’s at least a new error. It’s building something.)
Oh fuck. No wonder my build’s not picking up the new namespace. manifold has a special override in https://github.com/cljdoc/cljdoc-analyzer/blob/master/resources/config.edn
oh yeah, that would do it
that’s kind of an awful thing to debug, sorry you ran into that!
if you use a different group/artifact id that should solve the issue
and of course we can extend what’s there / remove the special config if that makes sense
Ahh, it wasn’t so bad, I already had my suspicions due to a few oddities here and there. We talked about updating the group ID, but decided against changing it out of historical inertia. If it’s ok with you, I’m prepping a PR for cljdoc to remove the custom handling for manifold, and I’ll modernize it to support cljdoc directly
That sounds great!
Thanks. Hmm, looks like there’s special handling in both cljdoc and cljdoc-analyzer
Feel free to open an issue if its too much
Thanks, that’s pretty nice of you. I think it’ll just take a bit of back-and-forth, since cljdoc refers to a SHA of cljdoc-analyzer.
@kingmob nice! do you want to share a link here? always love to see some things to celebrate in #cljdoc
https://cljdoc.org/d/manifold/manifold/0.2.3/doc/read-me It’s not that different from before, I guess, other than the new ns, but cljdoc makes everything look good 😊
OK, slight update to the missing cli-matic issue. It just happened again, and NOT on manifold. I was updating the docs of my True Grit library, and ran into it again. Manifold shouldn’t be anywhere on the path.
Switching from -M:cli
to -A:cli
once again triggered the cli-matic download and fixed it so I could use -M:cli
, but it’s not a Manifold-specific issue, apparently.
I run cljdoc locally a bunch from docker and haven't yet seen this error. What OS are you on?
btw fyi: noticing that manifold jars scm is pointing back to https://github.com/KingMob/manifold. Is this intentional? Don't you really want: https://github.com/clj-commons/manifold?
@UE21H2HHD I'll take a closer look when I'm back at my laptop later. For now, I think the issue is an initialization one. If you destroy you clj doc docker image, start from scratch, and use one of the docker commands with the -M:cli flag, I suspect that will trigger it
Once cli-matic downloads once via -A, then -M never has any further problems.
Yes, the manifold SCM is wrong, but I was waiting until the next release to fix it
I'll send the precise command later.
> Yes, the manifold SCM is wrong, but I was waiting until the next release to fix it A while back, slipset worked out a flow for deploying from ci, if you are interested I'll find it.
Ah here it is: https://github.com/clj-commons/infra, no doc tho, but here's some example usages: https://grep.app/search?q=circle-maybe-deploy.bb
Back to your issue… I wiped out all of my docker images via:
docker system prune -a --volumes
(drastic, eh? )
Then I tried an ingest:
docker run --rm \
--volume "$HOME/.m2:/root/.m2" \
--volume /tmp/cljdoc:/app/data \
--entrypoint clojure \
cljdoc/cljdoc -M:cli ingest \
--project org.cljdoc/cljdoc-exerciser \
--version 1.0.77
And it seemed to work fine.
I’ll poke around a bit more. Two ideas:
1. there was a concurrent download bug in clojure tools deps… not sure if that was fully fixed.
2. maybe some confusion between docker .cpcache
and mapped .m2
volume.Seems like it is idea 2!
$ rm -rf ~/.m2/repository/cli-matic
$ docker run --rm \
--volume "$HOME/.m2:/root/.m2" \
--volume /tmp/cljdoc:/app/data \
--entrypoint clojure \
cljdoc/cljdoc -M:cli ingest \
--project org.cljdoc/cljdoc-exerciser \
--version 1.0.77
Execution error (FileNotFoundException) at cljdoc.cli/eval138$loading (cli.clj:1).
Could not locate cli_matic/core__init.class, cli_matic/core.clj or cli_matic/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
Full report at:
/tmp/clojure-4303972953105411104.edn
Adding an -Sforce
to recompute the classpath seems to do the trick.
$ docker run --rm \
--volume "$HOME/.m2:/root/.m2" \
--volume /tmp/cljdoc:/app/data \
--entrypoint clojure \
cljdoc/cljdoc -Sforce -M:cli ingest \
--project org.cljdoc/cljdoc-exerciser \
--version 1.0.77
Downloading: cli-matic/cli-matic/0.5.4/cli-matic-0.5.4.pom from clojars
Downloading: cli-matic/cli-matic/0.5.4/cli-matic-0.5.4.jar from clojars
I’ll create a git issue for this, likely just a doc update, but want to think about options.
Ok @kingmob, issue created https://github.com/cljdoc/cljdoc/issues/654, I’ll likely proceed with my proposal of adding -Sforce
to docker cmds in the running locally docs.
Here was the command that gave me errors:
❯ docker run --rm --volume /Users/matthew/Code/TrueGrit:/repo-to-import --volume /Users/matthew/.m2:/root/.m2 --volume /tmp/cljdoc:/app/data --entrypoint clojure cljdoc/cljdoc -M:cli ingest --project net.modulolotus/truegrit --version 1.0.10 --git --rev b191a267cac2566ae3198106086df5d9d87f0d60
Execution error (FileNotFoundException) at cljdoc.cli/eval138$loading (cli.clj:1).
Could not locate cli_matic/core__init.class, cli_matic/core.clj or cli_matic/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
Sounds like you have an idea of what was going on, though
Couple other things: I’m familiar with Erik’s bb deploy script, and we use it for some of Zach’s other old libs, but Manifold and Aleph are still on their own maven group for historical continuity reasons, so it won’t work with them at the moment (lacks the credentials).
I’m not yet aware of any great way to change the group ID in a seamless manner
Glad to hear the bug is found, btw. Lmk if you need anything on my end
Oh! Interesting. Yeah there is currently no way to seamlessly move to a new group-id, but there are https://github.com/clojars/clojars-web/issues/801.
Oooh, one suggestion, while it’s on my mind: As a library author, it’s hard to weave in and out of the https://github.com/cljdoc/cljdoc/blob/master/doc/running-cljdoc-locally.adoc file, since half of it applies to me, and half doesn’t. I think it would be better split into 2 docs, one for lib authors, one for cljdoc devs. Even with a little redundancy between docs, I think it would be way easier to follow.
For rewrite-clj the original author granted me admin access to clojars rewrite-clj so that I could generate deploy tokens.
Yeah @kingmob I agree, thanks for bringing that up. I really struggled when I wrote that doc. And I struggle when I read it. I frankly find the whole previewing locally workflow overly complicated, but we can start with making existing docs easier to follow. I’ll create a separate git issue.
Yeah, Zach gave me all the perms I need on clojars, it’s just that it’s a bunch of work, and potential chaos, all so people can type org.clj-commons/manifold instead of manifold/manifold 😅 It always feels like there’s more important stuff to tackle. I could probably get deployment working with Circle without changing the group id, though
If it helps any, I have some build-clj commands to help get cljdoc running, maybe a gist or some official snippets in the docs could help people out. Plus there’s the whole “Do I push to Github or not?” question
I’ve written bb scripts around previewing locally. https://github.com/clj-commons/rewrite-clj/blob/main/script/cljdoc_preview.clj.
But you are still deploying to manifold/manifold
on https://clojars.org/manifold? No need to switch to org.clj-commons/manifold
?
Yep. Changing the maven group id is pretty low on my todo list.
If there were a great way to let casual dependents know about upcoming changes to aleph/manifold’s group id, it’d be more compelling, but… ¯\(ツ)/¯
@UE21H2HHD I’m gonna sign off for the night (2300 here). Thanks for all your help!
My pleasure, and if you need any help in getting your docs looking great on cljdoc, don’t be shy to ping us!
Ok @kingmob I https://github.com/cljdoc/cljdoc/blob/master/doc/running-cljdoc-locally.adoc. I think this helps, lemme know what you think.
Looks good! Next step is to remove any reason to publish, git push, or mvn install. 😉 Being able to run cljdoc straight on the files would be ideal.
Working directly on files would be convenient, but different from how cljdoc production works today. This might become more natural/possible if/when I get around to supporting git-hosted repositories. Not sure how we can avoid the git push if you want to preview that your links back to GitHub work. At one point I was toying with a 2nd docker image to simulate a GitHub repo locally. That just all got too complicated.
OK, slight update to the missing cli-matic issue. It just happened again, and NOT on manifold. I was updating the docs of my True Grit library, and ran into it again. Manifold shouldn’t be anywhere on the path.
Switching from -M:cli
to -A:cli
once again triggered the cli-matic download and fixed it so I could use -M:cli
, but it’s not a Manifold-specific issue, apparently.
Ok @kingmob, issue created https://github.com/cljdoc/cljdoc/issues/654, I’ll likely proceed with my proposal of adding -Sforce
to docker cmds in the running locally docs.
Ok @kingmob I https://github.com/cljdoc/cljdoc/blob/master/doc/running-cljdoc-locally.adoc. I think this helps, lemme know what you think.