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

Could not locate tolitius /boot/helper__init.class or tolitius/boot/helper.clj on classpath. #4

Closed
crinklywrappr opened this issue Sep 29, 2016 · 5 comments

Comments

@crinklywrappr
Copy link

New to boot. I wanted to define check-sources in profile.boot but am getting this error when running boot check-sources on this project: https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-01.md

I can browse to the file in the the local maven repo, and boot show -c shows it in the classpath.

profile.boot:

(set-env! :dependencies '[[boot-deps "0.1.6"]
                          [tolitius/boot-check "0.1.3"]])

(require '[boot.repl]
         '[tolitius.boot-check :as check]
         '[boot-deps :refer [ancient]])

(swap! boot.repl/*default-dependencies* conj
       '[refactor-nrepl "2.0.0-SNAPSHOT"]
       '[cider/cider-nrepl "0.10.0-SNAPSHOT"])

(swap! boot.repl/*default-middleware* conj
       'refactor-nrepl.middleware/wrap-refactor)

(deftask check-sources []
  (comp
   (check/with-yagni)
   (check/with-bikeshed)
   (check/with-kibit)
   (check/with-eastwood)))

build.boot (in my project)

(set-env!
 :source-paths #{"src/cljs"}
 :resource-paths #{"html"}
 :dependencies '[[adzerk/boot-cljs "1.7.170-3"]])

(require '[adzerk.boot-cljs :refer [cljs]])
@crinklywrappr
Copy link
Author

Same error in the repl.

@tolitius
Copy link
Owner

check the demo boot-check project, you might need to add a boot-core as a "provided" dep as shown here.

there is an ask to remove boot-core dep which I agree with but it would have to be a pull request at this point.

let me know if it worked for you

@crinklywrappr
Copy link
Author

I had to place both libraries as deps in build.boot. Placing them both in profile.boot didn't do any good.

@tolitius
Copy link
Owner

tolitius commented Apr 7, 2017

closing this. feel free to reopen if there are more questions

@tolitius tolitius closed this as completed Apr 7, 2017
@dancmeyers
Copy link

This is probably because you have done the same as me, and your build.boot specifies dependencies as a quoted vector of vectors, i.e.

(set-env! :dependencies   '[[org.clojure/clojure "1.8.0"]
                            [com.taoensso/timbre  "4.7.4"]
...

so the set-env for dependencies in your profile.boot is thrown away/overwritten before the check-sources function is actually run. You can fix this by setting your dependencies using a conj/contact etc onto the existing dependencies list in build.boot, but that may come with it's own problems. I'm still trying to find an easier way.

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

No branches or pull requests

3 participants