prevents #'contains? being called on strings and booleans for 1.5 #11

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@bmabey

bmabey commented Sep 26, 2012

Clojure 1.5's #'contains? is stricter about how it is called (see
CLJ-932). Stencil was passing all sorts of objects to #'contains? (via
quoin), so this guard prevents that from happening.

prevents #'contains? being called on strings and booleans for 1.5
Clojure 1.5's #'contains? is stricter about how it is called (see
CLJ-932).  Stencil was passing all sorts of objects to #'contains? (via
  quoin), so this guard prevents that from happening.

CLJ-932: http://dev.clojure.org/jira/browse/CLJ-932
@davidsantiago

This comment has been minimized.

Show comment Hide comment
@davidsantiago

davidsantiago Sep 27, 2012

Interesting to hear they are making that change.

I think I'm a little surprised to learn that things that aren't maps are getting put in that position, though. Do you have an example of that happening? I just want to make sure I'm understanding everything going on here.

David

Interesting to hear they are making that change.

I think I'm a little surprised to learn that things that aren't maps are getting put in that position, though. Do you have an example of that happening? I just want to make sure I'm understanding everything going on here.

David

This comment has been minimized.

Show comment Hide comment
@bmabey

bmabey Sep 27, 2012

Owner

The problem is exposed by stencil's own test suite. So, if you run lein with-profile clj1.5 test you will see the failures. (Actually, before I could get that to run I had to add the clojure-data dep to the clj1.5 profile first.)

I didn't try to figure out why non-maps were getting there but I know it was happening in my app as well. I agree that finding out the root cause would be a good idea. It may be a another latent bug and that once that is solved my patch won't be needed.

Owner

bmabey replied Sep 27, 2012

The problem is exposed by stencil's own test suite. So, if you run lein with-profile clj1.5 test you will see the failures. (Actually, before I could get that to run I had to add the clojure-data dep to the clj1.5 profile first.)

I didn't try to figure out why non-maps were getting there but I know it was happening in my app as well. I agree that finding out the root cause would be a good idea. It may be a another latent bug and that once that is solved my patch won't be needed.

@davidsantiago

This comment has been minimized.

Show comment Hide comment
@davidsantiago

davidsantiago Feb 21, 2013

Owner

Sorry for the delay on this one, it totally slipped my mind.

Owner

davidsantiago commented Feb 21, 2013

Sorry for the delay on this one, it totally slipped my mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment