Fork me on GitHub
#datomic
<
2020-02-13
>
joshkh22:02:21

i'm having trouble requiring com.datomic/client-cloud {:mvn/version "0.8.81"}:

Clojure 1.10.1
(require '[datomic.client.api :as d])
Execution error - invalid arguments to datomic.client.api/loading at (api.clj:16).
:as - failed: #{:exclude} at: [:exclude :op :quoted-spec :spec]
:as - failed: #{:only} at: [:only :op :quoted-spec :spec]
:as - failed: #{:rename} at: [:rename :op :quoted-spec :spec]
(quote :as) - failed: #{:exclude} at: [:exclude :op :spec]
(quote :as) - failed: #{:only} at: [:only :op :spec]
(quote :as) - failed: #{:rename} at: [:rename :op :spec]
the previous version com.datomic/client-cloud {:mvn/version "0.8.78"} seems fine:
Clojure 1.10.1
(require '[datomic.client.api :as d])
=> nil

ghadi22:02:06

@joshkh can you paste your whole clojure -Stree ?

ghadi22:02:27

Cmd-Shift-Enter will open up the snippet paste in slack

ghadi22:02:22

you can redact whatever proprietary stuff you have

joshkh22:02:33

clj -Adev -Stree

ghadi22:02:18

are you running a repl with clj/ clojure ? I don't see the repl prompt appear before the require

ghadi22:02:26

clojure -Sdeps '{:deps {com.datomic/client-cloud {:mvn/version "0.8.81"}}}'
Clojure 1.10.1
user=> (require '[datomic.client.api :as d])

ghadi22:02:44

you should try running ^ outside your project

joshkh22:02:37

sorry, used clojure -Adev -Stree in my code paste. i'll try your next suggestion now.

joshkh22:02:03

$ clojure -Sdeps '{:deps {com.datomic/client-cloud {:mvn/version "0.8.81"}}}'
Clojure 1.10.1
user=> (require '[datomic.client.api :as d])
Execution error - invalid arguments to datomic.client.api/loading at (api.clj:16).
:as - failed: #{:exclude} at: [:exclude :op :quoted-spec :spec]
:as - failed: #{:only} at: [:only :op :quoted-spec :spec]
:as - failed: #{:rename} at: [:rename :op :quoted-spec :spec]
(quote :as) - failed: #{:exclude} at: [:exclude :op :spec]
(quote :as) - failed: #{:only} at: [:only :op :spec]
(quote :as) - failed: #{:rename} at: [:rename :op :spec]
user=>

ghadi22:02:32

just to confirm, can you paste your -Stree again but using ^ outside your project?

joshkh22:02:44

wait, outside of my project it works

ghadi22:02:54

yeah that's what I suspected

joshkh22:02:04

did i break my toys?

ghadi22:02:11

without knowing what -Adev is doing, it's hard to say

joshkh22:02:38

:aliases   {:dev {:extra-deps {com.datomic/client-cloud {:mvn/version "0.8.81"}
                                com.datomic/ion          {:mvn/version "0.9.35"}
                                com.datomic/ion-dev      {:mvn/version "0.9.251"}}}}

ghadi22:02:43

you have some stray directories / AOT in your main project?

ghadi22:02:00

what's in :paths

ghadi22:02:14

(just a lark...)

joshkh22:02:38

just some benign files in /resources. :paths ["src/clj" "resources"]

ghadi22:02:47

class files?

joshkh22:02:35

i'm stumped 🙂

ghadi22:02:55

they changed recently

joshkh23:02:31

yup, and no dice:

(ns genpo.client
  (:require [datomic.client.api :as d]))

Clojure 1.10.1
Loading src/clj/genpo/client.clj... 
Syntax error (ExceptionInfo) compiling at (src/clj/genpo/client.clj:1:1).
Call to clojure.core/refer-clojure did not conform to spec.

ghadi23:02:44

if it works outside your project @joshkh I'd try to debug your project classpath

ghadi23:02:53

can't repro it over here

joshkh23:02:05

you got it. thanks @ghadi for your help!

ghadi23:02:10

and your deps looked correct

ghadi23:02:30

ion-dev should definitely be in .clojure/deps.edn

joshkh23:02:51

yes - i've moved it there. thanks for the tip.