{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-dotnet/pulls/comments/67131845","id":67131845,"diff_hunk":"@@ -230,8 +230,18 @@ private void WeaveType(TypeDefinition type, Dictionary<string, Tuple<MethodRefer\n             }\n         }\n \n+        var objectConstructor = type.GetConstructors()\n+            .SingleOrDefault(c => c.Parameters.Count == 0 && c.IsPublic && !c.IsStatic);\n+        if (objectConstructor == null)\n+        {\n+            var nonDefaultConstructor = type.GetConstructors().First();","path":"RealmWeaver/ModuleWeaver.cs","position":8,"original_position":8,"commit_id":"79ca39d70a05f6f2a8b49d5143c96b514d7708de","original_commit_id":"79ca39d70a05f6f2a8b49d5143c96b514d7708de","user":{"login":"kristiandupont","id":847742,"avatar_url":"https://avatars.githubusercontent.com/u/847742?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiandupont","html_url":"https://github.com/kristiandupont","followers_url":"https://api.github.com/users/kristiandupont/followers","following_url":"https://api.github.com/users/kristiandupont/following{/other_user}","gists_url":"https://api.github.com/users/kristiandupont/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiandupont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiandupont/subscriptions","organizations_url":"https://api.github.com/users/kristiandupont/orgs","repos_url":"https://api.github.com/users/kristiandupont/repos","events_url":"https://api.github.com/users/kristiandupont/events{/privacy}","received_events_url":"https://api.github.com/users/kristiandupont/received_events","type":"User","site_admin":false},"body":"Is there a scenario where this will fail? Should I fall back on `LogError`?  I can't think of a situation, except some weird case where another weaver created the non-default constructor which would leave us with not sequence point below, but in that case maybe the general purpose error handler is good enough?","created_at":"2016-06-15T09:48:19Z","updated_at":"2016-06-15T09:48:19Z","html_url":"https://github.com/realm/realm-dotnet/pull/636#discussion_r67131845","pull_request_url":"https://api.github.com/repos/realm/realm-dotnet/pulls/636","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/comments/67131845"},"html":{"href":"https://github.com/realm/realm-dotnet/pull/636#discussion_r67131845"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/636"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-dotnet/pulls/636","id":73880805,"html_url":"https://github.com/realm/realm-dotnet/pull/636","diff_url":"https://github.com/realm/realm-dotnet/pull/636.diff","patch_url":"https://github.com/realm/realm-dotnet/pull/636.patch","issue_url":"https://api.github.com/repos/realm/realm-dotnet/issues/636","number":636,"state":"open","locked":false,"title":"Weaver error when RealmObject class is missing default constructor","user":{"login":"kristiandupont","id":847742,"avatar_url":"https://avatars.githubusercontent.com/u/847742?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiandupont","html_url":"https://github.com/kristiandupont","followers_url":"https://api.github.com/users/kristiandupont/followers","following_url":"https://api.github.com/users/kristiandupont/following{/other_user}","gists_url":"https://api.github.com/users/kristiandupont/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiandupont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiandupont/subscriptions","organizations_url":"https://api.github.com/users/kristiandupont/orgs","repos_url":"https://api.github.com/users/kristiandupont/repos","events_url":"https://api.github.com/users/kristiandupont/events{/privacy}","received_events_url":"https://api.github.com/users/kristiandupont/received_events","type":"User","site_admin":false},"body":"This might help diagnose #635 ","created_at":"2016-06-15T09:42:43Z","updated_at":"2016-06-15T09:48:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"797afcfec669c8c6c942bfa51d3a6a1edcf4d436","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-dotnet/pulls/636/commits","review_comments_url":"https://api.github.com/repos/realm/realm-dotnet/pulls/636/comments","review_comment_url":"https://api.github.com/repos/realm/realm-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/issues/636/comments","statuses_url":"https://api.github.com/repos/realm/realm-dotnet/statuses/79ca39d70a05f6f2a8b49d5143c96b514d7708de","head":{"label":"realm:kd/no-default-constructor-error","ref":"kd/no-default-constructor-error","sha":"79ca39d70a05f6f2a8b49d5143c96b514d7708de","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":8485842,"name":"realm-dotnet","full_name":"realm/realm-dotnet","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-dotnet","description":"Realm is a mobile database: a replacement for SQLite & ORMs","fork":false,"url":"https://api.github.com/repos/realm/realm-dotnet","forks_url":"https://api.github.com/repos/realm/realm-dotnet/forks","keys_url":"https://api.github.com/repos/realm/realm-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-dotnet/teams","hooks_url":"https://api.github.com/repos/realm/realm-dotnet/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-dotnet/events","assignees_url":"https://api.github.com/repos/realm/realm-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-dotnet/tags","blobs_url":"https://api.github.com/repos/realm/realm-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-dotnet/languages","stargazers_url":"https://api.github.com/repos/realm/realm-dotnet/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-dotnet/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-dotnet/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-dotnet/subscription","commits_url":"https://api.github.com/repos/realm/realm-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-dotnet/merges","archive_url":"https://api.github.com/repos/realm/realm-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-dotnet/downloads","issues_url":"https://api.github.com/repos/realm/realm-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-dotnet/deployments","created_at":"2013-02-28T19:03:12Z","updated_at":"2016-06-15T02:32:43Z","pushed_at":"2016-06-15T09:42:43Z","git_url":"git://github.com/realm/realm-dotnet.git","ssh_url":"git@github.com:realm/realm-dotnet.git","clone_url":"https://github.com/realm/realm-dotnet.git","svn_url":"https://github.com/realm/realm-dotnet","homepage":"https://realm.io","size":67905,"stargazers_count":320,"watchers_count":320,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":122,"forks":19,"open_issues":122,"watchers":320,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"09502bd908e6262cfeb333c2926a847c9c0ddc3e","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":8485842,"name":"realm-dotnet","full_name":"realm/realm-dotnet","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-dotnet","description":"Realm is a mobile database: a replacement for SQLite & ORMs","fork":false,"url":"https://api.github.com/repos/realm/realm-dotnet","forks_url":"https://api.github.com/repos/realm/realm-dotnet/forks","keys_url":"https://api.github.com/repos/realm/realm-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-dotnet/teams","hooks_url":"https://api.github.com/repos/realm/realm-dotnet/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-dotnet/events","assignees_url":"https://api.github.com/repos/realm/realm-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-dotnet/tags","blobs_url":"https://api.github.com/repos/realm/realm-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-dotnet/languages","stargazers_url":"https://api.github.com/repos/realm/realm-dotnet/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-dotnet/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-dotnet/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-dotnet/subscription","commits_url":"https://api.github.com/repos/realm/realm-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-dotnet/merges","archive_url":"https://api.github.com/repos/realm/realm-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-dotnet/downloads","issues_url":"https://api.github.com/repos/realm/realm-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-dotnet/deployments","created_at":"2013-02-28T19:03:12Z","updated_at":"2016-06-15T02:32:43Z","pushed_at":"2016-06-15T09:42:43Z","git_url":"git://github.com/realm/realm-dotnet.git","ssh_url":"git@github.com:realm/realm-dotnet.git","clone_url":"https://github.com/realm/realm-dotnet.git","svn_url":"https://github.com/realm/realm-dotnet","homepage":"https://realm.io","size":67905,"stargazers_count":320,"watchers_count":320,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":122,"forks":19,"open_issues":122,"watchers":320,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/636"},"html":{"href":"https://github.com/realm/realm-dotnet/pull/636"},"issue":{"href":"https://api.github.com/repos/realm/realm-dotnet/issues/636"},"comments":{"href":"https://api.github.com/repos/realm/realm-dotnet/issues/636/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/636/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-dotnet/pulls/636/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-dotnet/statuses/79ca39d70a05f6f2a8b49d5143c96b514d7708de"}}}}
{"actor":{"display_login":"kristiandupont"}}