lein-midje icon indicating copy to clipboard operation
lein-midje copied to clipboard

lein-midje not working with high-level Leiningen tasks (in plugin projects)

Open xsc opened this issue 12 years ago • 13 comments

Let's say I have the following in my project.clj:

...
  :eval-in :leiningen
  :profiles {:midje {:dependencies [[midje "1.5.1"]]
                     :plugins [[lein-midje "3.1.3-RC2"]]}}
...

No tests are defined so far, so midje should not encounter any failures. I call:

$ lein with-profile midje midje
Performing task 'midje' with profile(s): 'midje'
No facts were checked. Is that what you wanted?
Error encountered performing task 'midje' with profile(s): 'midje'
Suppressed exit

Exit code is 1, things like TravisCI will fail. Note that this works fine for non-:eval-in-leiningen projects, the fact that leiningen.core.main/exit is called even if no failure is encountered just breaks testing of, e.g., plugin projects in that manner.

xsc avatar Nov 02 '13 12:11 xsc

I'm not sure that this is a right place... but I have a similar and strange behavior:

vbauer@vladislav-bauer:~/workspace/clojure/lein-plantuml$ lein with-profile dev midje
All checks (10) succeeded.
Error encountered performing task 'midje' with profile(s): 'dev'
Suppressed exit

All tests passed, but I see "Error encountered performing task 'midje' with profile(s): 'dev'". Any ideas?

PS: Yes, I have ":eval-in-leiningen true" in my project.clj

vbauer avatar Nov 02 '14 22:11 vbauer

This change is the cause. @marick introduced it because on some platforms the plugin took several seconds to shut down after all tests have been run.

So I've been running [lein-midje "3.1.1"] in my plugin projects for a year now since the most recent versions are broken for that purpose.

xsc avatar Nov 03 '14 08:11 xsc

@xsc Thank you for the hint! I've downgraded lein-midje to the version 3.1.1 and it works pretty fine on Travis CI.

Will it be fixed in future versions of the plugin?

vbauer avatar Nov 05 '14 00:11 vbauer

Well, this issue has been open for a year and three days now, so I'm not overly confident, the maintainers really see this as something that needs fixing...

xsc avatar Nov 05 '14 08:11 xsc

+1

mahnunchik avatar Nov 05 '14 13:11 mahnunchik

+1

xvik avatar Nov 05 '14 13:11 xvik

+1

atroxaper avatar Nov 05 '14 13:11 atroxaper

+1

kirill-lakhtin avatar Nov 13 '14 09:11 kirill-lakhtin

I've now put this on the trello board. The problem with fixing it is that understanding how Leiningen behaves has gotten a lot more difficult than it used to be.

marick avatar Nov 29 '14 21:11 marick

Trello card: https://trello.com/c/BzLO5BuU/17-lein-midje-not-working-with-high-level-leiningen-tasks-in-plugin-projects-47

Pull requests welcome.

marick avatar Nov 29 '14 21:11 marick

+1

cypt avatar Jan 29 '15 13:01 cypt

Any news about this problem?..

vbauer avatar Jan 29 '17 12:01 vbauer

Sorry for the delayed reply. I've moved from Clojure on the backend to Elixir. Because of that, I can't devote time to lein-midje. I will do what I can to transition it to anyone who wants to pick it up.

marick avatar Feb 17 '17 00:02 marick