This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-08
Channels
- # announcements (1)
- # babashka (28)
- # beginners (13)
- # calva (10)
- # clerk (18)
- # clj-on-windows (39)
- # clj-otel (1)
- # cljdoc (17)
- # clojars (12)
- # clojure (40)
- # clojure-austin (11)
- # clojure-brasil (1)
- # clojure-europe (23)
- # clojure-nl (3)
- # clojure-norway (16)
- # clojure-uk (2)
- # clojurescript (28)
- # clr (4)
- # conjure (1)
- # emacs (14)
- # hoplon (6)
- # hyperfiddle (59)
- # interop (2)
- # leiningen (1)
- # off-topic (37)
- # pathom (1)
- # polylith (5)
- # portal (7)
- # reagent (9)
- # releases (3)
- # shadow-cljs (22)
- # spacemacs (6)
- # tools-build (12)
- # tools-deps (51)
- # web-security (6)
- # xtdb (7)
Small question. I put my changelog in the :cljdoc.doc/tree
vector at the end, but on the website it's pushed to the top. is this a deliberate thing? https://cljdoc.org/d/io.github.noahtheduke/splint/1.4.0/doc/home
Medium question: I'm using a file from resources
in a top-level var: (def version (str/trim (slurp "./resources/SPLINT_VERSION")))
. analysis is failing because of that: https://app.circleci.com/pipelines/github/cljdoc/builder/42020/workflows/11166ef0-b519-46c0-9ed5-7ba82da2d85f/jobs/58395 how do I solve this?
Wrap it in a delay
and deref
it where you need it. Having side-effects in top-level def
s is a bad idea.
oh that's interesting
If you have a def
with side effects, it's going to run whenever that ns is loaded -- including during AOT compilation.
As to why cljdoc is failing on this... if fetch the splint jar from clojars:
wget
And then:
unzip -l splint-1.4.0.jar | grep SPLINT
I see:
6 2023-05-08 09:16 SPLINT_VERSION
Which means SPLINT_VERSION
is not under the ./resources
dir in the split jar, hence the file not found.Also... just happened to notice lotsa .class
files in the splint jar.
If you want folks to use splint as a library this will give headaches. If it is just used as a tool... maybe ok.
You want to read it from the classpath -- and resources
will be part of the classpath. resources/SPLINT_VERSION
is relative to where you run the process on the filesystem (which won't be true in a JAR)
Interesting note about the .class files. how do I avoid that?
Are you building a library or an application here?
Libraries should not have .class
files from Clojure code (only from Java code). Applications typically don't get deployed to Clojars.
You probably should not be compiling files for the JAR: https://github.com/NoahTheDuke/splint/blob/main/build.clj#L32
You're building a standalone uber for local use? And the (thin) library jar for Clojars for folks to depend on?