This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-22
Channels
- # announcements (1)
- # aws (4)
- # beginners (73)
- # bristol-clojurians (1)
- # calva (7)
- # cider (5)
- # cljs-dev (11)
- # cljsrn (3)
- # clojure (30)
- # clojure-europe (24)
- # clojure-italy (2)
- # clojure-nl (3)
- # clojure-spec (7)
- # clojure-uk (69)
- # clojurescript (109)
- # cursive (21)
- # datascript (1)
- # datomic (72)
- # events (1)
- # fulcro (5)
- # graalvm (2)
- # helix (12)
- # hoplon (12)
- # jobs (2)
- # juxt (2)
- # kaocha (7)
- # keechma (1)
- # lambdaisland (5)
- # meander (18)
- # off-topic (52)
- # pathom (9)
- # re-frame (18)
- # reagent (5)
- # reitit (7)
- # sci (6)
- # shadow-cljs (76)
- # sql (9)
- # testing (4)
- # tools-deps (14)
- # xtdb (28)
what's the current recommendation for datomic.api/pull-many
when using the datomic.client.api
?
there is a nice comparison of the peer and the client apis on the https://docs.datomic.com/on-prem/clients-and-peers.html#peer-only page, but it doesn't mention datomic.api/pull-many
and what should it's equivalent be on datomic.client.api
.
i know it's possible to provide pull patterns as dc/q
, but that couples the queries more to pulls, than it would otherwise, using the q+find-rel + pull-many.
based on the introduction of this new qseq
function, i suspect that's the one I should use instead of pull-many
.
Is my suspicion correct?
I get this error when adding dev-local as a dependency to a previously working ions project:
Could not locate cognitect/hmac_authn__init.class, cognitect/hmac_authn.clj or cognitect/hmac_authn.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
I guess it's a dependency conflict but I've checked with -Stree and I get the same versions of com.cognitect/hmac-authn 0.1.195
in both with and without dev-local.
Still trying to track it down, but wanted to ask if anyone else have seen it or something similar?@maxt I had this issue too, and it solved by having latest tools.deps - 1.10.1.561
Upgrade on osx with:
brew upgrade clojure/tools/clojure
@danie Thank you for the hint! Just noticed that it works from cli, but not through cursive, which indeed seems to be stuck at an older version of tools deps
You can have cursive use your local version of clj too
@alexmiller that would be great, but when I try I get this
The following errors were found during project resolve: /home/max/wavy/wavy-v2/deps.edn: Coordinate type :mvn not loaded for library org.clojure/clojure in coordinate {:mvn/version "1.10.1"}
I don't yet understand why I see that in cursive but not from cliThat's a weird error
I'd ask in #cursive
@maxt yes, you can specify Cursive to use the installed CLI tools, by pointing it to the clojure
executable
@onetom Thank you. That option sadly does not work for me, I get a wierd error when doing so.
that way it's guaranteed that you have the exact version of everything in a read-only folder and it doesn't clash with the needs with any other project
here is an example of a shell.nix
file, which can provide you the exact same environment in a shell, even years later:
# To upgrade pinned versions, get the latest git commit SHAs:
# git ls-remote nixos-20.03 nixpkgs-unstable
with import (builtins.fetchGit {
name = "nixos-20.03";
ref = "refs/heads/nixos-20.03";
rev = "bb8f0cc2279934cc2274afb6d0941de30b6187ae";
url = ;
}) {};
let
sharedJDK = jdk11;
clojure = callPackage ../clojure { jdk11 = sharedJDK; };
maven = maven3.override { jdk = sharedJDK; };
in
mkShell rec {
buildInputs = [
coreutils cacert wget unzip overmind
sharedJDK maven clojure
];
shellHook = ''
export LC_CTYPE="UTF-8"
'';
}
the ../clojure
folder contains a copy of https://github.com/NixOS/nixpkgs/blob/99afbadaca7a7edead14dc5f930aff4ca4636608/pkgs/development/interpreters/clojure/default.nix and i just adjusted the cli tool version and sha in it.
the Nix pkg manager works great under any Linux or macOS, but Windows is not really supported or might never be supported.
im happy to hop on a https://screen.so/ session and help you to set nix up or i can show it in action on my machine
In this case, It works from my command line but not from inside IntelliJ, and I don't think a package manager would help me then.
And thank you for offering help. In this case, I just found a workaround that solves my current issue.
@U060WE55Z Using the option "Use tools.deps directly" on a updated Cursive.
Using tools.deps version 0.8.709 from inside Cursive finally did allow me to use dev-local. Thank you again @danie
hello! i am attempting to get a handle on the AWS_ACCESS_KEY_ID
environment variable from within my Ion lambda -- something that is typically available based on the execution role. however, listing the environment variables from within my Ion returns the environment variables of the query group, which is expected but not very helpful in my case. is there another way to retrieve the execution role credentials?
hi marshall, ghadi and kenny sorted me out with a good example. thanks just the same for investigating
all AWS SDKs detect that they are running in an EC2 machine with an instance role, and transparently fetch and remember credentials
if it's "use an aws API" just call the constructor function for whatever SDK you're using, and don't pass any explicit credentials
EC2 machines don't have that env var unless you've explicitly set it -- which is not recommended
i'm using cognitect's aws-api, although there is no "server side" appsync client or API to perform mutations, so it appears that manually posting signed requests to AppSync is the way to go. i'm drawing some inspiration from the code at the end of this article: https://adrianhall.github.io/cloud/2018/10/26/backend-graphql-trigger-appsync/ nodejs has the benefit of using the AWS AppSync client, but that's not an option in the JVM
but I think @U083D6HK9 may have done it
in any case: don't rely on the datomic machine to have static credentials in the env vars
Haven’t read the background on your issue @joshkh but perhaps this is useful https://gist.github.com/kennyjwilli/aa9e99321d9443a8ae80448974850e79
forgive me ghadi, but doesn't that demonstrate a way to provide custom credentials? whereas in my case i need to retrieve the current access-key-id etc.?
@U083D6HK9 i think that's exactly what i'm looking for
if you call (cognitect.aws.client.shared/credentials-provider)
you'll have access to the default provider which will pull and refresh the creds automatically
thanks @U083D6HK9!
yup, this looks great. thank you both for your help. it's always interesting to dive a little deeper into ions / aws api.
and thanks for your work on aws-api
. it was a game changer when moving from the aws java sdk.
on a side note, i wasn't able to sign S3 / CloudFront urls with aws-api
in the past (although maybe that has changed), so i ported over an AWS java example to Clojure. might be useful to someone who finds this thread in the future. https://gist.github.com/joshkh/99718bfd4cd95cd48cda8533f162ffbf