{"action":"created","issue":{"url":"https://api.github.com/repos/apache/cordova-lib/issues/429","repository_url":"https://api.github.com/repos/apache/cordova-lib","labels_url":"https://api.github.com/repos/apache/cordova-lib/issues/429/labels{/name}","comments_url":"https://api.github.com/repos/apache/cordova-lib/issues/429/comments","events_url":"https://api.github.com/repos/apache/cordova-lib/issues/429/events","html_url":"https://github.com/apache/cordova-lib/pull/429","id":149532863,"number":429,"title":"CB-11117: Add FileUpdater module to cordova-common","user":{"login":"jasongin","id":13093042,"avatar_url":"https://avatars.githubusercontent.com/u/13093042?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongin","html_url":"https://github.com/jasongin","followers_url":"https://api.github.com/users/jasongin/followers","following_url":"https://api.github.com/users/jasongin/following{/other_user}","gists_url":"https://api.github.com/users/jasongin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongin/subscriptions","organizations_url":"https://api.github.com/users/jasongin/orgs","repos_url":"https://api.github.com/users/jasongin/repos","events_url":"https://api.github.com/users/jasongin/events{/privacy}","received_events_url":"https://api.github.com/users/jasongin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-04-19T17:49:34Z","updated_at":"2016-05-03T18:39:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/cordova-lib/pulls/429","html_url":"https://github.com/apache/cordova-lib/pull/429","diff_url":"https://github.com/apache/cordova-lib/pull/429.diff","patch_url":"https://github.com/apache/cordova-lib/pull/429.patch"},"body":"The new FileUpdater module contains a few functions that enable optimized\r\nfile copies by comparing timestamps. These functions are primarily\r\nintended to be used by each platform's prepare operation to avoid\r\nredundantly copying files that haven't changed since the last build, thus\r\ngreatly speeding up build times after the first build. But the usfulness\r\nisn't necessarily limited to the prepare operation; the functions could\r\nbe used for any Cordova file copy operations that benefit from the same\r\noptimization.\r\n\r\nIn this initial change, the FileUpdater isn't used yet anywhere. Look for\r\nfollow-up changes in other repos which make use of the FileUpdater from\r\nplatforms' prepare operations, and a CLI change that enables the\r\ntimestamp-based optimization via a new --incremental flag."},"comment":{"url":"https://api.github.com/repos/apache/cordova-lib/issues/comments/216624907","html_url":"https://github.com/apache/cordova-lib/pull/429#issuecomment-216624907","issue_url":"https://api.github.com/repos/apache/cordova-lib/issues/429","id":216624907,"user":{"login":"jasongin","id":13093042,"avatar_url":"https://avatars.githubusercontent.com/u/13093042?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongin","html_url":"https://github.com/jasongin","followers_url":"https://api.github.com/users/jasongin/followers","following_url":"https://api.github.com/users/jasongin/following{/other_user}","gists_url":"https://api.github.com/users/jasongin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongin/subscriptions","organizations_url":"https://api.github.com/users/jasongin/orgs","repos_url":"https://api.github.com/users/jasongin/repos","events_url":"https://api.github.com/users/jasongin/events{/privacy}","received_events_url":"https://api.github.com/users/jasongin/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T18:39:56Z","updated_at":"2016-05-03T18:39:56Z","body":"If you're talking about a source file, then that would change the last-modified timestamp of the source file, causing it to be newer than the target file so it will be copied on the next prepare.\r\n\r\nIf you save changes to a source file at precisely the wrong time _while a build is in progress_ (and the change doesn't affect the size of the file), then it's possible the change could go undetected if a hook modifies the corresponding target file to make it newer than the changed source file. But even good old 'make' has this issue."}}