tenzing icon indicating copy to clipboard operation
tenzing copied to clipboard

WARNING: unable to produce boot.properties file

Open sonwh98 opened this issue 9 years ago • 9 comments

here is the shell output:

sto@obi:~/workspace$ lein new tenzing foobar
Generating fresh 'lein new' tenzing project.
WARNING: unable to produce boot.properties file.

sonwh98 avatar Dec 22 '15 21:12 sonwh98

The boot.properties file is generated using boot itself, can you try the following:

boot -V BOOT_CLOJURE_VERSION="1.7.0" boot -V

Perhaps you don't have boot installed yet?

crisptrutski avatar Dec 22 '15 22:12 crisptrutski

I do have boot installed:

sto@obi:~/workspace$ boot -V
#http://boot-clj.com
#Tue Dec 22 17:23:03 EST 2015
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.5.2

perhaps when the shell is executed boot is not in the path? I installed boot in /usr/local/bin

sonwh98 avatar Dec 22 '15 22:12 sonwh98

BTW, thanks to all the contributors for this template! great place to start for someone migrating from lein

sonwh98 avatar Dec 22 '15 22:12 sonwh98

Damn, was hoping it was something super simple :wink:

Perhaps try this from boot repl to get an idea of what the error is:

(require '[clojure.java.shell :as sh])
(sh/sh "boot" "-V" :env {:BOOT_CLOJURE_VERSION "1.7.0"})

The path explanation doesn't seem to fit, this would be inherited from your shell, which you've demonstrated to have boot.

crisptrutski avatar Dec 24 '15 07:12 crisptrutski

@crisptrutski thanks for the tip.

boot.user=> (sh/sh "boot" "-V" :env {:BOOT_CLOJURE_VERSION "1.7.0"})
{:exit 127, :out "", :err "/usr/local/bin/boot: line 6: exec: java: not found\n"}

It seems java isn't in the PATH of boot. Reading the docs of clojure.java.shell, it seems providing an :env map overrides the environmental of the current user.

without the :env param, it was able to find java and executed fine

boot.user=> (sh/sh "boot" "-V" )
{:exit 0, :out "#http://boot-clj.com\n#Fri Dec 25 20:02:29 EST 2015\nBOOT_CLOJURE_NAME=org.clojure/clojure\nBOOT_CLOJURE_VERSION=1.7.0\nBOOT_VERSION=2.5.2\n", :err ""}

sonwh98 avatar Dec 26 '15 01:12 sonwh98

@martinklepsch perhaps we should remove this env variable, since 1.7.0 is the default now anyway

crisptrutski avatar Dec 28 '15 15:12 crisptrutski

@sonwh98 do you any suggestions to make this more robust?

crisptrutski avatar Jan 05 '16 15:01 crisptrutski

The template works fine without the boot.properties so why not just remove it?

sonwh98 avatar Jan 05 '16 22:01 sonwh98

It was created because 1.6.0 was still popular at the time but wasn't supported, probably could survive without it now. Creating a boot.properties file is still best practice though...

Perhaps attempt to create it, and on failure just issue a warning line saying unable to create, and showing the command.

crisptrutski avatar Jan 06 '16 07:01 crisptrutski