Fork me on GitHub
#datomic
<
2017-12-07
>
dsnuts00:12:46

@zach892 is right about datomic.client spoiling ring.adapter.jetty...

dsnuts00:12:11

...returns Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpParser$ProxyHandler, compiling:(ring/adapter/jetty.clj:27:9)

kenbier00:12:17

@dsnuts can’t you just require the correct version of jetty yourself? or does datomic complain if you do that?

kenbier00:12:50

in the deps of your project.clj file

kenbier00:12:03

and @zach892 i’d wager most people are not using the datomic client if writing an application in clojure (could be wrong though). most people are using the peer library

kenbier00:12:15

> Note that the client library is currently in alpha and subject to change.

dsnuts00:12:05

You can require [org.eclipse.jetty/jetty-server "9.2.17.v20160517"] as a fix but, then you've got to keep this explicit dependency in sync with the corresponding version of ring 😞

dsnuts00:12:40

I'm less than confident prospective datomic users would go through the trouble of tracking this problem down to ring.adapter.jetty and find this obscure version of jetty-server as a fix before they decide to give up. In fact, I found a stackoverflow issue related to this very dependency issue and the OP said he just gave up on trying Datomic. I like Cognitect and I like Datomic. I fear for Datomic if this is the sort of thing people go through just to try it out. If I can help make it easier for people to adopt Datomic, I will. What can I do to help?

kenbier01:12:06

Definately. I am just a happy user of datomic so I can’t speak for the team. Dep resolution is a common problem across many projects imo, I am not sure its an indictment of datomic. That being said, its likely that datomic will be used in projects that use ring so this issue is def good to raise with the team

dsnuts01:12:40

I'm totally not blaming the team but, the fact of the matter remains

kenbier01:12:53

agreed. btw does bumping to the latest version of ring not work either btw? doubtful, just noticed you are on an old minor version

kenbier01:12:50

As for reporting, this is definately a good place, as is the google group. IDK if datomic has a jira board, but clojure does so may be they do too somewhere. email would def work too. Awesome that you are reporting bugs that alot of ppl are going to run into

dsnuts01:12:49

@kenbier Thanks, bro. Same problem with ring 1.6.3

dsnuts01:12:59

I emailed support at Cognitect about this. Support Is being handled by Think Relevance so, we'll see if the team catches wind of this issue through the grapevine. fingers crossed

kenbier01:12:08

haha awesome

kenbier01:12:13

imo i hate letting a library decide what version of a server lib you are going to consume.

kenbier01:12:19

@dsnuts one last thing, you could try exluding ring jetty adapter from the datomic-client lib.

dsnuts01:12:57

And to be clear ring doesn't require any particular server but, if you wan't to use ring out of the box, you're probably using jetty

kenbier01:12:36

i wasn’t going to suggest changing your server because thats a big decision for some, but if its not for you then why not? jetty adapter is a bit old anyway

kenbier01:12:54

however i think datomic may still pull in jetty

kenbier01:12:03

so youll have a bigger jar

dsnuts01:12:09

can't use http-kit because of TLS support

dsnuts01:12:36

And :exclusions don't help the issue. Was the first thing I tried

kenbier01:12:10

[com.datomic/clj-client "0.8.606" :exclusions [org.eclipse.jetty/jetty-client org.eclipse.jetty/jetty-http org.eclipse.jetty/jetty-util]]] didn’t work?

kenbier01:12:38

weird, someone on slack claimed they got that to work earlier

kenbier01:12:01

im all out of ideas then. curious what the resolution on this is. thanks for bringing it up

dsnuts01:12:40

Found the proper :exclusions to fix the datomic.client/ring.adapter.jetty issue! [com.datomic/clj-client "0.8.606" :exclusions [org.eclipse.jetty/jetty-http org.eclipse.jetty/jetty-server]] wins

daemianmack12:12:27

the new datomic developers forum (https://forum.datomic.com/) has replaced the datomic google group (cc kenbier dsnuts)

marshall14:12:17

@kenbier if you’d post it on the new forum at http://forum.datomic.com that’d be a good option - can get additional feedback from others there as well

jaret14:12:31

@dsnuts and @kenbier thanks for chasing down the deps issue. We’ll fix this in an upcoming release of client.

len19:12:56

Is there a way in a pull to get the :db/txInstant out ?

souenzzo19:12:47

txInstant of which attribute?

len04:12:42

Of the t of the ?e that I have

souenzzo09:12:43

this ?e has many ?a ?v with different ?tx....dosent make much sense ask for tx on pull but you can do (map (apply (partial into {})) (d/q '[:find (pull ?e [*]) (pull ?tx [*]) :where [?e :user/name _ ?tx]] (d/db conn)) or something like

caleb.macdonaldblack23:12:02

I’m reading http://www.learndatalogtoday.org/chapter/3 to learn datalog and im confused by the last query down the bottom under the heading “relations”

caleb.macdonaldblack23:12:13

[:find ?title ?box-office
 :in $ ?director [[?title ?box-office]]
 :where
 [?p :person/name ?director]
 [?m :movie/director ?p]
 [?m :movie/title ?title]]

caleb.macdonaldblack23:12:23

Is [[?title ?box-office]] input?

caleb.macdonaldblack23:12:46

And why isn’t ?box-office in the where clause?

caleb.macdonaldblack23:12:37

I almost looks like they’re destructuring a vector within a vector but It wouldn’t make sense parsing in your expected output