GithubHelp home page GithubHelp logo

Comments (5)

sbalabanov-zz avatar sbalabanov-zz commented on April 20, 2024

Closing all issues older than 6 months; please reopen if it is still relevant

from nailgun.

jason-s avatar jason-s commented on April 20, 2024

please reopen, i can't reopen

from nailgun.

sbalabanov-zz avatar sbalabanov-zz commented on April 20, 2024

Usually people write their own wrappers for that (for example, that is how it is done in Buck) but you are welcome to come up with a PR.

from nailgun.

jvican avatar jvican commented on April 20, 2024

I think it would be interesting if this is solved in the nailgun repository instead of the downstream tools. It would allow us tooling authors to reuse code and avoid writing (and testing) it ourselves.

from nailgun.

skull-squadron avatar skull-squadron commented on April 20, 2024

@jvican Absolutely great idea. N-downstreams shouldn't reinvent the wheel with layers of scripting and neither should casual DIY builders from source to get something going.

I was working on a replacement nailgun Homebrew formula when I encountered this issue and the Java 18+ Security Manager removal issue. Currently, the original formula is deprecated and at risk for removal.

It should be doable by adjusting ng:

  • Add a new script or executable ng-server to Do The Right Thing™. If someone wants to get adventurous, write it in C99 instead of Bourne shell/Py
  • Add a switch --nailgun-server-autostart true|false and/or environment variable NAILGUN_SERVER_AUTOSTART to ng to enable/disable ng-server auto-spawning (enabled by default to be sensible)
  • Pass ng environment to ng-server. Obviously, only the first run
  • Perhaps leave a note to the user to restart the server if the environment is important, and that the tty will/could be different between ng-server and other instances of ng. Very adventurous to add environment communication between ng and ng-server/NGServer to work more intuitively in more use-cases

For ng-server:

  • optional NAILGUN_SERVER - ip (should default to 127.0.0.1/::1 rather than all interfaces for security reasons)
  • optional NAILGUN_PORT - port (defaults to 2113)
  • optional JAVA_HOME - should be respected to locate {{JAVA_HOME}}/bin/java, but also on macOS it's always a call to java that handles JVM selection via JAVA_HOME
  • required new NAILGUN_SERVER_JAR - abs- or script-relative path of the server .jar to throw into the -cp as it will vary widely on systems
  • ng-server also needs to disown the java process so it backgrounds properly

Prior art on ng servers:

  • Bloop
  • JRuby

from nailgun.

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.