This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-05
Channels
- # announcements (9)
- # babashka (7)
- # beginners (190)
- # calva (5)
- # cider (12)
- # clara (1)
- # clj-kondo (26)
- # cljdoc (3)
- # cljsrn (5)
- # clojure (15)
- # clojure-australia (2)
- # clojure-czech (1)
- # clojure-europe (34)
- # clojure-germany (2)
- # clojure-nl (6)
- # clojure-spec (20)
- # clojure-uk (7)
- # clojurescript (6)
- # cloverage (2)
- # conjure (10)
- # core-async (18)
- # core-logic (1)
- # cursive (22)
- # data-science (1)
- # datalog (26)
- # datomic (35)
- # docker (1)
- # emacs (4)
- # etaoin (4)
- # fulcro (51)
- # jobs (2)
- # jobs-discuss (2)
- # joker (1)
- # leiningen (4)
- # mid-cities-meetup (1)
- # off-topic (22)
- # pathom (15)
- # re-frame (14)
- # reitit (5)
- # remote-jobs (1)
- # shadow-cljs (37)
- # specter (2)
- # tools-deps (43)
- # xtdb (2)
we have upgraded clojure cli tools x.x.x.590
to 1.10.1.697
, then the following error appeared:
$ clj -Srepro -e "(require 'datomic.client.api)"
WARNING: When invoking clojure.main, use -M
Execution error (FileNotFoundException) at clojure.core.async.impl.ioc-macros/eval774$loading (ioc_macros.clj:12).
Could not locate clojure/tools/analyzer__init.class, clojure/tools/analyzer.clj or clojure/tools/analyzer.cljc on classpath.
i think im on the latest dependencies in my ./deps.edn
file:
org.clojure/clojure {:mvn/version "1.10.1"}
com.datomic/client-cloud {:mvn/version "0.8.102"}
com.datomic/ion {:mvn/version "0.9.48"}
I tried it with both nixpkgs.jdk8 and jdk11. I tried it with and without the deps overrides recommended by the latest ion-dev push operation. the error is always the same. I have no other dependencies specified and still get this error. I guess I can specify this missing dependecy explicitly, but it feels like I'm doing something wrong, if such a bare bones ion project doesn't work out of the box.
Can you share your full deps.edn?
{:paths
["src" ;"rsc" "classes"
]
:deps
{
org.clojure/clojure {:mvn/version "1.10.1"}
com.datomic/client-cloud {:mvn/version "0.8.102"}
com.datomic/ion {:mvn/version "0.9.48"}
;org.clojure/data.json {:mvn/version "0.2.6"}
;http-kit/http-kit {:mvn/version "2.5.0"}
;metosin/reitit-ring {:mvn/version "0.5.6"}
;org.clojure/tools.analyzer {:mvn/version "1.0.0"}
;; Deps to avoid conflicts with Datomic Cloud
;; commons-codec/commons-codec #:mvn{:version "1.13"},
;; com.fasterxml.jackson.core/jackson-core #:mvn{:version "2.10.1"},
;; com.amazonaws/aws-java-sdk-core #:mvn{:version "1.11.826"},
;; com.cognitect/transit-clj #:mvn{:version "0.8.319"},
;; com.cognitect/s3-creds #:mvn{:version "0.1.23"},
;; com.amazonaws/aws-java-sdk-kms #:mvn{:version "1.11.826"},
;; com.amazonaws/aws-java-sdk-s3 #:mvn{:version "1.11.826"}
}
:mvn/repos
{"datomic-cloud"
{:url ""}}
:aliases
{:test
{:extra-paths
["test"]
:extra-deps
{nubank/matcher-combinators {:mvn/version "3.1.3"}
lambdaisland/kaocha {:mvn/version "1.0.700"}}}}
}
i tried brew install clojure
and run /usr/local/bin/clojure
directly; same result.
i haven't tried it under linux yet, but it feels like a tools.deps.alpha
issue.
I don't think the os matters so no reason to do that
i just retried again on a different machine: no error:
$ /nix/store/0v7kwppxygj3wln9j104vfi1kx21fssj-clojure-1.10.1.590/bin/clojure -Srepro -e "(require 'datomic.client.api)"
analyzer error:
$ /nix/store/9g4xqjpzi7vkr5a5n2q3fd1cyymvh68r-clojure-1.10.1.697/bin/clojure -Srepro -e "(require 'datomic.client.api)"
these are the differences in the dependency tree:
$ diff -u <(/nix/store/0v7kwppxygj3wln9j104vfi1kx21fssj-clojure-1.10.1.590/bin/clojure -Srepro -Stree) <(/nix/store/9g4xqjpzi7vkr5a5n2q3fd1cyymvh68r-clojure-1.10.1.697/bin/clojure -Srepro -Stree)
--- /dev/fd/63 2020-10-05 21:48:46.147069426 +0800
+++ /dev/fd/62 2020-10-05 21:48:46.147513695 +0800
@@ -31,10 +31,6 @@
com.datomic/client-api 0.8.54
org.clojure/core.async 0.5.527
org.clojure/tools.analyzer.jvm 0.7.2
- org.clojure/tools.analyzer 0.6.9
- org.clojure/tools.reader 1.0.0-beta4
- org.clojure/core.memoize 0.5.9
- org.ow2.asm/asm-all 4.2
com.cognitect/http-client 0.1.105
org.eclipse.jetty/jetty-http 9.4.27.v20200227
org.eclipse.jetty/jetty-io 9.4.27.v20200227
this is a tools.deps bug - it's pretty subtle and will take me a bit to isolate and fix properly but adding a top level dep on org.clojure/core.async 0.5.527 should be a sufficient workaround for the moment
hey, a new prerelease of clj is out if you'd like to test it - 1.10.1.708, will promote to stable after a bit more use
and I guess I implied but should say that it fixes this problem - thanks for the report, it would have been challenging to find this otherwise!
@nando I am a Datomic noob myself, but I got curious about the proposed enhanced doc (+1 on that, btw) and how :with
might work and ran a little experiment:
(d/q '[:find ?year
:with ?language
:where [?artist :artist/name "Bob Dylan"]
[?release :release/artists ?artist]
[?release :release/year ?year]
[?release :release/language ?language]]
db) ;; => [[1968] [1973] [1969] [1970] [1971]]
So to my unwitting eyes, the :with
per se does not block collapsing of duplicates: rather, one must concoct a :with
clause based on domain knowledge to force a bag
with the desired population over which to aggregate. Maybe? 🤷The columns in the initial set are with+find, (in this case ?year ?language), then aggregation happens, then the :with columns are removed (in this case ?language) leaving a bag
@hiskennyness I can only respond by saying that I think :with
is a very important clause to understand, and I'm not sure I fully understand it yet. Your example is the first I've seen targeting an attribute rather than an entity id. I don't have sufficient grasp of the inner workings of datomic or concept behind :with
to make a guess how that works, but I'm easily confused.
You remind me of this gem: https://ace.home.xs4all.nl/Literaria/Poem-Graves.html. I have been toying with doing a ground-up Datomic for the Easily Confused tutorial series, maybe I should do it as I struggle up my own learning curve.
Yes you have to run a peer server with datomic free to do that. See: https://docs.datomic.com/on-prem/peer-server.html
@timok You should look at dev-local: https://docs.datomic.com/cloud/dev-local.html