Anyone know the best way to get a heroku deploy using this: https://www.gertgoet.com/2019/02/06/deploying-a-tools-deps-clojure-project-to-heroku.html working on windows? I think I just need to make the bin/build
script executable. Is there a way to do that without WSL?
you mean setting a file to executable in general in Windows?
I believe it says it is executable in windows already
so setting posix permission
Basically when I push to heroku I want it to use the bin/build
script but it seems to be being ignored
Ah, that sounds promising
@jjttjj Can you try this?
$ clj -Sdeps '{:deps {nate/fs {:git/url "<https://github.com/nate/fs>", :sha "e016dc87d8304cf14f5777e9d04992c86d13fd86"}}}'
Clojure 1.10.1
user=> (require '[nate.fs])
nil
user=> (nate.fs/set-posix-file-permissions "foo" "rwxr-xr-x")
#object[sun.nio.fs.UnixPath 0x48eb9836 "foo"]
where "foo"
is the path of your fileclj -Sdeps '{:deps {nate/fs {:git/url "<https://github.com/nate/fs>", :sha "e016dc87d8304cf14f5777e9d04992c86d13fd86"}}}' Error building classpath. count not supported on this type: Symbol
java.lang.UnsupportedOperationException: count not supported on this type: Symbol
at clojure.lang.RT.countFrom(RT.java:671)
at clojure.lang.RT.count(RT.java:643)
at clojure.tools.deps.alpha.extensions.git$eval982$fn__984.invoke(git.clj:21)
at clojure.lang.MultiFn.invoke(MultiFn.java:239)
at clojure.tools.deps.alpha$canonicalize_deps$fn__1136.invoke(alpha.clj:69)
at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49)
at clojure.core.protocols$fn__8140.invokeStatic(protocols.clj:75)
at clojure.core.protocols$fn__8140.invoke(protocols.clj:75)
at clojure.core.protocols$fn__8088$G__8083__8101.invoke(protocols.clj:13)
at clojure.core$reduce.invokeStatic(core.clj:6828)
at clojure.core$reduce.invoke(core.clj:6810)
at clojure.tools.deps.alpha$canonicalize_deps.invokeStatic(alpha.clj:68)
at clojure.tools.deps.alpha$canonicalize_deps.invoke(alpha.clj:66)
at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:236)
at clojure.tools.deps.alpha$resolve_deps.invoke(alpha.clj:217)
at clojure.tools.deps.alpha.script.make_classpath2$create_classpath.invokeStatic(make_classpath2.clj:55)
at clojure.tools.deps.alpha.script.make_classpath2$create_classpath.invoke(make_classpath2.clj:47)
at clojure.tools.deps.alpha.script.make_classpath2$run_core.invokeStatic(make_classpath2.clj:81)
at clojure.tools.deps.alpha.script.make_classpath2$run_core.invoke(make_classpath2.clj:72)
at clojure.tools.deps.alpha.script.make_classpath2$run.invokeStatic(make_classpath2.clj:101)
at clojure.tools.deps.alpha.script.make_classpath2$run.invoke(make_classpath2.clj:95)
at clojure.tools.deps.alpha.script.make_classpath2$_main.invokeStatic(make_classpath2.clj:146)
at clojure.tools.deps.alpha.script.make_classpath2$_main.doInvoke(make_classpath2.clj:118)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.main$main_opt.invokeStatic(main.clj:514)
at clojure.main$main_opt.invoke(main.clj:510)
at clojure.main$main.invokeStatic(main.clj:664)
at clojure.main$main.doInvoke(main.clj:616)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:40)
@jjttjj please try the -Sdeps argument in a deps.edn file. The quoting on Windows is a bit surprising.
sure
Ahh, getting
(fs/set-posix-file-permissions "bin/build" "rwxr-xr-x")
Execution error (UnsupportedOperationException) at sun.nio.fs.AbstractFileSystemProvider/setAttribute (AbstractFileSystemProvider.java:80).
View 'posix' not available
I can run bash
on windows and use chmod
but that doesn't seem to be working either, maybe I just need to run git push from linux?
I'm not sure what the path should be on Windows, but can you try instead of "bin/build" "bin\\build"?
@corasaurus-hex ^ I guess that function doesn't work on Windows? might be good to document in the lib
sorry, I give up from here on 🙂
no prob, I suppose another route might be change this line here: to https://github.com/heroku/heroku-buildpack-clojure/blob/e43bfbe37859e84ca482176029521e5d0481bd3a/bin/compile#L139
yep, definitely doesn't work on windows
in the heroku build pack
Nate: ok, thanks for confirming
it's a little tricky to make it general enough while also providing conveniences for the various platforms. I'm interested in adding some windows-only conveniences but I don't have a windows system to develop on
also: really any documentation would be preferable to the total lack of docs right now 😅
hey, no problem 😃
hmmm, there's nothing in the BasicFileAttributeView or DosFileAttributeView about setting things to be executable
I'll have to research that later
maybe this works in git bash or something in Windows
oh, maybe
WSL or whatever
fwiw, changing
  if [ -x $BUILD_DIR/bin/build ]; then
Line in the heroku buildpack to just use -f
instead of -x
, and then chmod +x
the file there works for me