noir-clojure/noir

url-for requires that the page already be defined

kschuetz opened this issue · 2 comments

With named routes, the name of a url is defined with a symbol. Therefore, url-for can only refer to pages that were earlier defined using defpage.

But how does one (at compile time) refer to a route that hasn't been encountered yet? Cyclic links between pages are going to be difficult to pull off.

Perhaps route naming should use keywords instead? This way url-for could do its resolution at runtime.

Ack! sorry about that, that was an unintended consequence of a change to clean things up. I've added a test to catch this and it's fixed in both 1.2.1 and 1.2.2-SNAPSHOT.

Since you already got 1.2.1, it'll be cached in ~/.m2, you'll need to delete the noir directory in there to make sure you get the new one when you do lein deps.

Cheers,
Chris.

New version seems to work.
Thanks!
Kevin

P.S. I ran in to a minor, unrelated issue when upgrading from 1.2.0 to 1.2.1, but I'll post that as a new item.