{"action":"created","issue":{"url":"https://api.github.com/repos/rollup/rollup/issues/191","repository_url":"https://api.github.com/repos/rollup/rollup","labels_url":"https://api.github.com/repos/rollup/rollup/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/rollup/rollup/issues/191/comments","events_url":"https://api.github.com/repos/rollup/rollup/issues/191/events","html_url":"https://github.com/rollup/rollup/issues/191","id":111581554,"number":191,"title":"Incremental builds","user":{"login":"Victorystick","id":703602,"avatar_url":"https://avatars.githubusercontent.com/u/703602?v=3","gravatar_id":"","url":"https://api.github.com/users/Victorystick","html_url":"https://github.com/Victorystick","followers_url":"https://api.github.com/users/Victorystick/followers","following_url":"https://api.github.com/users/Victorystick/following{/other_user}","gists_url":"https://api.github.com/users/Victorystick/gists{/gist_id}","starred_url":"https://api.github.com/users/Victorystick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Victorystick/subscriptions","organizations_url":"https://api.github.com/users/Victorystick/orgs","repos_url":"https://api.github.com/users/Victorystick/repos","events_url":"https://api.github.com/users/Victorystick/events{/privacy}","received_events_url":"https://api.github.com/users/Victorystick/received_events","type":"User","site_admin":false},"labels":[{"id":249122399,"url":"https://api.github.com/repos/rollup/rollup/labels/discussion","name":"discussion","color":"5319e7","default":false},{"id":211689304,"url":"https://api.github.com/repos/rollup/rollup/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2015-10-15T09:46:43Z","updated_at":"2016-11-26T13:07:39Z","closed_at":"2016-06-09T18:33:21Z","body":"I've started asking myself what incremental builds would look like in Rollup. What data can we keep, and what do we need to change? Consider something like this:\n\n``` js\nrollup.rollup( options ).then(incrementallyRebuild);\n\nfunction incrementallyRebuild( bundle ) {\n  // Write/generate the current bundle.\n  bundle.write( options );\n\n  // If any of the files included by the bundle changes...\n  return anyFileChanged( bundle.files ).then( file => {\n    // rebuild the bundle with the changes to that file.\n    return bundle.invalidateId( file ).rollup( options ).then( incrementallyRebuild );\n  });\n}\n```\n\nHow should we make sure to do as little work as possible for each file change? Generally, only one of the files included by the bundle will change at a time. If we can keep the isolated data for all modules and invalidate the module that changed, perhaps we can speed up the build process.\n\nWe would have to:\n1. copy reusable data from some previous `Bundle`'s analysis\n2. invalidate a module id of the changed file\n3. reload that id (presumably a single file)\n4. perform isolated analysis of the resulting module\n5. create a bundle\n   1. include/drop modules due to a change to an `import`/`export` statement\n   2. business as usual\n\nWe'd need to separate reusable data from the bundle-specific data. I don't know how much work that'd require, but I imagine quite a lot.\n"},"comment":{"url":"https://api.github.com/repos/rollup/rollup/issues/comments/263062555","html_url":"https://github.com/rollup/rollup/issues/191#issuecomment-263062555","issue_url":"https://api.github.com/repos/rollup/rollup/issues/191","id":263062555,"user":{"login":"StreetStrider","id":2124761,"avatar_url":"https://avatars.githubusercontent.com/u/2124761?v=3","gravatar_id":"","url":"https://api.github.com/users/StreetStrider","html_url":"https://github.com/StreetStrider","followers_url":"https://api.github.com/users/StreetStrider/followers","following_url":"https://api.github.com/users/StreetStrider/following{/other_user}","gists_url":"https://api.github.com/users/StreetStrider/gists{/gist_id}","starred_url":"https://api.github.com/users/StreetStrider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StreetStrider/subscriptions","organizations_url":"https://api.github.com/users/StreetStrider/orgs","repos_url":"https://api.github.com/users/StreetStrider/repos","events_url":"https://api.github.com/users/StreetStrider/events{/privacy}","received_events_url":"https://api.github.com/users/StreetStrider/received_events","type":"User","site_admin":false},"created_at":"2016-11-26T13:07:39Z","updated_at":"2016-11-26T13:07:39Z","body":"@Rich-Harris, glad this'd been resolved. Should this be reflected in Readme? I think a small section on a hi-level approach of this feature would be good."}}
{"actor":{"display_login":"StreetStrider"}}