Fork me on GitHub
#portal
<
2023-03-15
>
tengstrand06:03:41

I currently use portal 0.35.1 in the poly tool. This is specified in the https://github.com/polyfy/polylith/blob/master/components/tap/deps.edn component and used by the https://github.com/polyfy/polylith/blob/master/projects/poly/deps.edn project. If cloning the code, you will be able to start a shell from the root of the repository (called a workspace in Polylith terms) and execute clojure -M:poly . If I change the version to 0.37.0 and try again, I get this error: *$~*/so/*polylith* clojure -M:poly 1 err 11s 07:21:12 Execution error (ClassNotFoundException) at .URLClassLoader/findClass (URLClassLoader.java:435). com.google.gson.stream.JsonReader Full report at: /var/folders/q7/ky18vssj6jz0mhfr8lcv1xzh0000gp/T/clojure-4494528380173068312.edn

seancorfield06:03:41

Sounds like a conflict in a transitive dependency between what Polylith depends on and what Portal depends on.

seancorfield06:03:04

Hmm, no, I actually think there might be a problem with the Portal 0.37.0 artifact...

> clojure -Sdeps '{:deps {djblue/portal {:mvn/version "0.37.0"}}}' -Stree
org.clojure/clojure 1.11.1
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
djblue/portal 0.37.0
whereas
> clojure -Sdeps '{:deps {djblue/portal {:mvn/version "0.36.0"}}}' -Stree
org.clojure/clojure 1.11.1
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
djblue/portal 0.36.0
  . org.clojure/data.json 2.4.0
  . com.cognitect/transit-cljs 0.8.280
    . com.cognitect/transit-js 0.8.874
  . com.cognitect/transit-clj 1.0.329
    . com.cognitect/transit-java 1.0.362
      . com.fasterxml.jackson.core/jackson-core 2.8.7
      . org.msgpack/msgpack 0.6.12
        . com.googlecode.json-simple/json-simple 1.1.1
        . org.javassist/javassist 3.18.1-GA
      . javax.xml.bind/jaxb-api 2.3.0
  . com.google.code.gson/gson 2.10
  . http-kit/http-kit 2.6.0
So the transitive dependencies appear to be missing. I think we haven't noticed this because we have other libs that bring in those dependencies?

tengstrand06:03:42

Okay thanks. Let’s see what @U1G869VNV says.

seancorfield06:03:26

And that's really weird since the pom.xml in the JAR seems to have those dependencies...

seancorfield06:03:21

You should be able to use 0.36.0 -- the deps seem to work for that.

👍 2
Michael W15:03:19

I am also seeing issues with transitive deps on 0.37.0 and have reverted to 0.36.0 to fix the issue.

djblue15:03:52

Thanks for catching this. I think I was generating a bad pom.xml, https://github.com/djblue/portal/commit/ca290e2f127379f4f9af8c4846bc286fae4d0f78 should fix the issue. Deploying the fix now.

djblue15:03:46

clojure -Sdeps '{:deps {djblue/portal {:mvn/version "0.37.1"}}}' -Stree works for me now 👍

tengstrand15:03:50

Now it works, thanks!

awesome 2
seancorfield16:03:42

@U1G869VNV why not use tools.build to generate the pom.xml file (from a template file with all the non-dependency data in it)?

djblue16:03:40

I think the main thing I needed was to https://github.com/djblue/portal/blob/master/dev/tasks/info.clj#L17-L23 to make cljdoc happy which I wasn't able to do previously with tools.build

seancorfield16:03:43

Hmm, that's come up a couple of times... I'm not sure whether the better solution is for cljdoc to provide a way to "teach" it about additional dependencies needed for analysis, or for tools.build to support <scope> somehow... Might be worth posting on http://ask.clojure.org about creating pom.xml files with test/provided scope deps to support other tooling?

👍 2
seancorfield06:03:04
replied to a thread:I currently use portal `0.35.1` in the poly tool. This is specified in the https://github.com/polyfy/polylith/blob/master/components/tap/deps.edn component and used by the https://github.com/polyfy/polylith/blob/master/projects/poly/deps.edn project. If cloning the code, you will be able to start a shell from the root of the repository (called a workspace in Polylith terms) and execute `clojure -M:poly` . If I change the version to `0.37.0` and try again, I get this error: `*$~*/so/*polylith* clojure -M:poly 1 err 11s 07:21:12` `Execution error (ClassNotFoundException) at <http://java.net|java.net>.URLClassLoader/findClass (URLClassLoader.java:435).` `com.google.gson.stream.JsonReader` `Full report at:` `/var/folders/q7/ky18vssj6jz0mhfr8lcv1xzh0000gp/T/clojure-4494528380173068312.edn`

Hmm, no, I actually think there might be a problem with the Portal 0.37.0 artifact...

> clojure -Sdeps '{:deps {djblue/portal {:mvn/version "0.37.0"}}}' -Stree
org.clojure/clojure 1.11.1
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
djblue/portal 0.37.0
whereas
> clojure -Sdeps '{:deps {djblue/portal {:mvn/version "0.36.0"}}}' -Stree
org.clojure/clojure 1.11.1
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
djblue/portal 0.36.0
  . org.clojure/data.json 2.4.0
  . com.cognitect/transit-cljs 0.8.280
    . com.cognitect/transit-js 0.8.874
  . com.cognitect/transit-clj 1.0.329
    . com.cognitect/transit-java 1.0.362
      . com.fasterxml.jackson.core/jackson-core 2.8.7
      . org.msgpack/msgpack 0.6.12
        . com.googlecode.json-simple/json-simple 1.1.1
        . org.javassist/javassist 3.18.1-GA
      . javax.xml.bind/jaxb-api 2.3.0
  . com.google.code.gson/gson 2.10
  . http-kit/http-kit 2.6.0
So the transitive dependencies appear to be missing. I think we haven't noticed this because we have other libs that bring in those dependencies?