On windows, classpath in image uses backslash as file separator
jjttjj opened this issue · comments
When jibbit is used from windows, the classpaths used in the image will have backslashes instead of slashes in the file paths. This yields the following error when the image is run:
Error: Could not find or load main class clojure.main
Caused by: java.lang.ClassNotFoundException: clojure.main
I believe that the problem is this line:
Line 84 in 350da0b
If I replace :from-working-dir
there with :docker-path
things work as expected.
I can provide a pull request if you'd like.
Quote note: I'm still pretty new to containers in general and am still familiarizing myself with the jibbit source. (But really loving jibbit so far vs the alternatives, thanks for making it!)
After using and digging into jibbit a bit more, I'm thinking that using :docker-path
here is incorrect and just replacing the backlashes with slashed in the :from-working-dir
is better. This also fixes the issue for me.
I've hit another issue and I'm not sure if it's another Windows related thing or not: When using the :aot
option, resource paths in :local/deps
dependencies are not included. I was able to hack around this by including all :dir?
s resulting from the call to libs
, instead of just the ones with a :path-key
here, though this also includes some unnecessary source files.
I plan to dig into this further soon and can open a new issue if it turns out to be a separate thing, but wanted to ask first, do you yourself use Windows? I noticed the paths in the comment at the end of core.clj seem to be Windows paths, and if so that makes it likely I'm doing something else wrong somewhere else that is causing these issues.
Edit: I realized these are OSX paths not windows, woops
This issue has been automatically marked with stale because it has not had any activity in last 21 days. It will be closed in 14 days if no further activity occurs. To prevent closing, label with defer or blocked.