Fork me on GitHub
#cljdoc
<
2019-07-15
>
lread00:07:03

oh I won’t go that far.

carkh00:07:54

just do the garamond clojure call

carkh00:07:55

though part of the pom is generated earlier

carkh00:07:04

but that should be good enough

lread00:07:58

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

lread00:07:13

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:

carkh00:07:04

"works here" tm =)

carkh00:07:18

you have the .git directory ?

lread00:07:33

yup just did a simple clone

carkh00:07:39

garamond uses the tags in your repository

carkh00:07:23

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

carkh00:07:41

there is no lein in this project !

lread00:07:58

your point is well taken. simple_smile

lread00:07:28

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

carkh00:07:00

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

carkh00:07:53

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

carkh00:07:00

i'm new to all this

carkh00:07:59

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

lread00:07:19

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

lread00:07:54

try git push --tags

carkh00:07:12

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

lread00:07:42

don’t forget the joy in the journey simple_smile

lread00:07:08

ok, garamond worked after that

carkh00:07:26

ah i knew it !

carkh00:07:49

now to confirgure magit to push those tags automatically ><

carkh00:07:18

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

lread00:07:00

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

carkh00:07:12

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

lread00:07:15

worked locally here.

lread00:07:34

no expound problems.

lread00:07:49

but I created my jar differently than you.

lread00:07:03

and had to add something to your pom.xml

carkh00:07:16

the suspense is killing me

lread00:07:37

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

lread00:07:09

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

carkh00:07:44

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

lread00:07:36

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

<build>
    <sourceDirectory>src/main</sourceDirectory>
    <resources>
        <resource>
            <directory>src/main</directory>
        </resource>
    </resources>
  </build>

carkh00:07:20

so the resource directory

carkh00:07:35

or resources

carkh00:07:54

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

lread00:07:00

I think we should look at when ended up on clojars

carkh00:07:16

i use clojure -A:jar to create the jar

lread00:07:40

and what get uploaded by your deploy step?

carkh00:07:48

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

carkh00:07:56

the jar i created is uploaded

lread00:07:21

I see 2 jars create by -A:jar

carkh00:07:10

it only creates one here

lread00:07:11

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

carkh00:07:31

how do you upload to clojars ?

lread00:07:39

mvn deploy

carkh00:07:11

so maven builds the jar and deploys it

lread00:07:12

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

carkh00:07:33

does your jar file contain the pom.xml ?

carkh00:07:38

because mine doesn't

lread00:07:06

the kaocha way the pom.xml gets tracked in github

lread00:07:02

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

carkh00:07:19

ok that might be a good lead

carkh00:07:49

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

lread00:07:40

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

carkh00:07:45

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

lread00:07:26

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

carkh00:07:00

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

lread00:07:38

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

carkh00:07:13

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

carkh00:07:48

probably another windows thing =)

lread00:07:52

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

lread00:07:55

oh maybe.

carkh00:07:35

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

lread00:07:07

but i saw something related to that on kaocha…

carkh00:07:36

ah there you go

carkh00:07:47

i'll end up with a gigabyte pom =)

lread00:07:14

where kaocha used sed, you can probably use garamond

carkh00:07:32

i think garamond does it too

carkh00:07:40

looks like an underlying bug

lread00:07:42

that rolls off the tongue nicely: gigabyte pom

carkh00:07:43

from the jvm

lread00:07:05

gotta run for now… my lady is waiting.

carkh00:07:06

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

carkh00:07:16

thanks for the help !

lread00:07:30

hope I did not lead you astray

carkh00:07:49

need to learn maven properly anyways

carkh04:07:09

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

martinklepsch07:07:57

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? 🙂

martinklepsch09:07:02

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

lread10:07:55

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

martinklepsch10:07:06

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

lread10:07:32

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

martinklepsch10:07:27

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

lread14:07:04

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

carkh15:07:53

@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

carkh15:07:04

@lee thanks for the lead yesterday =)

lread15:07:02

my pleasure @carkh