move env var handling into profiles.clj#30
move env var handling into profiles.clj#30martinklepsch wants to merge 1 commit intoplexus:masterfrom
Conversation
64ba986 to
210d4f3
Compare
|
Not sure I like pulling out just that part to profiles.clj. If we're gonna introduce profiles.clj then better move all the profile definitions there. This is a very specific issue though. A beginner who wants to add stuff to the env will more likely do so directly in project.clj. |
|
If we move all the definitions there we'd have to check it into version control as well right? With just using
Probably you're right about this. Eventually though I think people want to avoid dirty files in their working directory. |
|
oh right, you would generate How I see it is that how leiningen profile merging works is inherently confusing if you're not used to it. So far all profiles were kept in |
|
It's not that all the profiles have to be moved to |
|
For what it's worth, my approach is here: I have profiles for |
|
So actually my suggestion of using
With this in mind the only setup that seems to be possible to separate local |
|
I tested the |
I've just noticed a problem trying to set some custom environment variables in a
profiles.cljin the project dir. As soon as you specify an:envkey in there the:is-devenv var is dropped. I.e. the contents of the:envkey in myprofiles.cljreplace the contents of the:envkey in theproject.clj.There are two things that could be done:
:is-devkey intoprofiles.clj, commit once, add to.gitignore:project/devand:profiles/devthat are then aliased to:dev(see more below)I'm in favour of the first option, as it's much simpler and intuitive to newcomers, PR attached.
Some IRC conversations I had about this as I was surprised myself: