{"action":"created","issue":{"url":"https://api.github.com/repos/tonsky/datascript/issues/176","repository_url":"https://api.github.com/repos/tonsky/datascript","labels_url":"https://api.github.com/repos/tonsky/datascript/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/tonsky/datascript/issues/176/comments","events_url":"https://api.github.com/repos/tonsky/datascript/issues/176/events","html_url":"https://github.com/tonsky/datascript/issues/176","id":175644007,"number":176,"title":"db.cljc doesn't compile on clojure-1.9.0-alpha12 ecause of __hash","user":{"login":"lvh","id":97816,"avatar_url":"https://avatars.githubusercontent.com/u/97816?v=3","gravatar_id":"","url":"https://api.github.com/users/lvh","html_url":"https://github.com/lvh","followers_url":"https://api.github.com/users/lvh/followers","following_url":"https://api.github.com/users/lvh/following{/other_user}","gists_url":"https://api.github.com/users/lvh/gists{/gist_id}","starred_url":"https://api.github.com/users/lvh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvh/subscriptions","organizations_url":"https://api.github.com/users/lvh/orgs","repos_url":"https://api.github.com/users/lvh/repos","events_url":"https://api.github.com/users/lvh/events{/privacy}","received_events_url":"https://api.github.com/users/lvh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-08T01:24:44Z","updated_at":"2016-09-08T15:01:26Z","closed_at":null,"body":"```\r\nException in thread \"main\" java.lang.AssertionError: The names in #{__hash __meta __hasheq __extmap} cannot be used as field names for types or records., compiling:(datascript/db.cljc:369:1)\r\n```\r\n\r\nThis is used in https://github.com/tonsky/datascript/blob/0684c4102706bf4ee8b2496ad35c32ced08640fc/src/datascript/db.cljc#L369 and a handful of other places. This is a consequence of [CLJ-1224][clj1224].\r\n\r\nIt's not entirely clear what the best resolution here is; if I understand correctly; the Clojure change just makes all records behave how this record already behaved anyway.\r\n\r\n[clj1224]: http://dev.clojure.org/jira/browse/CLJ-1224"},"comment":{"url":"https://api.github.com/repos/tonsky/datascript/issues/comments/245627049","html_url":"https://github.com/tonsky/datascript/issues/176#issuecomment-245627049","issue_url":"https://api.github.com/repos/tonsky/datascript/issues/176","id":245627049,"user":{"login":"puredanger","id":171129,"avatar_url":"https://avatars.githubusercontent.com/u/171129?v=3","gravatar_id":"","url":"https://api.github.com/users/puredanger","html_url":"https://github.com/puredanger","followers_url":"https://api.github.com/users/puredanger/followers","following_url":"https://api.github.com/users/puredanger/following{/other_user}","gists_url":"https://api.github.com/users/puredanger/gists{/gist_id}","starred_url":"https://api.github.com/users/puredanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puredanger/subscriptions","organizations_url":"https://api.github.com/users/puredanger/orgs","repos_url":"https://api.github.com/users/puredanger/repos","events_url":"https://api.github.com/users/puredanger/events{/privacy}","received_events_url":"https://api.github.com/users/puredanger/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T15:01:26Z","updated_at":"2016-09-08T15:01:26Z","body":"I have declined the Clojure ticket - I do not believe it should have been considered valid to modify a record's hash semantics - those are controlled by the language (and should match those of a map). \r\n\r\nIf you want control over hashing, you should use a deftype, where it's perfectly ok to extend IHashEq. I would say even there that using a __-prefixed field name is inadvisable, but is ok.\r\n\r\nI cannot answer the question of performance if this code is modified. It may be necessary to use a deftype for those records prior to 1.8."}}
{"actor":{"display_login":"puredanger"}}