cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
lread 2019-07-15T00:00:03.154200Z

oh I won’t go that far.

carkh 2019-07-15T00:00:54.154600Z

just do the garamond clojure call

carkh 2019-07-15T00:01:55.155Z

though part of the pom is generated earlier

carkh 2019-07-15T00:02:04.155300Z

but that should be good enough

lread 2019-07-15T00:02:58.156100Z

so if I do clojure -A:garamond I should get a pom.xml?

carkh 2019-07-15T00:03:03.156300Z

yes

lread 2019-07-15T00:04:13.156700Z

I am getting an error.

Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}

19-07-15 00:01:19 LeeMac.local ERROR [garamond.main:120] - nil
                    clojure.main.main     main.java:   40
                                  ...
                    clojure.main/main      main.clj:  616
                    clojure.main/main      main.clj:  664
                clojure.main/main-opt      main.clj:  514
                   clojure.core/apply      core.clj:  665
                                  ...
                  garamond.main/-main      main.clj:   80
                  garamond.main/-main      main.clj:   81
               garamond.main/-main/fn      main.clj:   83
          garamond.git/current-status       git.clj:   39
              clojure.core/re-matches      core.clj: 4886
              clojure.core/re-matcher      core.clj: 4856
      java.util.regex.Pattern.matcher  Pattern.java: 1093
       java.util.regex.Matcher.<init>  Matcher.java:  229
        java.util.regex.Matcher.reset  Matcher.java:  309
java.util.regex.Matcher.getTextLength  Matcher.java: 1283
java.lang.NullPointerException:

carkh 2019-07-15T00:04:26.156900Z

hum

carkh 2019-07-15T00:05:04.157200Z

"works here" tm =)

carkh 2019-07-15T00:05:18.157500Z

you have the .git directory ?

lread 2019-07-15T00:05:33.158Z

yup just did a simple clone

carkh 2019-07-15T00:05:39.158200Z

garamond uses the tags in your repository

carkh 2019-07-15T00:05:41.158400Z

hum

carkh 2019-07-15T00:06:23.158700Z

what's this lein-git-version thing you have there

carkh 2019-07-15T00:06:41.158900Z

there is no lein in this project !

lread 2019-07-15T00:06:58.159300Z

your point is well taken. :simple_smile:

lread 2019-07-15T00:07:28.159900Z

I do not see any tags, I have the right project? https://github.com/cark/cark.behavior-tree

carkh 2019-07-15T00:08:00.160400Z

oh looks like my tags are not pushed ? I don't know if that's normal or not

carkh 2019-07-15T00:08:53.161200Z

you can generate some with `clojure -A:release patch' ...though this might try to push to github

carkh 2019-07-15T00:09:00.161400Z

i'm new to all this

carkh 2019-07-15T00:09:59.162100Z

how do people doing open source work manage versions and the like ... I4ve been trying to use what i found, but it's all pretty arcane

lread 2019-07-15T00:11:19.162700Z

I don’t think I am helping you much, but you did introduce me to garamond, so thanks for that. :simple_smile:

carkh 2019-07-15T00:11:53.163400Z

good =)

lread 2019-07-15T00:11:54.163500Z

try git push --tags

carkh 2019-07-15T00:13:12.164Z

there you go, the whole sad history of my attempts to make it work has been pushed

lread 2019-07-15T00:13:42.164500Z

don’t forget the joy in the journey :simple_smile:

carkh 2019-07-15T00:13:52.164700Z

yes =)

lread 2019-07-15T00:14:08.165Z

ok, garamond worked after that

carkh 2019-07-15T00:14:26.165300Z

ah i knew it !

carkh 2019-07-15T00:14:49.165700Z

now to confirgure magit to push those tags automatically ><

carkh 2019-07-15T00:18:18.166200Z

looks like that is not recommended, do it one by one is the way to go

lread 2019-07-15T00:21:00.167300Z

I am frankly just learning about deploying with deps.edn proj today! I am testing your project locally now… please hold.

carkh 2019-07-15T00:25:12.168500Z

do you think a project should have the tests enclosed with the clojar jar, or leave those on github ?

lread 2019-07-15T00:25:15.168600Z

worked locally here.

lread 2019-07-15T00:25:17.168800Z

but…

lread 2019-07-15T00:25:34.169300Z

no expound problems.

lread 2019-07-15T00:25:49.170Z

but I created my jar differently than you.

lread 2019-07-15T00:26:03.170400Z

and had to add something to your pom.xml

carkh 2019-07-15T00:26:09.170600Z

oh

carkh 2019-07-15T00:26:16.171Z

the suspense is killing me

lread 2019-07-15T00:26:37.171400Z

I know, stay tuned, and you’ll get the full answer tomorrow.

carkh 2019-07-15T00:26:43.171800Z

haha

lread 2019-07-15T00:26:45.171900Z

sorry

lread 2019-07-15T00:28:09.173400Z

when testing locally, I do a mvn install which simply reads the pom.xml and install to my local ~/.m2 repo.

carkh 2019-07-15T00:28:44.173900Z

yes... i somehow misplaced my mvn command so i didn't test that

lread 2019-07-15T00:29:36.174900Z

and that didn’t work, it created a jar with no source, so I adjusted the pom.xml build section to:

&lt;build&gt;
    &lt;sourceDirectory&gt;src/main&lt;/sourceDirectory&gt;
    &lt;resources&gt;
        &lt;resource&gt;
            &lt;directory&gt;src/main&lt;/directory&gt;
        &lt;/resource&gt;
    &lt;/resources&gt;
  &lt;/build&gt;

carkh 2019-07-15T00:31:20.175800Z

so the resource directory

carkh 2019-07-15T00:31:35.176100Z

or resources

carkh 2019-07-15T00:31:54.176700Z

mhh ok i can accept that, but this cannot be the problem

lread 2019-07-15T00:32:00.176900Z

I think we should look at when ended up on clojars

carkh 2019-07-15T00:32:16.177300Z

i use clojure -A:jar to create the jar

lread 2019-07-15T00:32:40.178Z

and what get uploaded by your deploy step?

carkh 2019-07-15T00:32:48.178200Z

and the jar on clojar has the source code, as it's erroring in the hiccup namespace

carkh 2019-07-15T00:32:56.178400Z

the jar i created is uploaded

lread 2019-07-15T00:33:21.178900Z

I see 2 jars create by -A:jar

carkh 2019-07-15T00:34:10.179700Z

it only creates one here

lread 2019-07-15T00:34:11.179800Z

I’m doing something very similar to you today. I did not need to create a jar.

carkh 2019-07-15T00:34:31.180300Z

how do you upload to clojars ?

lread 2019-07-15T00:34:39.180600Z

mvn deploy

carkh 2019-07-15T00:35:11.181Z

so maven builds the jar and deploys it

lread 2019-07-15T00:35:21.181200Z

ya

lread 2019-07-15T00:35:32.181500Z

I got my inspiration from https://github.com/lambdaisland/kaocha/blob/master/bin/release

lread 2019-07-15T00:36:12.182200Z

your technique might be valid, but it is not the one I used today.

carkh 2019-07-15T00:36:33.182800Z

does your jar file contain the pom.xml ?

carkh 2019-07-15T00:36:38.183100Z

because mine doesn't

lread 2019-07-15T00:37:06.183500Z

the kaocha way the pom.xml gets tracked in github

carkh 2019-07-15T00:38:32.184Z

mhh

lread 2019-07-15T00:39:02.184100Z

yeah, the pom.xml is under META-INF for me.

carkh 2019-07-15T00:39:19.184400Z

ok that might be a good lead

lread 2019-07-15T00:39:21.184500Z

carkh 2019-07-15T00:39:49.185300Z

though i don't understand how circleci picks up changes for my clojure dependency but not expound

lread 2019-07-15T00:40:40.186500Z

I don’t know what is going on there. The error might be misleading.

carkh 2019-07-15T00:40:45.186700Z

ok thanks i'll try to make it work with maven and maybe simplify the whole process

lread 2019-07-15T00:41:26.187500Z

It is working for me. Though garamond still looks interesting to me.

carkh 2019-07-15T00:42:00.188500Z

the goal was to never ever have to manually edit the pom.xml

lread 2019-07-15T00:42:38.189300Z

Yes, and kaocha stuff does not seem to after initial version.

carkh 2019-07-15T00:43:13.190100Z

but see i have a strange bug where blank lines are inserted in my pom.xml, so i opted to recreate it every time

carkh 2019-07-15T00:43:48.190900Z

probably another windows thing =)

lread 2019-07-15T00:43:52.191Z

so you’d start with clojure -Spom add the missing bits manually and automate from there.

lread 2019-07-15T00:43:55.191200Z

oh maybe.

carkh 2019-07-15T00:44:35.191800Z

probably maven can do it all perfectly, i'll dive into that, thanks for the leads !

lread 2019-07-15T00:45:07.192100Z

but i saw something related to that on kaocha…

carkh 2019-07-15T00:46:36.192800Z

ah there you go

carkh 2019-07-15T00:46:47.193300Z

i'll end up with a gigabyte pom =)

lread 2019-07-15T00:47:14.193500Z

where kaocha used sed, you can probably use garamond

carkh 2019-07-15T00:47:32.193900Z

i think garamond does it too

carkh 2019-07-15T00:47:40.194200Z

looks like an underlying bug

lread 2019-07-15T00:47:42.194400Z

that rolls off the tongue nicely: gigabyte pom

carkh 2019-07-15T00:47:43.194500Z

from the jvm

lread 2019-07-15T00:47:51.194700Z

oh right

lread 2019-07-15T00:48:05.195300Z

gotta run for now… my lady is waiting.

carkh 2019-07-15T00:48:06.195400Z

won't roll off my hard drive as nicely =)

carkh 2019-07-15T00:48:16.195700Z

thanks for the help !

lread 2019-07-15T00:48:30.195900Z

hope I did not lead you astray

carkh 2019-07-15T00:48:49.196400Z

need to learn maven properly anyways

carkh 2019-07-15T04:46:09.196900Z

building with maven (and i guess having the pom.xml in the jar) fixed my troubles

martinklepsch 2019-07-15T07:22:57.199900Z

Hey 👋 just read your conversation - if you got things to work with mvn but not with Garamond could you open an issue with instructions how to build pom & jar with each in your project? 🙂

martinklepsch 2019-07-15T09:48:02.200500Z

@lee if you’re open to this idea we could also move the cljdoc-exerciser into the cljdoc GitHub org

lread 2019-07-15T10:30:55.202900Z

@martinklepsch, I am guessing that the mvn/garamond conversation was probably not related to any cljdoc issues.

lread 2019-07-15T10:33:32.205200Z

@martinklepsch I would be happy to transfer cljdoc exerciser to cljdoc. I’ll create a separate git issue for it.

martinklepsch 2019-07-15T10:34:06.205400Z

ok, well you looked into it the most so if you’re think there’s nothing to do on the cljdoc end then fine 🙂

martinklepsch 2019-07-15T10:35:27.205600Z

👍 I’ve definitely wanted to have a testbed project like this before so thanks for making it a thing 🙂

lread 2019-07-15T14:02:24.206600Z

Ok, I raised a handful of cljdoc issues: https://github.com/cljdoc/cljdoc/issues/created_by/lread

lread 2019-07-15T14:04:04.207100Z

Am happy so submit PRs, but some will need a bit of discussion.

carkh 2019-07-15T15:15:53.208300Z

@martinklepsch in thsi project, garamond wasn't involved in the actual building, it was only used as a fancy command line to edit the pom.xml

carkh 2019-07-15T15:16:04.208600Z

@lee thanks for the lead yesterday =)

lread 2019-07-15T15:22:02.209100Z

my pleasure @carkh