duct-framework / duct

Server-side application framework for Clojure
MIT License
1.13k stars 51 forks source link

Fix path where the `local.clj` file is created #59

Closed michalvalasek closed 6 years ago

michalvalasek commented 7 years ago

When called duct setup the local.clj file is created at a wrong location so that it cannot be loaded in the dev env.

This change updates the part of the code that creates the file so that the file is created at the correct location (dev/src/clj/local.clj).

weavejester commented 7 years ago

dev/src/clj/local.clj isn't the correct location.

The source path is dev/src, the resource path is local.clj, therefore the full path is dev/src/local.clj. Where are you getting dev/src/clj from?

michalvalasek commented 7 years ago

Hi! The local doesn't work if the file isn't in the clj/ folder - the values in local.edn don't override the ones from dev.edn because the local.edn isn't loaded because the local.clj isn't found (see condition in dev.clj:20).

weavejester commented 7 years ago

I still don't know where you're getting the dev/src/clj path from.

What does your project.clj file look like? Have you changed the :source-paths key?

zerg000000 commented 7 years ago

would @michalvalasek not starting the repl using dev profile? The local.clj and local.edn actually loaded by dev.clj in dev profile.

dev.clj

...
(when (io/resource "local.clj")
  (load "local"))
...