Raynes / lein-bin

Standalone console executables for your project.
155 stars 19 forks source link

Remove "-client" from jvm preamble #11

Closed dinedal closed 11 years ago

DAddYE commented 11 years ago

+1

Raynes commented 11 years ago

I'm going to need a little information here, guys.

dinedal commented 11 years ago

Right now, every executable built with lein-bin will include "-client" which forces the HotSpotVM to use an approach that is good for short running programs.

If you want to build a long running process with lein-bin, you can not use the "-server" setting, since the "-client" setting is always first in the options.

By removing it, the machine's default is used instead, or you can manually specify either in :jvm-opts

Raynes commented 11 years ago

That seems fine. @drewr added this with the purpose of speeding things up for lein-bin's most common use-case, which is to build standalone executables for end-user consumption. I would kinda like to default to -client, but meh, this is fine.

@drewr If you're particularly attached to having -client be the default, I think I'd be fine with accepting a patch that gracefully defaults to it.

dinedal commented 11 years ago

@Raynes Thank you for merging. I wasn't aware of the original need. I can provide such a patch if you or @drewr like.

drewr commented 11 years ago

@dinedal Please do. I certainly don't mind making the server case better as long as it doesn't make the client case suffer. It's easy to type java -server -jar foo.jar some opts that probably come from a config file anyway once into my init system and forget about it; it's quite the opposite to continually type java -client -jar baz.jar -- --opt 1 --arg 2 bizzle quux etc at the command line.

dinedal commented 11 years ago

@drewr Expect a patch tomorrow.