Closed NicMcPhee closed 9 years ago
I think I still need to understand a bit more about how namespaces are loaded onto/into one another before I even know why that line ended up there in the first place.
For instance, there's all kinds of ns
declaring in the code itself, right? Does core.clj
"automatically" make a namespace when the REPL is launched? Because I made this a library (maybe a poor choice?) there's no main
statement in project.clj
, so...
And then there's the whole question of whether I want to work in the REPL vs the code files, how does that even work? Not that I think I would be jumping back and forth, but it feels as though one could in exploratory testing... so?
Anyway, yeah. This seems fine at the moment, especially since any given REPL is tied up with (autotest)
anyway.
It's common for every file to start with a namespace declaration.
I think that (autotest)
is built to, by default, automatically look at all *.clj
files in src
and test
(and below), and run any tests that it finds there. You can tell it to look in additional/other places, but it looks there by default. So you can just start up autotest
, and anything you do in a file in src
or test
will automagically get tested.
If you want to access things in your namespaces from the REPL, then you'd need to use
or require
your namespace like you did. I tend to do my REPL work in my editor like LightTable, and just have autotest
running in a terminal, so my terminal doesn't need that use
statement. If you want to do REPL work in the same REPL that's running autotest
, though, then you might need it (or a require
, which would allow you to create a shorthand name for it).
I don't think this is necessary if we have the
project.clj
file set up correctly and have the standard directory structure. And when I tried to do it by hand it barfed errors at me. So I propose we remove it.I made a pull request instead of just removing it directly because I wasn't sure if you had found you needed that line on your end for some reason.