Fork me on GitHub
#datomic
<
2021-03-04
>
esp119:03:48

I'm having trouble installing the ion-dev tools as per https://docs.datomic.com/cloud/operation/howto.html#ion-dev. It looks like it's not able to retrieve the ion maven artifacts. When I run clj in the root of the ion-starter project, I get:

➜  ion-starter git:(master) ✗ clj
Downloading: com/datomic/ion/0.9.50/ion-0.9.50.pom from datomic-cloud
Downloading: com/datomic/ion/0.9.50/ion-0.9.50.jar from datomic-cloud
Error building classpath. Could not find artifact com.datomic:ion:jar:0.9.50 in central ()
My $HOME/.clojure/deps.edn looks like:
{
  :aliases {
    :ion-dev {:deps {com.datomic/ion-dev {:mvn/version "0.9.282"}}
              :main-opts ["-m" "datomic.ion.dev"]}
  }
  :mvn/repos {
    "datomic-cloud" {:url ""}
  }
}
What am I doing wrong?

Robert A. Randolph19:03:16

https://clojure.org/reference/deps_and_cli#_maven_s3_repos This will provide further information for how to properly source credentials depending on which/where.

mikejcusack20:03:21

Can you try clj -M:ion-dev from your actual project?

esp120:03:32

@U01NYKKE69G that gives me the same error..

esp120:03:01

My understanding from the instructions was that the only role I needed to add was the Datomic Administrator Policy, but when I look in that policy it doesn't provide access to the bucket. Should it?

mikejcusack20:03:22

The bucket isn't yours

esp120:03:37

That's true. I'm wondering how I'm supposed to get permission to read from it?

mikejcusack20:03:15

Is that your full deps.edn or just a snippet?

mikejcusack20:03:50

And you can aws s3 ls ?

esp120:03:48

that's the full deps.edn, with comments elided. i can run aws s3 ls and it shows me my own buckets.

mikejcusack20:03:39

Try clj -M:ion-dev in a new repl. The error above isn't even for ion-dev, but ion.

esp120:03:32

I tried it in a blank directory w/no deps.edn and I get the same error

mikejcusack20:03:30

Running the command I provided?

esp120:03:38

well, not exactly the same. i get this:

WARNING: Use of :deps in aliases is deprecated - use :replace-deps instead
Downloading: com/datomic/ion-dev/0.9.282/ion-dev-0.9.282.pom from datomic-cloud
Downloading: com/datomic/ion-dev/0.9.282/ion-dev-0.9.282.jar from datomic-cloud
Error building classpath. Could not find artifact com.datomic:ion-dev:jar:0.9.282 in central ()

esp120:03:51

yes, clj -M:ion-dev

mikejcusack20:03:54

So that's not the same error, but similar

mikejcusack20:03:15

Which version of cli tools are you running?

esp120:03:36

➜  tmp git:(master) clj --version
Clojure CLI version 1.10.2.796

mikejcusack20:03:50

@U064X3EF3 Does this make any sense to you?

mikejcusack20:03:40

Can you provide the full home deps.edn?

esp120:03:52

;; The deps.edn file describes the information needed to build a classpath.
;;
;; When using the `clojure` or `clj` script, there are several deps.edn files
;; that are combined:
;; - install-level
;; - user level (this file)
;; - project level (current directory when invoked)
;;
;; For all attributes other than :paths, these config files are merged left to right.
;; Only the last :paths is kept and others are dropped.

{
  ;; Paths
  ;;   Directories in the current project to include in the classpath

  ;; :paths ["src"]

  ;; External dependencies
 
  ;; :deps {
  ;;   org.clojure/clojure {:mvn/version "1.9.0"}
  ;; }

  ;; Aliases
	;;   resolve-deps aliases (-R) affect dependency resolution, options:
	;;     :extra-deps - specifies extra deps to add to :deps
	;;     :override-deps - specifies a coordinate to use instead of that in :deps
	;;     :default-deps - specifies a coordinate to use for a lib if one isn't found
	;;   make-classpath aliases (-C) affect the classpath generation, options:
	;;     :extra-paths - vector of additional paths to add to the classpath
	;;     :classpath-overrides - map of lib to path that overrides the result of resolving deps

  ;; :aliases {
  ;;   :deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.5.442"}}}
  ;;   :test {:extra-paths ["test"]}
  ;; }

  :aliases {
    :ion-dev {:deps {com.datomic/ion-dev {:mvn/version "0.9.282"}}
              :main-opts ["-m" "datomic.ion.dev"]} 
;;    :new {:extra-deps {seancorfield/clj-new {:mvn/version "1.1.228"}}
;;          :main-opts ["-m" "clj-new.create"]}
;;    :rebl {:extra-deps {com.cognitect/rebl          {:mvn/version "0.9.242"}
;;                        org.openjfx/javafx-fxml     {:mvn/version "15-ea+6"}
;;                        org.openjfx/javafx-controls {:mvn/version "15-ea+6"}
;;                        org.openjfx/javafx-swing    {:mvn/version "15-ea+6"}
;;                        org.openjfx/javafx-base     {:mvn/version "15-ea+6"}
;;                        org.openjfx/javafx-web      {:mvn/version "15-ea+6"}}
;;           :main-opts  ["-m" "cognitect.rebl"]}
;;    :reveal {:extra-deps {vlaaad/reveal {:mvn/version "1.1.163"}}
;;             :ns-default vlaaad.reveal
;;             :main-opts ["-m" "vlaaad.reveal" "repl"]
;;             :exec-fn repl}
  }

  ;; Provider attributes

  :mvn/repos {
  ;;   "central" {:url ""}
  ;;   "clojars" {:url ""}
;;    "cognitect-dev-tools" {:url ""}
    "datomic-cloud" {:url ""}
  }
}

mikejcusack20:03:33

Try renaming that file and try

{:aliases {:ion-dev {:extra-deps {com.datomic/ion-dev {:mvn/version "0.9.282"}}
                     :main-opts ["-m" "datomic.ion.dev"]}}
 :mvn/repos {"datomic-cloud" {:url ""}}}

esp120:03:45

same error 😓

mikejcusack20:03:57

Did you copy/paste that directly?

mikejcusack20:03:25

Hmm, this isn't making sense at all to me

esp120:03:42

me either.. i really appreciate your taking the time to help tho!

👍 3
mikejcusack20:03:35

Do you have any custom settings in .m2/?

esp120:03:41

is that s3 url supposed to be public? i.e. if i have any s3 access should i be able to do aws s3 ls

mikejcusack20:03:10

It should be. That's why the instructions are just to add the dep and repo

esp120:03:22

oh dang yes i do!

mikejcusack20:03:08

That command doesn't work for me

esp120:03:32

that was it! i had an old datomic-cloud key in my ~/.m2/settings.xml - i removed it and now it works!

esp120:03:02

thanks a ton @U01NYKKE69G - i was going crazy 😅

👍 3
mikejcusack20:03:08

The one for dev-tools is still needed if you use it

👍 3
Alex Miller (Clojure team)19:03:35

It’s not able to download from the Datomic s3 repo

Alex Miller (Clojure team)19:03:48

You need aws creds active that have s3 permissions

esp120:03:03

Hm, I'm pretty sure I did this already. I added the Datomic Administrator Policy (`datomic-admin-taxman-us-east-2`) policy to the role I'm logged in with and can successfully run datomic client access taxman , but I can't access the maven artifacts with those same creds. Upon closer inspection it looks like the Datomic Administrator Policy doesn't actually provide access to the bucket. Is there another policy somewhere I need to add in order to enable this access?

uwo23:03:23

I'm seeings this warning with exception when calling (d/shutdown true) at the end of a java process's life. It appears to be benign, but I'm curious if there's anything I can fix to prevent it:

uwo23:03:48

We're on com.datomic/datomic-pro "0.9.6024" at the moment.

uwo23:03:03

Oof -- pretty obvious. I needed to handle shutting down my clojure resources separately. So s/shutdown false no longer results in the warning.