noir-clojure / noir

A framework for writing web applications in clojure.
http://www.webnoir.org/
740 stars 81 forks source link

Compile errors masked/silent #97

Open kenrestivo opened 12 years ago

kenrestivo commented 12 years ago

I noticed a repeatable error, not sure the solution, but leaving it here as breadcrumbs.

Steps to repeat:

1) Define a page with defpage

2) Refresh that page to load it, make sure it load successfully.

3) Put a bug in that defpage which causes the compile to fail-- like an unresolvable symbol, a var that doesn't exist, a mismatched parens, anything.

4) Reload the page in the browser. You'll see the OLD page, with success, and no stacktrace, no errors, no clues as to what went wrong.

I hack around this by running "lein2 check" periodically. But there may be a way to integrate that kind of thing into noir. It looks like noir keeps the compojure routes in an atom. I guess the route for that page is already defined in the atom, and when the compile fails, that original route is still there, it doesn't get replaced. Seems logical. Still not sure what to do about it though.