{"action":"created","issue":{"url":"https://api.github.com/repos/amireh/happypack/issues/50","repository_url":"https://api.github.com/repos/amireh/happypack","labels_url":"https://api.github.com/repos/amireh/happypack/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/amireh/happypack/issues/50/comments","events_url":"https://api.github.com/repos/amireh/happypack/issues/50/events","html_url":"https://github.com/amireh/happypack/issues/50","id":157788551,"number":50,"title":"Unable to cache between machines.","user":{"login":"gdborton","id":4172067,"avatar_url":"https://avatars.githubusercontent.com/u/4172067?v=3","gravatar_id":"","url":"https://api.github.com/users/gdborton","html_url":"https://github.com/gdborton","followers_url":"https://api.github.com/users/gdborton/followers","following_url":"https://api.github.com/users/gdborton/following{/other_user}","gists_url":"https://api.github.com/users/gdborton/gists{/gist_id}","starred_url":"https://api.github.com/users/gdborton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdborton/subscriptions","organizations_url":"https://api.github.com/users/gdborton/orgs","repos_url":"https://api.github.com/users/gdborton/repos","events_url":"https://api.github.com/users/gdborton/events{/privacy}","received_events_url":"https://api.github.com/users/gdborton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/amireh/happypack/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-05-31T22:54:11Z","updated_at":"2016-06-28T22:28:42Z","closed_at":null,"body":"We're currently investigating using happypack to cache our ci builds between different commits.  Our basic setup is to download a happypack cache (if one exists), clone, run webpack, upload happypack cache.\r\n\r\nWe've hit two issues with this.  The first is that modified-time isn't preserved by git (we worked around this by changing the signature function to be a hash of the file content).  The second issue that we're hitting is that the happypack cache uses absolute file paths, which aren't consistent between builds.\r\n\r\nI would like to propose changing the structure of the cache to enable cached builds across machines and clones...\r\n\r\nFrom:\r\n```javascript\r\n{\r\n  '/path/to/files.js': {\r\n    mtime: '2016-05-25 25:12:12', // pretend this is a real time stamp\r\n    compiledPath: '/path/.happypack/s--1411414904'\r\n  },\r\n},\r\n```\r\n\r\nTo:\r\n```javascript\r\n{\r\n  // sha-256 based on file content.\r\n  'fa9a499ca3f660206bec74fb7ed3603174c17c2f3846a9968a3caf8e995b791b': {\r\n    compiledPath: '.happpack/s--1411414904' // config.tempDir + cache file name.\r\n  }\r\n}\r\n```\r\n\r\nI'd be happy to work on this, but I wanted to get your opinion first."},"comment":{"url":"https://api.github.com/repos/amireh/happypack/issues/comments/229203625","html_url":"https://github.com/amireh/happypack/issues/50#issuecomment-229203625","issue_url":"https://api.github.com/repos/amireh/happypack/issues/50","id":229203625,"user":{"login":"gdborton","id":4172067,"avatar_url":"https://avatars.githubusercontent.com/u/4172067?v=3","gravatar_id":"","url":"https://api.github.com/users/gdborton","html_url":"https://github.com/gdborton","followers_url":"https://api.github.com/users/gdborton/followers","following_url":"https://api.github.com/users/gdborton/following{/other_user}","gists_url":"https://api.github.com/users/gdborton/gists{/gist_id}","starred_url":"https://api.github.com/users/gdborton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdborton/subscriptions","organizations_url":"https://api.github.com/users/gdborton/orgs","repos_url":"https://api.github.com/users/gdborton/repos","events_url":"https://api.github.com/users/gdborton/events{/privacy}","received_events_url":"https://api.github.com/users/gdborton/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T22:28:42Z","updated_at":"2016-06-28T22:28:42Z","body":"Sure, I could get a PR out."}}
{"actor":{"display_login":"gdborton"}}