Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread Thomas Heller
No I don't. The smallest "test" I was able to come up was my production app. I was not able to isolate the issue and the app does way too much stuff to pinpoint anything. I can give you an URL and the steps to reproduce the issue but thats about it. Sorry, /thomas -- Note that posts from new

Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread David Nolen
So you or do not have a minimal case for Mobile Safari that I can test with? Thanks, David On Tue, Jul 29, 2014 at 4:16 PM, Thomas Heller wrote: > Thanks. > > I give up. > > I have no more ideas what to test, whats even more annoying is that when I > attach the remote debugger BEFORE navigating

Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread Thomas Heller
Thanks. I give up. I have no more ideas what to test, whats even more annoying is that when I attach the remote debugger BEFORE navigating to the page producing the faulty maps the bug doesn't show. If I do the exact same steps but attach the remote debugger AFTER loading the page the bug happ

Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread David Nolen
Applied to master thanks. David On Tue, Jul 29, 2014 at 2:29 PM, Thomas Heller wrote: > Created a patch to address that :emit-constants issue. > > http://dev.clojure.org/jira/browse/CLJS-829 > > Can't say wether its related to the issue at hand but less duplicate code is > always good. > > -- >

Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread Thomas Heller
Created a patch to address that :emit-constants issue. http://dev.clojure.org/jira/browse/CLJS-829 Can't say wether its related to the issue at hand but less duplicate code is always good. -- Note that posts from new members are moderated - please be patient with your first post. --- You rec

Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread Thomas Heller
Hmm it might be related to the way keywords are generated. The compiler will emit ":test" as new cljs.Keyword(null,"test","test",577538877) where the hash is precomputed in Clojure, if now for some reason ClojureScript generates another Hash for that keyword we have our problem. I'm not a math

Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread Thomas Heller
Yes, I'm only testing Safari on iOS. Which looking at my logs seems to be the only one affected. Only Mobile Safari User Agents were sending maps with duplicate keys. No luck producing a more compact example though. -- Note that posts from new members are moderated - please be patient with you

Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread David Nolen
Are you testing only mobile Safari? At this point seems like the thing to focus on. David On Tue, Jul 29, 2014 at 4:03 AM, Thomas Heller wrote: > Gave up yesterday, will try more today. > > Last thing I tried > > (hash :test) > (hash (keyword "test")) > (hash (reader/read-string ":test")) > > an

Re: [ClojureScript] Keyword Hashing

2014-07-29 Thread Thomas Heller
Gave up yesterday, will try more today. Last thing I tried (hash :test) (hash (keyword "test")) (hash (reader/read-string ":test")) and comparing those hashes, the error didn't show this way even when tried with several different test strings. Running out of ideas to test, but its reasonable t

Re: [ClojureScript] Keyword Hashing

2014-07-28 Thread David Nolen
Yes this was my thought as well. Perhaps there's another edge case that we're missing? David On Mon, Jul 28, 2014 at 4:21 PM, Thomas Heller wrote: > Thought it might be related to > > https://github.com/clojure/clojurescript/commit/e92e8064813ed9a74c6dcf5bfd3adf5b85df1aea > > but can confirm tha

Re: [ClojureScript] Keyword Hashing

2014-07-28 Thread Thomas Heller
Thought it might be related to https://github.com/clojure/clojurescript/commit/e92e8064813ed9a74c6dcf5bfd3adf5b85df1aea but can confirm that that is not the issue. At least the (imul 0x 5) outputs the correct -5. -- Note that posts from new members are moderated - please be patient wit

Re: [ClojureScript] Keyword Hashing

2014-07-28 Thread Thomas Heller
Not much closer but some log output keyword a, keyword b, hash a, hash b :tags :tags 250931621 1771418977 :contract-type :contract-type -585196394 580786577 :voice-de-o2 :voice-de-o2 1348274488 1352616807 :voice-de-telekom :voice-de-telekom 475690556 2143804784 :voice-de-eplus :voice-de-eplus -167

Re: [ClojureScript] Keyword Hashing

2014-07-28 Thread Thomas Heller
FWIW I started logging User Agents that send the "faulty" hash-maps and it seems to be related to mobile Safari. Can reproduce it on my iPhone now. Safari 7.0.5 on my mac doesnt show this problem though. Will look some more. Cheers, /thomas PS: Some of the affected user agents Mozilla/5.0 (iP

Re: [ClojureScript] Keyword Hashing

2014-07-28 Thread David Nolen
I've heard this from a couple of sources. Minimal case would be very welcome and we'll cut a release as soon as we have a patch. David On Mon, Jul 28, 2014 at 8:16 AM, Thomas Heller wrote: > Hey, > > I'm running into alot of > > java.lang.IllegalArgumentException: Duplicate key: :display-as >

[ClojureScript] Keyword Hashing

2014-07-28 Thread Thomas Heller
Hey, I'm running into alot of java.lang.IllegalArgumentException: Duplicate key: :display-as at clojure.lang.PersistentHashMap.createWithCheck(PersistentHashMap.java:67) at clojure.lang.RT.map(RT.java:1462) at clojure.lang.EdnReader$MapReader.invoke(EdnReader.java:631)