{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/15752","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/15752/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/15752/comments","events_url":"https://api.github.com/repos/golang/go/issues/15752/events","html_url":"https://github.com/golang/go/issues/15752","id":155795399,"number":15752,"title":"cmd/go: only rebuild dependent packages when export data has changed","user":{"login":"josharian","id":67496,"avatar_url":"https://avatars.githubusercontent.com/u/67496?v=3","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/42","html_url":"https://github.com/golang/go/milestones/Go1.8Maybe","labels_url":"https://api.github.com/repos/golang/go/milestones/42/labels","id":1748849,"number":42,"title":"Go1.8Maybe","description":"","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":47,"closed_issues":1,"state":"open","created_at":"2016-05-04T23:40:26Z","updated_at":"2016-05-19T17:46:43Z","due_on":"2017-02-01T08:00:00Z","closed_at":null},"comments":1,"created_at":"2016-05-19T17:46:43Z","updated_at":"2016-05-19T18:13:24Z","closed_at":null,"body":"@mwhudson suggested in #15734:\r\n\r\n> If the export data hasn't changed, can you skip the compilation of dependent packages?\r\n\r\nMoving this idea here to be tracked separately.\r\n\r\nMy 2c: Interesting idea, seems worth pursuing. Not sure how often it happens that code changes don't impact export data (or how cheap that is to detect), but when it does happen, that could save a *bunch* of computation."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/220407731","html_url":"https://github.com/golang/go/issues/15752#issuecomment-220407731","issue_url":"https://api.github.com/repos/golang/go/issues/15752","id":220407731,"user":{"login":"dr2chase","id":1928999,"avatar_url":"https://avatars.githubusercontent.com/u/1928999?v=3","gravatar_id":"","url":"https://api.github.com/users/dr2chase","html_url":"https://github.com/dr2chase","followers_url":"https://api.github.com/users/dr2chase/followers","following_url":"https://api.github.com/users/dr2chase/following{/other_user}","gists_url":"https://api.github.com/users/dr2chase/gists{/gist_id}","starred_url":"https://api.github.com/users/dr2chase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dr2chase/subscriptions","organizations_url":"https://api.github.com/users/dr2chase/orgs","repos_url":"https://api.github.com/users/dr2chase/repos","events_url":"https://api.github.com/users/dr2chase/events{/privacy}","received_events_url":"https://api.github.com/users/dr2chase/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T18:13:23Z","updated_at":"2016-05-19T18:13:23Z","body":"It's not trivial.  Years a go I worked on an ahead-of-time compiler for Java bytecodes that did just this, and it was a good thing (back in the days of 200Mhz CPUs), but it required substantial amounts of dependence information (stored on disk in gzip format) and it also required that every reference to information from another package log an entry in the internal dependence database for later storage -- in particular, every field reference or interface method reference, because those involve offsets, and offsets might change as interface declarations or field declarations are changed (granularity matters, too -- do you record the actual dependence that field F is at offset 8, or do you just record that the SHA of the struct had a particular value?"}}