Fork me on GitHub
#polylith
<
2023-03-26
>
tengstrand18:03:39

Hi all! I would like you to start using https://github.com/polyfy/polylith/tree/issue-259 (or evaluate it), commit 1ef60e6 (described https://polylith.gitbook.io/poly/install/install/use-as-dependency if you need some guidance). This version uses https://github.com/borkdude/edamame when reading .clj, .cljc , and .edn files, and it solves some https://clojure.org/guides/reader_conditionals problems we have today, so please check it out before I merge it to master!

2
tengstrand18:03:11

This fix also includes a potential breaking change, if you have create tooling around the output from the internal workspace structure (e.g. by executing poly out:ws.edn). The file-path for bricks and projects, within the :namespaces attribute does no longer start with the path to the workspace, but instead store the relative path to the workspace root (e.x. components/my-component/…). The workspace directory can be found in :ws-dir at the root and the full path can be created by adding this path to the file-path. Old files will still work, and the workspace path will be stripped away.

seancorfield17:03:18

I get

Warning 206: Unreadable namespace in billing-authorizenet: components/billing-authorizenet/src/ws/billing_authorizenet/googlepay/java.clj
with this version (that I do not get with the master version).

seancorfield17:03:21

That's a generated file -- generated from Java API docs to wrap the http://Auth.Net API -- and it's about 12,000 lines, and starts with this

;; The version of jaxb we have right now does some slightly shady
;; things if you don't set this property which causes the JVM to
;; complain about illegal reflection
(System/setProperty "com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize" "true")

;; copyright (c) 2020-2022 world singles networks llc
(ns ws.billing-authorizenet.googlepay.java)

(set! *warn-on-reflection* true)

(do
 (clojure.core/defn
  ARBCancelSubscriptionController
  [G__62823]
  (new
   net.authorize.api.controller.ARBCancelSubscriptionController
   G__62823))
 (clojure.core/alter-meta!
  #'ARBCancelSubscriptionController
  clojure.core/assoc
  :tag
  net.authorize.api.controller.ARBCancelSubscriptionController))
and continues on with several hundred similar do blocks.

seancorfield17:03:10

(so, as it stands, we can't use this version of Polylith)

tengstrand21:03:10

I have found the problem. I will come back when I have a solution.

2
tengstrand05:03:53

Try now @U04V70XH6 1ef60e690297c3f355ac136095fe1b1ae6b1f5fd

seancorfield05:03:17

wsmain$ check
OK
No warning -- good! 🙂

seancorfield05:03:07

wsmain$ info
  stable since: 2a4276a | stable-sean

  projects: 21   interfaces: 140
  bases:    21   components: 143
👍:skin-tone-2:

👍 2
tengstrand07:03:26

The new code will solve a bug also (occurred if (ns was not the first statement in the file). When running poly ws get:components:billing-authorizenet:namespaces:src:googlepay.java:namespace it returned “com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize” instead of “ws.billing-authorizenet.googlepay.java”.

2