Fork me on GitHub
#datomic
<
2021-12-03
>
jacekschae21:12:19

I’m working on the last part of the Learn Datomic course and I encountered strange thing with {:op :push} I have my `.clojure/deps.edn` as follows:

{:mvn/repos
 {"datomic-cloud" {:url ""}
  "cognitect-dev-tools" {:url ""}}
 
 :aliases
 {:ion-dev
  {:deps {com.datomic/ion-dev {:mvn/version "1.0.294"}}
   :main-opts ["-m" "datomic.ion.dev"]}}}
When I push with this deps.edn project using clj -A:prod:ion-dev '{:op :push}'
{:paths
 ["src/main" "src/resources"]

 :mvn/repos
 {"datomic-cloud" {:url ""}}

 :deps
 {org.clojure/clojure {:mvn/version "1.10.3"}
  ring/ring {:mvn/version "1.9.4"}
  integrant/integrant {:mvn/version "0.8.0"}
  metosin/reitit {:mvn/version "0.5.15"}
  clj-http/clj-http {:mvn/version "3.12.3"}
  ovotech/ring-jwt {:mvn/version "2.2.1"}}

 :aliases
 {:dev
  {:extra-paths ["src/dev"]
   :extra-deps {com.datomic/dev-local {:mvn/version "0.9.235"}
                integrant/repl {:mvn/version "0.3.2"}}}

  :test
  {:extra-paths ["src/test"]
   :extra-deps {com.datomic/dev-local {:mvn/version "0.9.235"}
                ring/ring-mock {:mvn/version "0.4.0"}
                integrant/repl {:mvn/version "0.3.2"}}}

  :prod
  {:extra-deps {com.datomic/ion {:mvn/version "1.0.57"}
                com.datomic/client-cloud {:mvn/version "1.0.117"}}}}}
I get following error
Downloading: com/datomic/ion/1.0.56/ion-1.0.56.jar from 
{:command-failed "{:op :push}",
 :causes
 ({:message
   "Could not find artifact com.datomic:ion:jar:1.0.56 in central ()",
   :class ExceptionInfo,
   :data
   {:lib com.datomic/ion,
    :coord {:mvn/version "1.0.56", :deps/manifest :mvn}}})}
When i move the `:prod` :`extra-deps` to `:deps` it works and i can push, it creates the revision and everything is fine. Is there a way I can push this with :prod alias and not put the com.datomic/ion and com.datomic/client-clooud in :deps?

xceno21:12:51

I had a similar issue last year, back then it was a limitation or bug in tools.deps where aliases will be ignored on push (at least that's how I remember it) Could as well be the same issue for you.

jacekschae21:12:42

Thanks for the information. @U064X3EF3 are you aware of this, is this still the limitation?

Alex Miller (Clojure team)21:12:53

Not positive, but probably

jacekschae22:12:22

okay … so what’s the recommendation here? Is this mentioned anywhere in the docs?

Jarrod Taylor (Clojure team)00:12:40

We will look into this and get back to you @U8A5NMMGD

👍 1
xceno21:12:15

Has anybody ever used dtype-next in a datomic ion? I'm trying to deploy my ion right now and I get an Syntax error macroexpanding at ... whenever clj comes across a dtype-next/->tensor call. Here's the inner exception:

DatomicCoreAnomaliesException": {
                        "Via": [
                            {
                                "Type": "clojure.lang.Compiler$CompilerException",
                                "Message": "Syntax error macroexpanding at (redacted.cljc:136:6).",
                                "Data": {
                                    "ClojureErrorPhase": "Execution",
                                    "ClojureErrorLine": 136,
                                    "ClojureErrorColumn": 6,
                                    "ClojureErrorSource": "redacted.cljc"
                                },
                                "At": [
                                    "clojure.lang.Compiler$InvokeExpr",
                                    "eval",
                                    "Compiler.java",
                                    3711
                                ]
                            },
                            {
                                "Type": "java.lang.ArrayIndexOutOfBoundsException",
                                "Message": "Index 0 out of bounds for length 0",
                                "At": [
                                    "tech.v3.tensor.dimensions.global_to_local$elem_idx__GT_addr_fn",
                                    "invokeStatic",
                                    "global_to_local.clj",
                                    34
                                ]
                            }
                        ],
and the apparently offending line: https://github.com/cnuernber/dtype-next/blob/master/src/tech/v3/tensor/dimensions/global_to_local.clj#L34

Drew Verlee04:12:28

what is dype-next?

Drew Verlee04:12:43

i don't see why not? thats more about that jvm then datomic's persistence layer.

Drew Verlee04:12:54

so this is probably relevent Support for JDK-8 through JDK-17+ - JDK-16 is no longer supported. For jdk-17 usage, please see project.clj for required flags.