Skip to content

CLI REPL does not accept CIDER middleware #2

Description

@seancorfield

Add cider/cider-nrepl {:mvn/version "0.62.2"} to your dependencies for starting the CLI REPL.

Add cider.nrepl/cider-middleware to your :middleware configuration.

Attempt to start the CLI REPL. You will get:

Execution error (IllegalArgumentException) at nrepl.server/default-handler$fn (server.clj:152).
Key must be integer

The problem is that cider.nrepl/cider-middleware is a vector of middleware symbols, not a simple m/w itself.

In the nREPL command-line, it unpacks these vectors to create a single list of all middleware: https://github.com/nrepl/nrepl/blob/master/src/clojure/nrepl/cmdline.clj#L447-L471

The CLI REPL is missing this step mapcat handle-seq-var essentially.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions