{"action":"created","issue":{"url":"https://api.github.com/repos/technomancy/leiningen/issues/2292","repository_url":"https://api.github.com/repos/technomancy/leiningen","labels_url":"https://api.github.com/repos/technomancy/leiningen/issues/2292/labels{/name}","comments_url":"https://api.github.com/repos/technomancy/leiningen/issues/2292/comments","events_url":"https://api.github.com/repos/technomancy/leiningen/issues/2292/events","html_url":"https://github.com/technomancy/leiningen/issues/2292","id":245605697,"number":2292,"title":"Tell Time Machine to ignore cached/generated files","user":{"login":"danielcompton","id":811954,"avatar_url":"https://avatars2.githubusercontent.com/u/811954?v=4","gravatar_id":"","url":"https://api.github.com/users/danielcompton","html_url":"https://github.com/danielcompton","followers_url":"https://api.github.com/users/danielcompton/followers","following_url":"https://api.github.com/users/danielcompton/following{/other_user}","gists_url":"https://api.github.com/users/danielcompton/gists{/gist_id}","starred_url":"https://api.github.com/users/danielcompton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielcompton/subscriptions","organizations_url":"https://api.github.com/users/danielcompton/orgs","repos_url":"https://api.github.com/users/danielcompton/repos","events_url":"https://api.github.com/users/danielcompton/events{/privacy}","received_events_url":"https://api.github.com/users/danielcompton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-26T04:52:58Z","updated_at":"2017-07-26T07:52:51Z","closed_at":null,"body":"It would help reduce backup sizes on macOS for Time Machine and 3rd party backup tools if Leiningen's generated files and caches were marked to not be backed up. There is a command that can check any path for you to see if it is backed up or not:\r\n\r\n```console\r\n$ tmutil isexcluded ~/.lein/cache/\r\n[Included]    /Users/<myuser>/.lein/cache\r\n```\r\n\r\nApple provides an API [CSBackupSetItemExcluded](https://developer.apple.com/documentation/coreservices/1445043-csbackupsetitemexcluded?language=objc) to mark directories as excluded by Time Machine, and other Mac backup software respects the same markings. There is also a command line tool `tmutil` which lets you accomplish the same task with `tmutil addexclusion <file path>`.\r\n\r\nRelates to https://github.com/boot-clj/boot/issues/628.\r\n\r\nI think it's probably an easy decision to ignore the lein owned caches. It might be slightly tricker for `target` directories, and other project build locations."},"comment":{"url":"https://api.github.com/repos/technomancy/leiningen/issues/comments/317977379","html_url":"https://github.com/technomancy/leiningen/issues/2292#issuecomment-317977379","issue_url":"https://api.github.com/repos/technomancy/leiningen/issues/2292","id":317977379,"user":{"login":"hyPiRion","id":504876,"avatar_url":"https://avatars2.githubusercontent.com/u/504876?v=4","gravatar_id":"","url":"https://api.github.com/users/hyPiRion","html_url":"https://github.com/hyPiRion","followers_url":"https://api.github.com/users/hyPiRion/followers","following_url":"https://api.github.com/users/hyPiRion/following{/other_user}","gists_url":"https://api.github.com/users/hyPiRion/gists{/gist_id}","starred_url":"https://api.github.com/users/hyPiRion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyPiRion/subscriptions","organizations_url":"https://api.github.com/users/hyPiRion/orgs","repos_url":"https://api.github.com/users/hyPiRion/repos","events_url":"https://api.github.com/users/hyPiRion/events{/privacy}","received_events_url":"https://api.github.com/users/hyPiRion/received_events","type":"User","site_admin":false},"created_at":"2017-07-26T07:52:51Z","updated_at":"2017-07-26T07:52:51Z","body":"I'm guessing you meant `~/.lein/self-installs`? I don't think I've heard of `~/.lein/cache` before. Perhaps more importantly, is `~/.m2` also backed up?\r\n\r\nIt sounds easy enough to check if `tmutil` exists on the path in the bash script, and mark `~/.lein/self-installs` and `~/.m2` as things to exclude on script startup. (Unless `tmutil` is slow)\r\n\r\nIt's also possible to do this for target directories, but that would a tiny bit of complexity into Lein itself, which I'd prefer to include only if it benetfits a lot of users (Read: I have no idea how many mac users use Time Machine)"}}
{"actor":{"display_login":"hyPiRion"}}