Giter VIP home page Giter VIP logo

Comments (6)

dotemacs avatar dotemacs commented on May 30, 2024

How should this be handled?

Here:
https://github.com/nrepl/nREPL/blob/master/src/clojure/clojure/tools/nrepl/cmdline.clj#L70

and here:
https://github.com/clojure-emacs/nREPL/blob/master/src/clojure/clojure/tools/nrepl/server.clj#L140

start-server is started with the port 0, the first available port.

Should it now start with port 7888 by default and if that port isn't free, then fall back to port 0 ?

from nrepl.

arrdem avatar arrdem commented on May 30, 2024

What does having a /default/ port buy us or nREPL as a library? Many Clojure tools benefit from NOT having a standard port they expect to bind, and consequently one is able to have many nREPLs on or port forwarded to one machine fairly easily.

from nrepl.

bbatsov avatar bbatsov commented on May 30, 2024

@arrdem Did you see what Chas had written?

Most users want to put an nREPL port on their app, and that should always be on a typical port. Auto-selection of a port is only desirable in tooling scenarios, and tooling authors can pass an argument to start-server.

Seems the point of this to have a default port when running an embedded nREPL server only.

from nrepl.

arrdem avatar arrdem commented on May 30, 2024

@bbatsov Ah. That makes sense as a minor convenience.

https://tools.ietf.org/html/rfc6335#section-8 seems relevant

https://www.iana.org/form/ports-services is the request form

from nrepl.

arichiardi avatar arichiardi commented on May 30, 2024

My 2c: I actually was thinking that a mechanism like .nrepl-port would be sufficient, most of the tooling now understands that - for local nrepl that is.

For remote ones, cider can store host:port pairs so it is basically just a matter of adding your own. Probably using a default like that would be a bit overkill?

from nrepl.

bbatsov avatar bbatsov commented on May 30, 2024

My 2c: I actually was thinking that a mechanism like .nrepl-port would be sufficient, most of the tooling now understands that - for local nrepl that is.

Yeah, that solves the problem for local development for most people. We should certainly start creating the file in nrepl.cmdline as well.

from nrepl.

Related Issues (20)

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.