I can't run Dirac on MacOS, it keeps complaining about org.clojure/data.json - even though it is listed as a dependency

Open
#98 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
clojure, macos
Domain
cli, devtools

Research direction

Start with the installation instructions and the dirac entry point, then inspect the failure in dirac.nrepl.compilation.direct at direct.clj. Reproduce the command both outside a project and with the shown project.clj, checking how the runtime classpath is assembled. Done means identifying why org.clojure/data.json is unavailable and documenting or fixing the supported invocation.

Written by the indexing model from the issue text.

Description

Hi,

I am trying to install Dirac on a Macbook Air M1 running Monterey 12.5.

I am following the documentation which indicates:

curl -s https://raw.githubusercontent.com/binaryage/dirac/master/install > /tmp/dirac.install && sudo bash /tmp/dirac.install

The installation seems to have worked out since it exists on binaries:

   Pedros-MacBook-Air:bin pedro$ pwd
   /usr/local/bin

   Pedros-MacBook-Air:bin pedro$ ls -1
   dirac
   lein

Unfortunately, when I go to the 2nd step on manual which is running dirac, the error below is retrieved:

   Pedros-MacBook-Air:bin pedro$ dirac
   WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/update-vals
   WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/update-keys
   WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer, being replaced by: #'clojure.tools.analyzer.utils/update-vals
   WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: clojure.tools.analyzer, being replaced by: #'clojure.tools.analyzer.utils/update-keys
   WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.passes, being replaced by: #'clojure.tools.analyzer.utils/update-vals
   WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.passes.uniquify, being replaced by: #'clojure.tools.analyzer.utils/update-vals
   Execution error (FileNotFoundException) at dirac.nrepl.compilation.direct/eval15283$loading (direct.clj:1).
   Could not locate clojure/data/json__init.class, clojure/data/json.clj or clojure/data/json.cljc on classpath.

Full report at:
/var/folders/fh/7d_1drwd2ps3zw03j9ftkqs80000gn/T/clojure-1010884132545121253.edn

Initially, I tried running it at home folder. I thought it would work out fine.

Then, I decided to run it inside a project folder that had the file clojure/data/json.clj
included in the the project.clj file. Unfortunately, even this approach did not work out.

Below you see a simplified version of the project.clj file:

(defproject abcd    ; Should be copied from shadow-cljs.edn
  :description "xxxx"
  :url "xxxx"

  :dependencies [[org.clojure/clojure "1.9.0"]
                 [org.clojure/clojurescript "1.10.339"]
                 [org.clojure/tools.nrepl "RELEASE"]
                 [binaryage/devtools ~devtools-version]
                 [binaryage/dirac ~dirac-version]
                 [org.clojure/data.json "2.4.0"]
                 [figwheel ~figwheel-version]
                 ;; Selmer for templating of .json config files
                 [selmer "1.12.50"]]

... (omitted content because it seems irrelevant) ...

  :profiles {:repl
             {:repl-options {:port             8230
                             :nrepl-middleware [dirac.nrepl/middleware]
                             :init             (do
                                                 (require 'dirac.agent)
                                                 (dirac.agent/boot!))


}}})

1 - I thought Dirac would work out even outside of the project folder. Is it necessary to be in the project folder?

2 - Why is Dirac complaining about the Json library even though it is listed as a dependency?
Is there any difference between clojure/data/json.clj (error message retrieved) and org.clojure/data.json (my dependency)?

Thanks!

Dominant language
Clojure
Stars
775
Forks
29
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from binaryage/dirac

All issues in binaryage/dirac

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.