Fork me on GitHub
#leiningen
<
2022-04-13
>
Noah Bogart20:04:10

i realize that it's helpful for repl-driven development for :dev to be in the default profile, but it seems weird to me that :test also gets access to :dev. I just ran into an issue where my code runs with lein repl and lein test, but fails with lein uberjar because i had accidentally required one of my dev namespaces in my core code

Noah Bogart20:04:28

is there a way to enforce that the test task only runs with the :test profile? outside of lein with-profile test test of course. i'd like to enforce this across my team

vemv06:04:05

I use lein with-profile -dev test The enforcement is that it runs on CI. Once you get used to some or other incantation, using bare lein test will feel just wrong

Noah Bogart13:04:12

oh yeah, i can subtract! forgot about that. thanks, i'll add that

noisesmith23:04:53

would lein check have caught this? I suspect it would have. I often use it because it runs quickly and finds "low hanging fruit" errors that are easier to fix the sooner you find them