nrepl / nrepl/nrepl

Extend the "describe" op with some extra runtime information

Open
#181 24 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
Clojure
Stars
906
Forks
108
Avg merge
18h 29m
Merged PRs (30d)
20

Description

Is your feature request related to a problem? Please describe.

Today it's hard to tell what's the runtime of the server you're connecting to (e.g. Clojure, ClojureScript, ClojureCLR, babashka, or some non-Clojure language like Racket, fennel, etc.).

One practical problem is that client often implement some functionality in terms of evaluating runtime-specific code, which often means that one client can't be used with different nREPL servers simply because it makes some assumptions that are not universally true.

If clients could easily infer that runtime of the server they can support easily different runtimes.

Describe the solution you'd like

I think we should agree that every nREPL server should return some extra metadata in the describe op:

  • runtime/language (e.g. Clojure)
  • protocol version (tracking the version number of the reference nREPL implementation) - not sure how useful this can be, but it won't hurt. I guess potentially this can be nrepl-version.
  • name of the server implementation (e.g. Ogion)
  • version of the server implementation (this should be different from nrepl-version I guess)

E.g. you can have something like:

{:runtime "racket"
  :protocol-version "0.7"
  :implementation-name "ogion"
  :implementation-version "0.1.0"}

Describe alternatives you've considered

I didn't manage to think of a good alternative.

@nrepl/nrepl @technomancy @borkdude setzer22 Let me know how this sounds to you.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading the existing describe operation and the nREPL protocol documentation. Clarify the metadata names and version semantics across server implementations, then define what each server should return and how interoperability will be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.