{"action":"created","issue":{"url":"https://api.github.com/repos/rs/rest-layer/issues/194","repository_url":"https://api.github.com/repos/rs/rest-layer","labels_url":"https://api.github.com/repos/rs/rest-layer/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/rs/rest-layer/issues/194/comments","events_url":"https://api.github.com/repos/rs/rest-layer/issues/194/events","html_url":"https://github.com/rs/rest-layer/issues/194","id":344841888,"node_id":"MDU6SXNzdWUzNDQ4NDE4ODg=","number":194,"title":"Should schema.Schema, Fields and FieldValidators be splitt into a compiled and uncompiled type?","user":{"login":"smyrman","id":75205,"node_id":"MDQ6VXNlcjc1MjA1","avatar_url":"https://avatars2.githubusercontent.com/u/75205?v=4","gravatar_id":"","url":"https://api.github.com/users/smyrman","html_url":"https://github.com/smyrman","followers_url":"https://api.github.com/users/smyrman/followers","following_url":"https://api.github.com/users/smyrman/following{/other_user}","gists_url":"https://api.github.com/users/smyrman/gists{/gist_id}","starred_url":"https://api.github.com/users/smyrman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smyrman/subscriptions","organizations_url":"https://api.github.com/users/smyrman/orgs","repos_url":"https://api.github.com/users/smyrman/repos","events_url":"https://api.github.com/users/smyrman/events{/privacy}","received_events_url":"https://api.github.com/users/smyrman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-26T13:22:54Z","updated_at":"2018-07-26T17:39:55Z","closed_at":null,"author_association":"COLLABORATOR","body":"A discussion in #109 suggest distinguishing between a `resource.IndexBuilder` (allows adding resources, and returning a compiled index) and `resource.Index` (allows finding active resources and fetching items).\r\n\r\nThere are some reasons that could make it worthwhile to take a similar approach for schema.Schema:\r\n- FieldValidors are often referred to as pointers (e.g. `schema.IDField`, to mention one). When the Field definition is reused in multiple schemas, or the same schema is compiled multiple times in parallel, e.g. for tests, a data race condition arise.  When CIs run the tests with race detection enabled, they are likely to fail.\r\n- We could avoid doing things like #110 - instead, `.Compile` would be a method on a `FieldValidatorBuilder` returning a `FieldValidator` (naming not final).\r\n- We won't be able to _accidentally_ use an uncompiled schema in place of a compiled one.\r\n\r\nThis changes should be considered alongside other potentially large schema package changes, such as #77, that basically suggests allowing _any_ FieldValidator to be used a the Schema top-level. "},"comment":{"url":"https://api.github.com/repos/rs/rest-layer/issues/comments/408176746","html_url":"https://github.com/rs/rest-layer/issues/194#issuecomment-408176746","issue_url":"https://api.github.com/repos/rs/rest-layer/issues/194","id":408176746,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODE3Njc0Ng==","user":{"login":"rs","id":68232,"node_id":"MDQ6VXNlcjY4MjMy","avatar_url":"https://avatars2.githubusercontent.com/u/68232?v=4","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T17:39:55Z","updated_at":"2018-07-26T17:39:55Z","author_association":"OWNER","body":"Interesting idea."}}
{"actor":{"display_login":"rs"}}