Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong test selector used with lein do clean, test #54

Open
postspectacular opened this issue Oct 10, 2014 · 2 comments
Open

Wrong test selector used with lein do clean, test #54

postspectacular opened this issue Oct 10, 2014 · 2 comments

Comments

@postspectacular
Copy link

I've recently switched to @cemerick's 0.5.0-SNAPSHOT. version and using :prep-tasks [["cljx once"] "javac" "compile"]. When running the above lein command chain it does correctly generate cljx transforms, but the test command is then invoked for the 'user' ns only, even if I specify the :all test selector... running lein clean and lein TEST separately works fine though.

@cemerick
Copy link
Collaborator

cemerick commented Dec 8, 2014

This has nothing to do with selectors: Leiningen determines which namespaces to test before it "preps" a project, and that namespace-scanning process only looks at .clj files.

Given advice that lein hooks should no longer be used, and the need to use prep-tasks to ensure proper jar generation, I'm not sure how to best go about this.

FWIW, I always have an explicit aliases for testing, deployment, and other operations, so as to not leave things up to chance, e.g.

:aliases {"cleantest" ["do" "clean," "cljx" "once," "test," "cljsbuild" "test"]}

More verbose, yes, but this allows me to know for sure what is going to happen.

I'm open to advice on how to make this all more user-friendly given the constraints we're working with from Leiningen.

@cemerick
Copy link
Collaborator

cemerick commented Dec 9, 2014

A fix for this will require patching Leiningen. This looks like a small change, probably perfect for anyone looking to contribute back.

See technomancy/leiningen#1782

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants