This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-15
Channels
- # announcements (8)
- # asami (10)
- # babashka (16)
- # beginners (86)
- # calva (22)
- # chlorine-clover (9)
- # circleci (20)
- # clj-kondo (13)
- # cljs-dev (20)
- # cljsrn (3)
- # clojure (144)
- # clojure-australia (10)
- # clojure-europe (126)
- # clojure-italy (5)
- # clojure-nl (8)
- # clojure-norway (4)
- # clojure-serbia (9)
- # clojure-uk (7)
- # clojurescript (14)
- # cursive (20)
- # data-science (1)
- # datomic (20)
- # figwheel-main (5)
- # fulcro (23)
- # graalvm (7)
- # graphql (25)
- # honeysql (15)
- # hugsql (3)
- # jobs (2)
- # lambdaisland (2)
- # leiningen (4)
- # lsp (102)
- # malli (3)
- # off-topic (51)
- # overtone (5)
- # pathom (27)
- # portal (11)
- # quil (1)
- # re-frame (19)
- # reagent (31)
- # remote-jobs (1)
- # reveal (3)
- # rewrite-clj (56)
- # shadow-cljs (45)
- # startup-in-a-month (1)
- # tools-deps (9)
@joe.lane after starting the proxy, it works and I get the following outputs:
(def client (starter/get-client))
#'user/client
(starter/ensure-sample-dataset)
:loaded
(def conn (starter/get-connection))
#'user/conn
@(def db (d/db conn))
{:t 16, :next-t 17, :db-name "datomic-docs-tutorial", :database-id "b04916cd-b8d8-4d84-b933-90ec6affc30a", :type :datomic.client/db}
(starter/get-schema db)
(#:db{:id 39, :ident :fressian/tag, :valueType :db.type/keyword, :cardinality :db.cardinality/one, :doc "Keyword-valued attribute of a value type that specifies the underlying fressian type used for serialization."} #:db{:id 73, :ident :inv/sku, :valueType :db.type/string, :cardinality :db.cardinality/one, :unique #:db{:id 38, :ident :db.unique/identity}} #:db{:id 74, :ident :inv/color, :valueType :db.type/keyword, :cardinality :db.cardinality/one} #:db{:id 75, :ident :inv/size, :valueType :db.type/keyword, :cardinality :db.cardinality/one} #:db{:id 76, :ident :inv/type, :valueType :db.type/keyword, :cardinality :db.cardinality/one} #:db{:id 77, :ident :order/items, :valueType :db.type/ref, :cardinality :db.cardinality/many, :isComponent true} #:db{:id 78, :ident :item/id, :valueType :db.type/ref, :cardinality :db.cardinality/one} #:db{:id 79, :ident :item/count, :valueType :db.type/long, :cardinality :db.cardinality/one} #:db{:id 80, :ident :inv/count, :valueType :db.type/long, :cardinality :db.cardinality/one})
(starter/get-items-by-type db :shirt '[:inv/sku :inv/color :inv/size])
[[#:inv{:sku "SKU-0", :color :red, :size :small}] [#:inv{:sku "SKU-4", :color :red, :size :medium}] [#:inv{:sku "SKU-8", :color :red, :size :large}] [#:inv{:sku "SKU-12", :color :red, :size :xlarge}] [#:inv{:sku "SKU-16", :color :green, :size :small}] [#:inv{:sku "SKU-20", :color :green, :size :medium}] [#:inv{:sku "SKU-24", :color :green, :size :large}] [#:inv{:sku "SKU-28", :color :green, :size :xlarge}] [#:inv{:sku "SKU-32", :color :blue, :size :small}] [#:inv{:sku "SKU-36", :color :blue, :size :medium}] [#:inv{:sku "SKU-40", :color :blue, :size :large}] [#:inv{:sku "SKU-44", :color :blue, :size :xlarge}] [#:inv{:sku "SKU-48", :color :yellow, :size :small}] [#:inv{:sku "SKU-52", :color :yellow, :size :medium}] [#:inv{:sku "SKU-56", :color :yellow, :size :large}] [#:inv{:sku "SKU-60", :color :yellow, :size :xlarge}]]
user=>
So it seems like the ion-starter works
But in my project, when I run the repl, I get this error:
Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).
profile file cannot be null
@ps I believe that error indicates that you do not have AWS credentials. Your REPL also needs AWS credentials when launched. And in trying to follow along from your first post... I want to remind you that you will need to remove all the on-prem client usage and replace with cloud usage (i.e. update your deps and confirm all of your connections are using the datomic client Cloud config you used in the ion-starter project). Datomic on prem client will not work in cloud.
@jaret yes I have two profiles. [default] and [humboi]. The credentials for both are exactly the same though
and you are ensuring that the profile is used when launching the repl or manually sourcing aws credentials before launching the repl?
I don’t know how to make sure that that profile is used
In ion-starter yes
In my project using lien
Do you have AWS credentials in ~/.lein/profiles.clj
? what version of lein are you using? Can you share your complete project.clj redacted of any sensitive information?
@jaret here’s the project.clj:
(defproject humboiserver "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:dependencies [[ch.qos.logback/logback-classic "1.2.3"]
[cheshire "5.10.0"]
[clojure.java-time "0.3.2"]
[com.google.guava/guava "27.0.1-jre"]
[com.novemberain/monger "3.1.0" :exclusions [com.google.guava/guava]]
[cprop "0.1.17"]
[expound "0.8.7"]
[funcool/struct "1.4.0"]
[luminus-aleph "0.1.6"]
[luminus-transit "0.1.2"]
[luminus/ring-ttl-session "0.3.3"]
[markdown-clj "1.10.5"]
[metosin/muuntaja "0.6.7"]
[metosin/reitit "0.5.10"]
[metosin/ring-http-response "0.9.1"]
[mount "0.1.16"]
[nrepl "0.8.3"]
[org.clojure/clojure "1.10.1"]
[org.clojure/tools.cli "1.0.194"]
[org.clojure/tools.logging "1.1.0"]
[org.webjars.npm/bulma "0.9.1"]
[org.webjars.npm/material-icons "0.3.1"]
[org.webjars/webjars-locator "0.40"]
[ring-webjars "0.2.0"]
[ring/ring-core "1.8.2"]
[ring/ring-defaults "0.3.2"]
[amazonica "0.3.153"]
[selmer "1.12.31"]
[com.datomic/client-cloud "0.8.105"]
]
:min-lein-version "2.0.0"
:source-paths ["src/clj"]
:test-paths ["test/clj"]
:resource-paths ["resources"]
:target-path "target/%s/"
:main ^:skip-aot humboiserver.core
:plugins []
:profiles
{:uberjar {:omit-source true
:aot :all
:uberjar-name "humboiserver.jar"
:source-paths ["env/prod/clj" ]
:resource-paths ["env/prod/resources"]}
:dev [:project/dev :profiles/dev]
:test [:project/dev :project/test :profiles/test]
:project/dev {:jvm-opts ["-Dconf=dev-config.edn" ]
:dependencies [[pjstadig/humane-test-output "0.10.0"]
[prone "2020-01-17"]
[ring/ring-devel "1.8.2"]
[ring/ring-mock "0.4.0"]]
:plugins [[com.jakemccrary/lein-test-refresh "0.24.1"]
[jonase/eastwood "0.3.5"]]
:source-paths ["env/dev/clj" ]
:resource-paths ["env/dev/resources"]
:repl-options {:init-ns user
:timeout 120000}
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]}
:project/test {:jvm-opts ["-Dconf=test-config.edn" ]
:resource-paths ["env/test/resources"] }
:profiles/dev {}
:profiles/test {}})
I don’t use .lein/profiles
@jaret I’m using cider-jack-in
I don’t know what an alias is in this context
@jaret is there a way to pass in the credentials from the project.clj?
or alternatively, is there a way to put the credentials directly in the code rather than depending on ~/.aws?