{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/buildtools/issues/2122","repository_url":"https://api.github.com/repos/dotnet/buildtools","labels_url":"https://api.github.com/repos/dotnet/buildtools/issues/2122/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/buildtools/issues/2122/comments","events_url":"https://api.github.com/repos/dotnet/buildtools/issues/2122/events","html_url":"https://github.com/dotnet/buildtools/issues/2122","id":350168054,"node_id":"MDU6SXNzdWUzNTAxNjgwNTQ=","number":2122,"title":"Multiple enumeration problem in VersionTools DependencyUpdateUtils.Update","user":{"login":"dagood","id":12819531,"node_id":"MDQ6VXNlcjEyODE5NTMx","avatar_url":"https://avatars3.githubusercontent.com/u/12819531?v=4","gravatar_id":"","url":"https://api.github.com/users/dagood","html_url":"https://github.com/dagood","followers_url":"https://api.github.com/users/dagood/followers","following_url":"https://api.github.com/users/dagood/following{/other_user}","gists_url":"https://api.github.com/users/dagood/gists{/gist_id}","starred_url":"https://api.github.com/users/dagood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagood/subscriptions","organizations_url":"https://api.github.com/users/dagood/orgs","repos_url":"https://api.github.com/users/dagood/repos","events_url":"https://api.github.com/users/dagood/events{/privacy}","received_events_url":"https://api.github.com/users/dagood/received_events","type":"User","site_admin":false},"labels":[{"id":538855601,"node_id":"MDU6TGFiZWw1Mzg4NTU2MDE=","url":"https://api.github.com/repos/dotnet/buildtools/labels/area-buildtools-code","name":"area-buildtools-code","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-13T19:48:50Z","updated_at":"2018-08-13T19:48:50Z","closed_at":null,"author_association":"MEMBER","body":"I haven't looked any deeper, but this problem is why this shows up as CoreFXLab's auto-PR message:\r\n\r\n> Update CoreFx, CoreFx, CoreFx, CoreFx, CoreFx, CoreSDK to preview1-26813-02, preview1-26813-02, preview1-26813-02, preview1-26813-02, preview1-26813-02, 0.2.0, respectively\r\n\r\nvs. the expected\r\n\r\n> Update CoreFx, CoreSDK to preview1-26813-02, 0.2.0, respectively\r\n\r\nCoreFXLab passes `DependencyUpdateUtils.Update` iterator IEnumerables that create new objects. VersionTools seems to run the iterator multiple times, ending up with a lot more dependency info objects than it should.\r\n\r\nThe workaround is adding `ToArray()` before calling `DependencyUpdateUtils.Update`. (See https://github.com/dotnet/corefxlab/pull/2427/files.)\r\n\r\n`DependencyUpdateUtils.Update` should call ToArray on the args (or something similar) to make sure this doesn't happen."}}
{"actor":{"display_login":"dagood"}}