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

Command line --checkouts option fails with NPE #636

Open
martinklepsch opened this issue Aug 2, 2017 · 1 comment
Open

Command line --checkouts option fails with NPE #636

martinklepsch opened this issue Aug 2, 2017 · 1 comment

Comments

@martinklepsch
Copy link
Member

Providing the checkouts option on the command line currently throws an exception:

boot --dependencies clojure.java-time:0.3.0 --checkouts clojure.java-time:0.3.0 repl
java.lang.NullPointerException
	at boot.main$dep_ns_decls.invoke(main.clj:52)
	at boot.main$export_task_namespaces$fn__1667.invoke(main.clj:65)
	at clojure.core$map$fn__4785.invoke(core.clj:2644)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:521)
	at clojure.core$seq__4357.invokeStatic(core.clj:137)
	at clojure.core$apply.invokeStatic(core.clj:641)
	at clojure.core$mapcat.invokeStatic(core.clj:2674)
	at clojure.core$mapcat.doInvoke(core.clj:2674)
	at clojure.lang.RestFn.invoke(RestFn.java:423)
	at boot.main$export_task_namespaces.invoke(main.clj:67)
	at boot.main$_main.invoke(main.clj:179)
	at clojure.lang.Var.invoke(Var.java:394)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:159)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:150)
	at boot.App.runBoot(App.java:399)
	at boot.App.main(App.java:488)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at Boot.main(Boot.java:258)
@slava92
Copy link

slava92 commented Jan 21, 2019

It seems the issue is due the --dependencies and --checkouts referring to the same artifact. As a result, (pod/resolve-dependency-jar ...) returns nil for that dependency when it takes out :checkouts out of :dependencies under the hood.
My guess is that :dependencies and :checkouts are mutually exclusive. When I tried to implement removal of :checkouts out of :dependencies, boot appears to be working fine.
My patch is at /boot/core/src/boot/main.clj
I might be wrong though about two list being mutually exclusive.
Please take a look.
Slava

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