weird how lein opens in the non-user namespace, too
@corasaurus-hex we usually put them under the dev/
directory
I suppose that can be configured, too
and just navigate to them and load them into the repl?
this is a really hard thing to get without being shown, I think
We include the dev path when running lein repl and then yeah load them in via the editor or tools.namespace refresh.
An example project would be very useful. I totally agree.
@corasaurus-hex Definitely somewhere in a development path so they don't get compiled into the app or uberjar. Like @nate mentioned, our default choice is dev/fiddle
.
Thanks for the feedback. I like the idea of doing a demo video.
"We include the dev path when running lein repl" ?
what does that mean exactly?
the possibilities here are uh a lot https://github.com/technomancy/leiningen/blob/stable/sample.project.clj
Ah yes. lein
has tons of options. What I mean by "dev path" is a path that is only included when you run the repl. In lein, that would be the :dev
profile. Let me get an example....
So I have this inside my project.clj
file:
:profiles
{:uberjar
{:aot :all}
:dev
{:resource-paths ^:replace
["dev" "resources"]
:plugins
[[lein-ancient "0.6.15"]
[jonase/eastwood "0.2.6"]]
:dependencies
[[org.clojure/tools.namespace "0.2.11"]
[com.stuartsierra/component.repl "0.2.0"]]
:eastwood
{:add-linters [:keyword-typos :unused-namespaces :unused-private-vars]}
}})
Note the :dev
profile with the "dev"
path.
When you run lein repl
, it automatically includes any settings in the :dev
profile.
I see org.clojure/tools.namespace too
I'm pretty sure component.repl
pulls it in, but just in case. 🙂
I'm using cider refresh stuff
cool, so, this is very helpful. thanks!
This is the closest we have to a "demo" right now: https://github.com/app-sauce/fiddle-driven-development-2018-talk
@nate Did that for the LA meetup.
awesome
thanks
ah, you make it mirror the other file structure
Ah yes. It's "just another" source path. Same structure as "src".
It's incredibly useful that Clojure can take more than one source path and merge the all together.
I didn't realize that for a long time myself.