Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot run not working out of the box for lack of env #515

Open
euporos opened this issue Nov 7, 2020 · 3 comments
Open

boot run not working out of the box for lack of env #515

euporos opened this issue Nov 7, 2020 · 3 comments

Comments

@euporos
Copy link

euporos commented Nov 7, 2020

It seems there's a problem with the template when used with the +boot flag. When I type boot run I get the following error:

java.io.FileNotFoundException: Could not locate lumboot/env__init.class, lumboot/env.clj or lumboot/env.cljc on classpath.
   clojure.lang.ExceptionInfo: Could not locate lumboot/env__init.class, lumboot/env.clj or lumboot/env.cljc on classpath.

AFAICT this is because none of the the env-directories are added to the classpath. I've gotten it to to work by prepending the following to the body of the run task:

(merge-env! :source-paths #{"env/prod/clj"}
              :resource-paths #{"env/prod/resources"})

Since I'm fairly new to Luminus I'm unsure if this is the correct solution. Maybe this is not even a bug, in which case instructions as to how the run task should be used would be helpful.

@yogthos
Copy link
Member

yogthos commented Nov 7, 2020

Unfortunately I'm not too familiar with boot myself. @DonyorM might be able to confirm if this is the way to go since he originally added boot support. I'd be open for a pr as well since it looks like the solution gets around the problem.

@euporos
Copy link
Author

euporos commented Nov 8, 2020

Thanks for the quick reply! After experimenting some more this morning I have now properly understood that dev and prod are mere configuration tasks. If one combines run with either of them (boot dev run or boot prod run) it works just fine – i guess that's the way it's actually supposed to be used… it's just that I didn't get it.
Since this turns out to most likely be a feature, all one might conclude from this “issue” would be to include instructions on the proper use somewhere – lein use is much better documented that boot.

Anyway, thanks again and cheers!

@yogthos
Copy link
Member

yogthos commented Nov 8, 2020

Ah yeah that makes sense. I'll update the docs to mention this, and thanks for following up on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants