This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-08
Channels
- # announcements (42)
- # aws (2)
- # babashka (69)
- # beginners (38)
- # calva (18)
- # cider (39)
- # circleci (1)
- # clj-commons (10)
- # cljs-dev (2)
- # clojure (36)
- # clojure-australia (14)
- # clojure-europe (25)
- # clojure-gamedev (40)
- # clojure-losangeles (4)
- # clojure-nl (5)
- # clojure-sweden (1)
- # clojure-uk (5)
- # clojurescript (133)
- # core-logic (24)
- # cursive (7)
- # datalevin (4)
- # datascript (3)
- # figwheel-main (1)
- # fulcro (45)
- # honeysql (1)
- # integrant (43)
- # introduce-yourself (1)
- # jobs (4)
- # leiningen (3)
- # lsp (32)
- # nextjournal (9)
- # pathom (18)
- # polylith (21)
- # portal (65)
- # re-frame (6)
- # releases (1)
- # remote-jobs (1)
- # reveal (12)
- # rewrite-clj (1)
- # sci (84)
- # tools-deps (22)
Adding javax.xml.namespace.NamespaceContext
and javax.xml.namespace.QName
gets the jar task further, but then complains about definiline
in clojure/data/xml/jvm/name.clj:35:2
Instead of adding this class add the namespaces that tools build loads from data.xml to bb
in other words: these two: https://github.com/clojure/tools.build/blob/master/src/main/clojure/clojure/tools/build/tasks/write_pom.clj#L14-L15
I’ve added them to the ns
forms, but still get the same complaint. I’m not understanding how these changes should be solving the issue. Do I need to add a ns map for clojure.data.xml.jvm.name
, copy decode-uri
to it, and then add the namespace map to the feature import in main.clj
?
> I’m not understanding how these changes should be solving the issue. This will bake in those namespaces into bb rather than bb trying to load these namespaces from source which causes the issue you were seeing
The clojure/data/xml/jvm/name.clj
namespace shouldn't even be loaded by bb, because tools.build is just loading xml.tree
and xml.event
. So it should stop there once you have baked those in and the error from jvm/name.clj
should disappear.
ok, so that gets us further. now Unable to resolve classname: org.eclipse.aether.RepositorySystem
I’m assuming you don’t want that in bb
clojure.data.xml.event actually extends a couple of protocols - are those extensions pulled in automatically somehow?
should be. but to extend the protocol further in user space, requires more config. do you have more details?
I’ve added the utils.maven, and now get Unable to resolve classname: clojure.data.xml.node.Element
,
@U0HFRSY0M I see in the tools build code that it does an instance check for this class
ok, we can add those. the tool provider stuff can probably be replaced by just shelling out to java
I think a wrapper might be best. Maybe use mranderson to pull in build.tools and then just implement compile-clj, install, and javac, and use build.tools for the rest?
You can create it, we can decide later if we want to host in under the babashka org or not
Am i overlooking something? I’m trying to unzip a file and passing the option to overwrite the existing, but i’m getting an error that the file already exists
user=> (fs/unzip zip-download "/Users/dan/bin/clojure-lsp" {:replace-existing true})
java.nio.file.FileAlreadyExistsException: /Users/dan/bin/clojure-lsp [at <repl>:63:1]
According to the tests it should work... https://github.com/babashka/fs/blob/d3dfbd6832ba819340f4d494cca3d55b38870cdf/test/babashka/fs_test.clj#L410-L413
and presumably if the files have the same name (regardless of case) the copy attribute should do its job since they are the same file
user=> (fs/unzip "02-cpu-flamegraph-2020-06-28-13-15-27.svg.zip" ".")
java.nio.file.FileAlreadyExistsException: ./02-cpu-flamegraph-2020-06-28-13-15-27.svg [at <repl>:1:1]
user=> (fs/unzip "02-cpu-flamegraph-2020-06-28-13-15-27.svg.zip" "." {:replace-existing true})
nil