Code Monkey home page Code Monkey logo

Comments (11)

furkan3ayraktar avatar furkan3ayraktar commented on June 17, 2024

I have no experience with Emacs/Cider, so I don't know what the issue is here. The stack trace is not very helpful either. One thing that comes to mind is if you included the correct aliases when starting your REPL. :dev and :test aliases should be included while starting the REPL for the project to work. Have you figured out any solutions yet?

from clojure-polylith-realworld-example-app.

BuddhiLW avatar BuddhiLW commented on June 17, 2024

I haven't. I was reading about polylith, and wanted to inspect the project, locally. Upon being stuck, I just documented the error, here, and moved on.

The stack trace is not very helpful either. 

I agree.

One thing that comes to mind is if you included the correct aliases when starting your REPL. :dev and :test aliases should be included while starting the REPL for the project to work.

I don't have this option, upon cider start and until I get the error

from clojure-polylith-realworld-example-app.

furkan3ayraktar avatar furkan3ayraktar commented on June 17, 2024

It could be a good idea to ask this question in Clojurians Slack. There may be some people using Emac/Cider together with Polylith.

from clojure-polylith-realworld-example-app.

vemv avatar vemv commented on June 17, 2024

(CIDER maintainer here)

I was able to run this project in CIDER without a problem.

Does the /bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl command pass on a vanilla shell?

I don't have this option, upon cider start and until I get the error

Yes, you do, it's the cider-clojure-cli-aliases option. See https://docs.cider.mx/cider/basics/up_and_running.html or simply query the cider-clojure-cli-aliases docs within Emacs

cider/cider-nrepl {:mvn/version "0.30.0"} indicates you're a touch behind. I'd recommend using CIDER at Git master or its latest snapshot (20231008.2124 as of today).

If it persists after trying all those, feel free to create a detailed issue in CIDER.

Cheers - V

from clojure-polylith-realworld-example-app.

seancorfield avatar seancorfield commented on June 17, 2024

I suspect your clojure command is either very old or is not the official CLI.

What does clojure -version display?

from clojure-polylith-realworld-example-app.

BuddhiLW avatar BuddhiLW commented on June 17, 2024

You are right.

I recently reformatted my PC and just fresh-installed Clojure and Cider.

The project runs as it should.

Thanks people!

from clojure-polylith-realworld-example-app.

BuddhiLW avatar BuddhiLW commented on June 17, 2024

Just to make an addendum, I use doom emacs, and all my packages are installed through doom extensions. And, I regularly update it.

The current repl spawn message is the following:

nREPL server started on port 42277 on host localhost - nrepl://localhost:42277
;; Connected to nREPL server - nrepl://localhost:42277
;; CIDER 1.7.0-snapshot (package: 1.7.0-snapshot), nREPL 1.0.0
;; Clojure 1.11.1, Java 17.0.9-ea
;;     Docs: (doc function-name)
;;           (find-doc part-of-name)
;;   Source: (source function-name)
;;  Javadoc: (javadoc java-object-or-class)
;;     Exit: <C-c C-q>
;;  Results: Stored in vars *1, *2, *3, an exception in *e;
;;  Startup: /usr/local/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
user> 

from clojure-polylith-realworld-example-app.

vemv avatar vemv commented on June 17, 2024

That's the standard CIDER repl init message. Probably can be customized away.

That CIDER is quite behind, but they're on it

from clojure-polylith-realworld-example-app.

BuddhiLW avatar BuddhiLW commented on June 17, 2024

I can enforce a package to be fetched from github, for example. I will do that with Cider, for now. Thanks for the heads up.


A question, I'm trying to use .dir-locales.el in order to modify cider-clojure-cli-aliases. But, I'm not sure how I would do it.

;; cider-clojure-cli-aliases
((cider-clojure-cli-aliases . ":dev"))

As, the emacs doc:

cider-clojure-cli-aliases is a variable defined in ‘cider.el’.

Its value is nil

A list of aliases to include when using the clojure cli.
Alias names should be of the form ":foo:bar".
Leading "-A" "-M" "-T" or "-X" are stripped from aliases
then concatenated into the "-M[your-aliases]:cider/nrepl" form.

  This variable is safe as a file local variable if its value
  satisfies the predicate ‘stringp’.
  This variable was introduced, or its default value was changed, in
  version 1.1 of the cider package.
  You can customize this variable.

Currently, I'm unable to inject the :dev alias

from clojure-polylith-realworld-example-app.

vemv avatar vemv commented on June 17, 2024

It's named .dir-locals.el (probably you didn't make that typo, but just in case)

If it's not getting picked up that's a generic Emacs problem. I'd try luck over Clojurians #emacs or #doom-emacs

from clojure-polylith-realworld-example-app.

BuddhiLW avatar BuddhiLW commented on June 17, 2024

Thanks for the correction. I committed the typo only here, indeed.

Well, I went raw for the M-x customize... which is not ideal. But, I was able to run everything.

That's more than enough for now! :)

pic-full-231106-1622-00

from clojure-polylith-realworld-example-app.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.