Coder Social home page Coder Social logo

usurping :main option about leiningen HOT 8 CLOSED

technomancy avatar technomancy commented on July 24, 2024
usurping :main option

from leiningen.

Comments (8)

technomancy avatar technomancy commented on July 24, 2024

You'll have to give some more details; there's no way anyone could figure out the cause of the problem with just this.

from leiningen.

slagyr avatar slagyr commented on July 24, 2024

I have a bare-bones example of the symptom. But there no way to attach a file to this issue!?!? Email me directly ([email protected]) and I'll send you my example.

from leiningen.

technomancy avatar technomancy commented on July 24, 2024

Could you link to a gist with project.clj along with the commands you use to reproduce?

from leiningen.

slagyr avatar slagyr commented on July 24, 2024

Sure. Create a new lein project named "lein_issue" and use the following project.clj: http://gist.github.com/367386

Then in src/lein_issue/core.clj: http://gist.github.com/367391

from leiningen.

gavinheavyside avatar gavinheavyside commented on July 24, 2024

I've just encountered this as well when playing with a minimal compojure example, very similar to slagyr's. The server gets started during compilation with either lein compile or lein uberjar, and so the leiningen task never returns.

Leiningen 1.1.0 on Java 1.6.0_16 Java HotSpot(TM) 64-Bit Server VM

from leiningen.

technomancy avatar technomancy commented on July 24, 2024

You shouldn't start threads or servers in the top-level of the :main namespace. The intended use of the :main namespace is to provide a -main function (with gen-class) which is run when you execute the jar from the command-line. See the mire project for an example.

from leiningen.

 avatar commented on July 24, 2024

That makes sense.

from leiningen.

slagyr avatar slagyr commented on July 24, 2024

That last comment was actually from me. I was logged into the wrong account. I'll make the change to my project. Still, there seems to be a documentation issue. New users are bound to make the same mistake.

from leiningen.

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.