marick / lein-midje

Leiningen plugin for Midje
MIT License
77 stars 29 forks source link

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

Open xsc opened 10 years ago

xsc commented 10 years ago

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.

vbauer commented 9 years ago

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

xsc commented 9 years ago

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.

vbauer commented 9 years ago

@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?

xsc commented 9 years ago

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...

mahnunchik commented 9 years ago

+1

xvik commented 9 years ago

+1

atroxaper commented 9 years ago

+1

kirill-lakhtin commented 9 years ago

+1

marick commented 9 years ago

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 commented 9 years ago

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

Pull requests welcome.

cypt commented 9 years ago

+1

vbauer commented 7 years ago

Any news about this problem?..

marick commented 7 years ago

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.