Questions tagged [deps-edn]

11 questions
2
votes
4 answers

Clojure: how to tell if code is running in the REPL or a JAR?

I am writing a CLI framework in Clojure called OneCLI. The main center piece of this framework is a function called go! which parses the command line, environment variables, and config files "for you" and runs one of several different user provided…
djhaskin987
  • 9,741
  • 4
  • 50
  • 86
2
votes
1 answer

Clojure (deps.edn) separate integration tests

How do you configure deps.edn so you run integration tests separately from unit tests? I have the following project tree: . ├── deps.edn ├── src │ (...) ├── test │ └── package │ └── test.clj └── it    └── package    └──…
Victor Basso
  • 5,556
  • 5
  • 42
  • 60
1
vote
1 answer

How to avoid duplication of dependency declaration in a Clojure/ClojureScript project?

I have been using Clojure, ClojureScript, lein, shadow-cljs, re-frame, reagent, Emacs, and CIDER to work on a Clojure/ClojureScript dynamic web app project. Currently, dependencies are being declared on project.clj, on shadow-cljs.edn, and on…
Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
1
vote
4 answers

What is a common convention for storing a project version number in a Clojure project?

Our team is working with Clojure projects that use deps.edn We are used to NPM projects where we store the version number in the package.json file. It looks like Leiningen users may have stored the version number in a project.clj file before. Is…
jkndrkn
  • 4,012
  • 4
  • 36
  • 41
1
vote
1 answer

How to set default value for *print-length* in deps.edn

My need is similar to clojure - What's the correct way of providing a default value for print-length in profiles.clj? - Stack Overflow. I want to learn how to set default value for *print-length* inside deps.edn instead of project.clj of leiningen.
Mert Nuhoglu
  • 9,695
  • 16
  • 79
  • 117
0
votes
1 answer

Syntax error (ClassNotFoundException) compiling at (deps.edn:0:0). JSON Clojure error

I am trying to use the JSON library on clojure, but I am not able to install it, and I instead get the [org.clojure/data.json "2.4.0"] Syntax error (ClassNotFoundException) compiling at (REPL:0:0). org.clojure error message, I am using IntelliJ…
0
votes
1 answer

how to cross-compile windows linux macos ubejar for javafx with deps.edn aliases?

Nightcode has this implemented https://github.com/oakes/Nightcode/blob/2e112c59cddc5fdec96059a08912c73b880f9ae8/deps.edn#L20 but for some reason it does not work just by copying code ; does not work {:paths ["./src" "out/ui" "out/identicon"] …
0
votes
2 answers

How to compile all source and tests before running -M or -X from deps.edn?

My project has some code that requires AOT compilation. Below is a shortened version of my deps.edn. The only way I have found to compile some code before each test run is to add a -e (compile,'my.project.namespace) pair to the :main-opts. This…
Erp12
  • 600
  • 3
  • 16
0
votes
1 answer

How do you refer to or reuse one alias from another using deps.edn?

It seems as though it's not possible to reuse one deps.edn alias from another, but I'd love to be proven wrong about this. For example, say you have a :dev alias with some :extra-deps, :extra-paths, etc, and then a handful of dev-related aliases…
metasoarous
  • 2,854
  • 1
  • 23
  • 24
0
votes
1 answer

Why is clojure deps adding `/main/clojure` to classpath when using `:local/root`?

I am trying to link a local project to another local project that is under development using tools.deps :local/root option in deps.edn. It isn't working. I can't require the library's namespaces, and the path is correct. The deps.edn entry looks…
fraxture
  • 5,113
  • 4
  • 43
  • 83
0
votes
1 answer

How do I use cljsjs packages in a deps.edn project

I've tried adding a dependency to my deps.edn: {:deps {cljsjs/js-yaml {:mvn/version "3.3.1-0"} ...} But I'm not able to call functions from that library. In the REPL: cljs.user=> (require '[cljsjs.js-yaml]) cljs.user=>…
Victor Basso
  • 5,556
  • 5
  • 42
  • 60