boot-lein-generate icon indicating copy to clipboard operation
boot-lein-generate copied to clipboard

Adding dev source paths to lein project

Open danielcompton opened this issue 8 years ago • 3 comments
trafficstars

My boot project has a dev source folder which isn't in the default environment, but is added by a task. What would be the recommended way to inject this into the Leiningen profile?

I tried adding

:lein {:profiles {:dev {:source-paths ["dev"]}}}

to my set-env! call, but that didn't seem to work. Looking at the boot.lein code, I couldn't see the :lein keyword being used anywhere?

danielcompton avatar Apr 01 '17 03:04 danielcompton

What gave you the idea to try (set-env! :lein {...})? Maybe we can look at that source and understand the general philosophy behind it. I think the fundamental problem here is the clash of the imperative approach of boot and the declarative approach of lein. It's also probably time to set the goal of this project by clearly stating it in the README.

onetom avatar Apr 02 '17 05:04 onetom

What problem does it cause not having {:profiles {:dev {:source-paths ["dev"]}}} in your project.clj? My guess would be that Cursive won't give you symbol resolution for files in that directory.

onetom avatar Apr 02 '17 05:04 onetom

What gave you the idea to try (set-env! :lein {...})?

The code comment at boot.lein said to use the :lein key.

What problem does it cause not having {:profiles {:dev {:source-paths ["dev"]}}} in your project.clj? My guess would be that Cursive won't give you symbol resolution for files in that directory.

Yep, exactly.

danielcompton avatar Apr 02 '17 19:04 danielcompton