This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-31
Channels
- # beginners (153)
- # cider (30)
- # cljs-dev (8)
- # cljsrn (8)
- # clojure (105)
- # clojure-dev (6)
- # clojure-dusseldorf (5)
- # clojure-italy (6)
- # clojure-nl (3)
- # clojure-russia (34)
- # clojure-spec (23)
- # clojure-uk (54)
- # clojurescript (104)
- # core-matrix (3)
- # crypto (1)
- # cursive (17)
- # datomic (90)
- # duct (13)
- # editors (5)
- # emacs (1)
- # events (1)
- # figwheel-main (9)
- # fulcro (54)
- # hoplon (18)
- # hyperfiddle (2)
- # jobs-rus (1)
- # lein-figwheel (5)
- # leiningen (3)
- # luminus (52)
- # mount (6)
- # off-topic (22)
- # other-languages (3)
- # parinfer (7)
- # powderkeg (3)
- # re-frame (52)
- # reagent (58)
- # rum (4)
- # shadow-cljs (49)
- # spacemacs (12)
- # sql (13)
- # tools-deps (2)
- # yada (1)
@henrik we had this discussion late last week. Stu implied that this question will be answered soon so, for now, we wait
I add a ENV=XXX tag to the config, then use that to ‘root’ grabbing stuff out of the AWS param store. hacky but works, looking forward to thenative solution
has anyone experienced this when creating a datomic cloud client?
(d/client (get-in env [:datomic :client]))
CompilerException java.lang.IllegalArgumentException: Can't define method not in interfaces: recent_db, compiling:(datomic/client/impl/shared.clj:304:1)
This is a persistent problem for me:
java.lang.Exception: namespace 'cheshire.factory' not found, compiling:(cheshire/core.clj:1:1)
Cheshire works fine locally, but pushed to AWS (Datomic Ions), it generates an error. Why might this be?Compare that list with any deps conflicts that datomic ions barks about when you push your code up.
I’ve found that I dont actually need cheshire, and that clojure.data.json works well enough, however I understand thats not a great answer.
any news about this bug? https://gist.github.com/souenzzo/c7b5a5434d4c04efcc58802c81b46023 https://forum.datomic.com/t/inconsistency-between-query-on-peer-and-transact/548
@joe.lane I don’t quite get it, these are the deps listed for cheshire
:
cheshire/cheshire 5.8.0
com.fasterxml.jackson.dataformat/jackson-dataformat-cbor 2.9.0
com.fasterxml.jackson.core/jackson-core 2.9.0
tigris/tigris 0.1.1
com.fasterxml.jackson.dataformat/jackson-dataformat-smile 2.9.0
They only appear for cheshire
, nowhere else, including jackson
.Update to "0.9.175"
, it includes as output (when you push) a collection of dependency conflicts.
@henrik we should be on 0.9.175 throughout docs and repos. May I ask where you got 0.9.160 from? so I can make sure we update that. https://docs.datomic.com/cloud/releases.html
@jaret Oh sorry, I meant the deps. It’s telling me that in Datomic Cloud, com.cognitect/transit-clj #:mvn{:version "0.8.285"
is used, while I’m relying on com.cognitect/transit-clj {:mvn/version "0.8.309"}
.
Or can I control which version Datomic Cloud uses?
Yeah, I ran into some issues with things like the priority-map
library and the aws java sdk.
Well, good news is I got a different error now. java.net.ConnectException: Connection refused
@jaret Thank you! 🙂 Possibly, I have no idea what that means. What would I be doing in this case?
API Gateway is reporting this as I’m trying to access the web server endpoint. It was working fine as of 0.9.160
and no cheshire
. The house of cards started collapsing with the introduction of cheshire
, alas.
I was going to add it to the documentation as a community example, but was only able to find your talk notes on your github.
I’ve got several (unpublished…) small projects with ions if you’re in going to start adding community examples. Do you mean a blogpost or video? Because the source code should be present.
I know we’d love to see more community examples in whatever format you have them in. Github links work as well, but I know you mentioned on twitter after your websocket IOT Ion talk that a tutorial/talk would follow.
I don’t want to put any pressure on you 🙂 Just want to make people can find the great stuff everyone is making.
No dice, I’m afraid. I’ll downgrade to 0.9.160
, see if that gets it up and running again.
Though the List of Reprimands is smaller:
:dependency-conflicts
{:deps
{commons-codec/commons-codec #:mvn{:version "1.10"},
org.slf4j/jcl-over-slf4j #:mvn{:version "1.7.14"},
com.fasterxml.jackson.core/jackson-core #:mvn{:version "2.9.5"},
com.cognitect/http-client #:mvn{:version "0.1.80"},
com.google.guava/guava #:mvn{:version "18.0"},
com.cognitect/s3-creds #:mvn{:version "0.1.18"},
org.slf4j/slf4j-api #:mvn{:version "1.7.14"},
com.amazonaws/aws-java-sdk-kms #:mvn{:version "1.11.349"},
com.amazonaws/aws-java-sdk-s3 #:mvn{:version "1.11.349"}},}
I can't get ions to work 😕
I'm pretty certain the problem is related to my deps, but I'm unable to re-create the StackOverflow
error localy after applying the deps clojure.ions
warns about. 😕 (details in thread)
My deps.edn:
{:paths ["backend" "resources"]
:deps
{org.clojure/clojure {:mvn/version "1.9.0"}
com.datomic/ion {:mvn/version "0.9.16"}
ring/ring-core {:mvn/version "1.7.0-RC1"}
ring/ring-json {:mvn/version "0.4.0"}
email-validator {:mvn/version "0.1"}
clj-mailgun {:mvn/version "0.2.0"}
crypto-password {:mvn/version "0.2.0"}
danlentz/clj-uuid {:mvn/version "0.1.7"}
clojure.java-time {:mvn/version "0.3.2"}}
:mvn/repos {"datomic-cloud" {:url ""}}
:aliases
{:dev {:extra-deps {com.datomic/client-cloud {:mvn/version "0.8.54"}
com.datomic/ion-dev {:mvn/version "0.9.175"}
ring/ring-jetty-adapter {:mvn/version "1.7.0-RC1"}
org.eclipse.jetty/jetty-server {:mvn/version "9.4.9.v20180320"}
org.eclipse.jetty/jetty-client {:mvn/version "9.4.9.v20180320"}}}
:test {:extra-paths ["tests"]
:extra-deps {expectations {:mvn/version "2.2.0-rc3"}}}}}
the error message:
"Msg": "IonLambdaDispatcherFailedtoStart",
"Ex": {
"Cause": null,
"Via": [
{
"Type": "clojure.lang.Compiler$CompilerException",
"Message": "java.lang.StackOverflowError, compiling:(potemkin/namespaces.clj:88:34)",
"At": [
"clojure.lang.Compiler",
"analyzeSeq",
"Compiler.java",
7010
]
},
{
"Type": "java.lang.StackOverflowError",
"Message": null,
"At": [
"clojure.lang.RestFn",
"applyTo",
"RestFn.java",
130
]
}
],
Look in clojure -Stree
for a dependency that requires potemkin
and then remove it. See if the issue persists. That lib does some crazy stuff and I wouldn’t be surprised if its causing issues.
@joe.lane Do you track ion-starter to keep up to date with the releases? Or is there a release page somewhere?
Oh man, what’s going on?
java.lang.Exception: namespace 'clj-http.headers' not found, compiling:(clj_http/core.clj:1:1)
@henrik can you try the base tutorial? That looks like you may have some basic auth in your app?
@jaret No, this is after moving some stuff over from another project. It includes things that talk to Google Cloud, hence cheshire
and clj-http
.
Are some libraries unsupported in Ions? I’m not sure I understand the patterns behind what works and not.
I ripped out the deps I added from my other project, and now it works fine. Some or all of these are the culprit(s):
buddy/buddy-sign {:mvn/version "3.0.0"}
environ {:mvn/version "1.1.0"}
org.clojure/data.json {:mvn/version "0.2.6"}
clj-http {:mvn/version "3.9.0"}
clj-time {:mvn/version "0.14.4"}
How do you guys approach testing with Datomic Cloud? I see Stu mentioned here (https://forum.datomic.com/t/integration-testing/465) that he has some "tricks" to unit test with Datomic, but I have not seen any posts about that. Our approach right now is to create a new db with a unique suffix on each test run, deleting the db after each test completes. This ensures a clean DB for each test. Is there a better approach to this? With the peer library you could simply create a new in-memory connection for each test, allowing you to use your normal DB names without a suffix. It'd be great if there was something similar for Datomic Cloud. Is there a more reasonable solution to this problem?
we do pretty much the same thing. Moved a clj/datomic microservice into ion code, moved to client api, then just updated my test fixture that would dynamically create and tear down an in-mem db to do what you described. Pretty much just worked
you might try this https://gist.github.com/stevebuik/9b219090a2d10cc4fb06d62ee928ca7e
it’s not blessed by Cognitect (yet) but works well for me. I can reproduce all cloud behaviours in local/mem db (at least those that I need)
@ghadi https://github.com/bmaddy/gadget may be what you’re looking for?
So, buddy-sign
, unfortunately has this dep tree:
buddy/buddy-sign 3.0.0
buddy/buddy-core 1.5.0
org.bouncycastle/bcprov-jdk15on 1.59
commons-codec/commons-codec 1.11
org.bouncycastle/bcpkix-jdk15on 1.59
cheshire/cheshire 5.8.0
com.fasterxml.jackson.dataformat/jackson-dataformat-cbor 2.9.0
com.fasterxml.jackson.core/jackson-core 2.9.0
tigris/tigris 0.1.1
com.fasterxml.jackson.dataformat/jackson-dataformat-smile 2.9.0
net.i2p.crypto/eddsa 0.3.0
Meaning it contains cheshire
, which is Forbidden.
java.lang.Exception: namespace 'cheshire.factory' not found, compiling:(cheshire/core.clj:1:1)
Is it just a fact of life that anything referencing cheshire
is going to blow up when it reaches the Cloud?
The issue is due to that particular version of cheshire having a jackson dep conflict with the version of jackson-core used in datomic-cloud.
You’ll want to upgrade your Datomic Cloud System to that and I think you should be fine to include Cheshire. https://docs.datomic.com/cloud/operation/upgrading.html
@jaret observation: datomic-free hasn't been updated to the latest version in clojars https://clojars.org/com.datomic/datomic-free