This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-12
Channels
- # announcements (6)
- # babashka (45)
- # beginners (4)
- # calva (19)
- # cider (2)
- # clj-kondo (10)
- # clj-yaml (10)
- # clojure (25)
- # clojure-boston (1)
- # clojure-conj (3)
- # clojure-europe (34)
- # clojure-losangeles (5)
- # clojure-nl (1)
- # clojure-norway (11)
- # clojure-uk (2)
- # clojurescript (84)
- # cursive (10)
- # datalevin (3)
- # figwheel-main (1)
- # fulcro (1)
- # jobs (5)
- # joyride (25)
- # lsp (17)
- # malli (18)
- # nbb (1)
- # off-topic (1)
- # re-frame (22)
- # remote-jobs (9)
- # scittle (3)
- # shadow-cljs (26)
- # sql (16)
- # tools-build (12)
- # xtdb (44)
huh, TIL that (conj <map> <map>)
returns acts like merge
curious, why would one prefer this?
anyone using #clerk I am trying to run the example at clerk/dev/user.clj, but when I try to cider clj jack in I get the following error :
{:clojure.main/message
"Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).\n-Sdeps (No such file or directory)\n",
:clojure.main/triage
{:clojure.error/class java.io.FileNotFoundException,
:clojure.error/line -2,
:clojure.error/cause "-Sdeps (No such file or directory)",
:clojure.error/symbol java.io.FileInputStream/open0,
:clojure.error/source "FileInputStream.java",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type java.io.FileNotFoundException,
:message "-Sdeps (No such file or directory)",
:at [java.io.FileInputStream open0 "FileInputStream.java" -2]}],
:trace
[[java.io.FileInputStream open0 "FileInputStream.java" -2]
[java.io.FileInputStream open "FileInputStream.java" 216]
[java.io.FileInputStream <init> "FileInputStream.java" 157]
[java.io.FileInputStream <init> "FileInputStream.java" 111]
[clojure.lang.Compiler loadFile "Compiler.java" 7575]
[clojure.main$load_script invokeStatic "main.clj" 475]
[clojure.main$script_opt invokeStatic "main.clj" 535]
[clojure.main$script_opt invoke "main.clj" 530]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause "-Sdeps (No such file or directory)"}}
I have installed babashka, but feel like I might be missing other dependencies.
Thanks in advance for any advice.:clojure.error/cause "-Sdeps (No such file or directory)"
This looks like you're not invoking the clojure CLI correctlyAlso, for future reference, that "hashtag" is actually a link - a dedicated channel for Clerk where such questions should go first.
thanks for the advice, I will look at using clojure CLI.
Perhaps you have an old or invalid version of clj
installed. Can you post the output of clj --version
?
clojure --version Execution error (FileNotFoundException) at http://java.io.FileInputStream/open0 (FileInputStream.java:-2). --version (No such file or directory) Full report at: /tmp/clojure-329137397675565149.edn
Looks like my clojure install has issues
ubuntu linux
this is what you should follow to install clojure
:
https://clojure.org/guides/install_clojure
make sure you remove any older/other clojure
thing in your environment
ok, will do. Thanks for the help.
I have an issue with a dynamic variable when compiling code. I'm getting the following error:
#15 335.1 Done in 1221ms.
#15 356.2 Execution error (IllegalAccessError) at gen-fhi.resource-providers.postgres.core/loading (core.clj:1).
#15 356.2 *nested-tx* does not exist
*nested-tx*
is a dynamic variable used in next.jdbc to configure nested transaction behavior.
My require statements on the file are as follows (note line 3 is where the issue is occurring):
(ns gen-fhi.resource-providers.postgres.core
(:require [next.jdbc :as jdbc]
[next.jdbc.transaction :refer [*nested-tx*]]
[hugsql.core :as hugsql]
[hugsql.adapter.next-jdbc :as next-adapter]
[clj-json-patch.core :as patch]
[clojure.core.match :refer [match]]
[clojure.string :as string]
[honey.sql :as hsql]
[honey.sql.helpers :refer [where]]
[loom.graph :as graph]
[loom.alg :as alg]
[gen-fhi.resource-providers.transactions :as bundle-transaction]
[gen-fhi.resource-providers.util :refer [param-value->param-value-map]]
[gen-fhi.operation-outcome.core :as oo]
[gen-fhi.resource-providers.postgres.extensions]
[ :refer [WSDataHandler get-patches-after]]
[gen-fhi.fhir-client.protocols :refer [Client] :as fdb]
[gen-fhi.fhirpath.core :as fp]))
Strangely this error is only occurring during compilation inside of a dockerfile (not compilation outside of it which works as expected). Though I'm not sure what difference between the two would cause this issue.
My clojure versions are the same between dockerfile and my native environment and compilation has worked fine up until adding this import of dynamic variable nested-tx
. Deps are getting installed and deps unrelated to that dynamic variable get resolved (commenting that line out and removing the line where I bind the variable leads to successful compilation). My only guess at this point would be a difference in java versions between my native environment and docker is causing the issue?*nested-tx*
appeared only in 1.1.547
. Which makes me think that maybe somehow the classpath inside your container is different. Maybe different aliases are used, maybe something else is off.
There are two versions of next.jdbc (in both native environment and on docker). I'm guessing in docker it's resolving to the wrong version (prev version before nested-tx seancorfield/next.jdbc/1.0.7/
) I'll need to figure out why next.jdbc is getting installed twice. Does the clj cli tool have a way to show a dep tree? searching my repo this appears to be a transitive dependency.
It's working! thanks for the help @U2FRKM4TW! I had two next.jdbc packages and the lib was getting resolved differently between the two environments (my guess would be this is caused by different java versions). I bumped the package that had the transitive dependency to the outdated next.jdbc.