{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/orleans/issues/528","labels_url":"https://api.github.com/repos/dotnet/orleans/issues/528/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/528/comments","events_url":"https://api.github.com/repos/dotnet/orleans/issues/528/events","html_url":"https://github.com/dotnet/orleans/pull/528","id":88946568,"number":528,"title":"Feature: Runtime Code Generation of GrainReferences & MethodInvokers","user":{"login":"ReubenBond","id":203839,"avatar_url":"https://avatars.githubusercontent.com/u/203839?v=3","gravatar_id":"","url":"https://api.github.com/users/ReubenBond","html_url":"https://github.com/ReubenBond","followers_url":"https://api.github.com/users/ReubenBond/followers","following_url":"https://api.github.com/users/ReubenBond/following{/other_user}","gists_url":"https://api.github.com/users/ReubenBond/gists{/gist_id}","starred_url":"https://api.github.com/users/ReubenBond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReubenBond/subscriptions","organizations_url":"https://api.github.com/users/ReubenBond/orgs","repos_url":"https://api.github.com/users/ReubenBond/repos","events_url":"https://api.github.com/users/ReubenBond/events{/privacy}","received_events_url":"https://api.github.com/users/ReubenBond/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/orleans/labels/cla-already-signed","name":"cla-already-signed","color":"009800"},{"url":"https://api.github.com/repos/dotnet/orleans/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dotnet/orleans/milestones/4","html_url":"https://github.com/dotnet/orleans/milestones/1.0.10","labels_url":"https://api.github.com/repos/dotnet/orleans/milestones/4/labels","id":1191531,"number":4,"title":"1.0.10","description":"","creator":{"login":"jthelin","id":10134641,"avatar_url":"https://avatars.githubusercontent.com/u/10134641?v=3","gravatar_id":"","url":"https://api.github.com/users/jthelin","html_url":"https://github.com/jthelin","followers_url":"https://api.github.com/users/jthelin/followers","following_url":"https://api.github.com/users/jthelin/following{/other_user}","gists_url":"https://api.github.com/users/jthelin/gists{/gist_id}","starred_url":"https://api.github.com/users/jthelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthelin/subscriptions","organizations_url":"https://api.github.com/users/jthelin/orgs","repos_url":"https://api.github.com/users/jthelin/repos","events_url":"https://api.github.com/users/jthelin/events{/privacy}","received_events_url":"https://api.github.com/users/jthelin/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2015-07-02T20:35:05Z","updated_at":"2015-07-07T23:21:56Z","due_on":null,"closed_at":null},"comments":26,"created_at":"2015-06-17T07:56:23Z","updated_at":"2015-07-13T03:47:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/528","html_url":"https://github.com/dotnet/orleans/pull/528","diff_url":"https://github.com/dotnet/orleans/pull/528.diff","patch_url":"https://github.com/dotnet/orleans/pull/528.patch"},"body":"This is a proposed fix for #511 & #510.\r\n\r\nRuntime code generation is loaded in the GrainFactory and kept current as new assemblies are loaded. `IGrainMethodInvoker` implementations are also loaded in `GrainTypeManager` upon initialization.\r\n\r\nRoslyn is used for generating `GrainReference`s and `IGrainMethodInvoker`s and not for generating `GrainReference` serializers, `Cast` methods, or `CreateObjectRefernce`/`DeleteObjectReference` methods . Instead, Expression Trees are used in those cases. In the case of `GrainReference` casters, they of course rely on having a generated `GrainReference` with the correct marker attribute.\r\n\r\nMarker attributes (`MethodInvokerAttribute` and `GrainReferenceAttribute`) have been changed to include a `GrainType` parameter which takes the (possibly generic) type of the grain which they relate to.\r\n\r\nThis is implemented as an optional plugin for Orleans. If `OrleansCodeGenerator.dll` is present at runtime, it will be loaded and used. If it is not present, the existing mechanism of compile-time code generation will have to suffice instead.\r\n\r\nI have not created a NuGet package, so if this is the approach we are going to take, that will need to be done before the PR is ready to merge.\r\n\r\nAll criticism is welcome :)"},"comment":{"url":"https://api.github.com/repos/dotnet/orleans/issues/comments/120802906","html_url":"https://github.com/dotnet/orleans/pull/528#issuecomment-120802906","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/528","id":120802906,"user":{"login":"sergeybykov","id":8248806,"avatar_url":"https://avatars.githubusercontent.com/u/8248806?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeybykov","html_url":"https://github.com/sergeybykov","followers_url":"https://api.github.com/users/sergeybykov/followers","following_url":"https://api.github.com/users/sergeybykov/following{/other_user}","gists_url":"https://api.github.com/users/sergeybykov/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeybykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeybykov/subscriptions","organizations_url":"https://api.github.com/users/sergeybykov/orgs","repos_url":"https://api.github.com/users/sergeybykov/repos","events_url":"https://api.github.com/users/sergeybykov/events{/privacy}","received_events_url":"https://api.github.com/users/sergeybykov/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T03:47:27Z","updated_at":"2015-07-13T03:47:27Z","body":"I realized I wasn't clear. The sources are in VSO, but builds run on our in-house TFS build controller/agents. So it's likely an issue with TFS vs. VS/VSO differences. "}}