{"action":"opened","number":330,"pull_request":{"url":"https://api.github.com/repos/frerich/clcache/pulls/330","id":231737982,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNzM3OTgy","html_url":"https://github.com/frerich/clcache/pull/330","diff_url":"https://github.com/frerich/clcache/pull/330.diff","patch_url":"https://github.com/frerich/clcache/pull/330.patch","issue_url":"https://api.github.com/repos/frerich/clcache/issues/330","number":330,"state":"open","locked":false,"title":"install_clcache_msbuild.py : helper for msbuild integration","user":{"login":"pthom","id":7694091,"node_id":"MDQ6VXNlcjc2OTQwOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7694091?v=4","gravatar_id":"","url":"https://api.github.com/users/pthom","html_url":"https://github.com/pthom","followers_url":"https://api.github.com/users/pthom/followers","following_url":"https://api.github.com/users/pthom/following{/other_user}","gists_url":"https://api.github.com/users/pthom/gists{/gist_id}","starred_url":"https://api.github.com/users/pthom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pthom/subscriptions","organizations_url":"https://api.github.com/users/pthom/orgs","repos_url":"https://api.github.com/users/pthom/repos","events_url":"https://api.github.com/users/pthom/events{/privacy}","received_events_url":"https://api.github.com/users/pthom/received_events","type":"User","site_admin":false},"body":"Since the integration of `clcache` with `msbuild` is rather cumbersome,\r\nthis script provide an helper in order to simplify the process.\r\n\r\nNotes: \r\n* Incremental builds:  There still is an issue with msbuild incremental build : we always get a full rebuild. A merge of the PR https://github.com/frerich/clcache/pull/319/commits would make this script more relevant : as of now, it cannot reliably be used from inside Visual Studio, since any file modification always triggers a full rebuild.\r\n* This PR is a cousin of the pull request https://github.com/frerich/clcache/pull/172, which I discovered long after I started to work on this\r\n\r\n### What this script does:\r\n\r\n* Check that python3 and pip3 are installed and are in the PATH\r\n* Check that the pip installed scripts are in the PATH (PYTHONHOME\\Scripts)\r\n* Call `pip install .` from the repo and check that clcache is then in the PATH.\r\n  `clcache` will subsequently be used from the PYTHONHOME\\\\Scripts directory.\r\n* Modify the user msbuild preference files inside\r\n  `%AppData%\\..\\Local\\Microsoft\\MSBuild\\v4.0`\r\n  so that clcache becomes the default compiler\r\n* Set the env variable `CLCACHE_CL` with the correct path to cl.exe\r\n\r\nAs additional options, this script can also\r\n* change the cache location\r\n* change the cache size\r\n* change the timeout CLCACHE_OBJECT_CACHE_TIMEOUT_MS\r\n\r\n### Usage :\r\n\r\n````\r\npython install_clcache_msbuild.py -h\r\n\r\nusage: install_clcache_msbuild.py [-h] [--cachedir CACHEDIR]\r\n                                  [--cache_size CACHE_SIZE]\r\n                                  [--clcache_timeout CLCACHE_TIMEOUT]\r\n                                  {status,install,disable,enable_logs,disable_logs}\r\n\r\nConfigure clcache for use with msbuild\r\n\r\npositional arguments:\r\n  {status,install,disable,enable_logs,disable_logs}\r\n                        action\r\n\r\noptional arguments:\r\n  -h, --help            show this help message and exit\r\n  --cachedir CACHEDIR   clcache directory\r\n  --cache_size CACHE_SIZE\r\n                        clcache size in Go\r\n  --clcache_timeout CLCACHE_TIMEOUT\r\n                        clcache object cache timeout in seconds (increase if\r\n                        you have failures during your build)\r\n\r\nActions summary:\r\n    status       : Show the install status and tells if clcache is enabled\r\n    install:     : Install and enable clcache for msbuild integration\"\r\n    disable:     : Disable clcache\r\n    enable_logs  : Activate clcache logs during builds\r\n    disable_logs : Disable clcache logs during builds\r\n\r\n````","created_at":"2018-11-17T16:48:46Z","updated_at":"2018-11-17T16:48:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/frerich/clcache/pulls/330/commits","review_comments_url":"https://api.github.com/repos/frerich/clcache/pulls/330/comments","review_comment_url":"https://api.github.com/repos/frerich/clcache/pulls/comments{/number}","comments_url":"https://api.github.com/repos/frerich/clcache/issues/330/comments","statuses_url":"https://api.github.com/repos/frerich/clcache/statuses/9e80bee41ed54f202e87d464c566f4aaea46a7a1","head":{"label":"pthom:feature/install_for_msbuild_master","ref":"feature/install_for_msbuild_master","sha":"9e80bee41ed54f202e87d464c566f4aaea46a7a1","user":{"login":"pthom","id":7694091,"node_id":"MDQ6VXNlcjc2OTQwOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7694091?v=4","gravatar_id":"","url":"https://api.github.com/users/pthom","html_url":"https://github.com/pthom","followers_url":"https://api.github.com/users/pthom/followers","following_url":"https://api.github.com/users/pthom/following{/other_user}","gists_url":"https://api.github.com/users/pthom/gists{/gist_id}","starred_url":"https://api.github.com/users/pthom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pthom/subscriptions","organizations_url":"https://api.github.com/users/pthom/orgs","repos_url":"https://api.github.com/users/pthom/repos","events_url":"https://api.github.com/users/pthom/events{/privacy}","received_events_url":"https://api.github.com/users/pthom/received_events","type":"User","site_admin":false},"repo":{"id":157974379,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc5NzQzNzk=","name":"clcache","full_name":"pthom/clcache","private":false,"owner":{"login":"pthom","id":7694091,"node_id":"MDQ6VXNlcjc2OTQwOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7694091?v=4","gravatar_id":"","url":"https://api.github.com/users/pthom","html_url":"https://github.com/pthom","followers_url":"https://api.github.com/users/pthom/followers","following_url":"https://api.github.com/users/pthom/following{/other_user}","gists_url":"https://api.github.com/users/pthom/gists{/gist_id}","starred_url":"https://api.github.com/users/pthom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pthom/subscriptions","organizations_url":"https://api.github.com/users/pthom/orgs","repos_url":"https://api.github.com/users/pthom/repos","events_url":"https://api.github.com/users/pthom/events{/privacy}","received_events_url":"https://api.github.com/users/pthom/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pthom/clcache","description":"A compiler cache for MSVC, much like ccache for gcc","fork":true,"url":"https://api.github.com/repos/pthom/clcache","forks_url":"https://api.github.com/repos/pthom/clcache/forks","keys_url":"https://api.github.com/repos/pthom/clcache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pthom/clcache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pthom/clcache/teams","hooks_url":"https://api.github.com/repos/pthom/clcache/hooks","issue_events_url":"https://api.github.com/repos/pthom/clcache/issues/events{/number}","events_url":"https://api.github.com/repos/pthom/clcache/events","assignees_url":"https://api.github.com/repos/pthom/clcache/assignees{/user}","branches_url":"https://api.github.com/repos/pthom/clcache/branches{/branch}","tags_url":"https://api.github.com/repos/pthom/clcache/tags","blobs_url":"https://api.github.com/repos/pthom/clcache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pthom/clcache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pthom/clcache/git/refs{/sha}","trees_url":"https://api.github.com/repos/pthom/clcache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pthom/clcache/statuses/{sha}","languages_url":"https://api.github.com/repos/pthom/clcache/languages","stargazers_url":"https://api.github.com/repos/pthom/clcache/stargazers","contributors_url":"https://api.github.com/repos/pthom/clcache/contributors","subscribers_url":"https://api.github.com/repos/pthom/clcache/subscribers","subscription_url":"https://api.github.com/repos/pthom/clcache/subscription","commits_url":"https://api.github.com/repos/pthom/clcache/commits{/sha}","git_commits_url":"https://api.github.com/repos/pthom/clcache/git/commits{/sha}","comments_url":"https://api.github.com/repos/pthom/clcache/comments{/number}","issue_comment_url":"https://api.github.com/repos/pthom/clcache/issues/comments{/number}","contents_url":"https://api.github.com/repos/pthom/clcache/contents/{+path}","compare_url":"https://api.github.com/repos/pthom/clcache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pthom/clcache/merges","archive_url":"https://api.github.com/repos/pthom/clcache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pthom/clcache/downloads","issues_url":"https://api.github.com/repos/pthom/clcache/issues{/number}","pulls_url":"https://api.github.com/repos/pthom/clcache/pulls{/number}","milestones_url":"https://api.github.com/repos/pthom/clcache/milestones{/number}","notifications_url":"https://api.github.com/repos/pthom/clcache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pthom/clcache/labels{/name}","releases_url":"https://api.github.com/repos/pthom/clcache/releases{/id}","deployments_url":"https://api.github.com/repos/pthom/clcache/deployments","created_at":"2018-11-17T10:38:10Z","updated_at":"2018-11-17T10:38:13Z","pushed_at":"2018-11-17T16:40:40Z","git_url":"git://github.com/pthom/clcache.git","ssh_url":"git@github.com:pthom/clcache.git","clone_url":"https://github.com/pthom/clcache.git","svn_url":"https://github.com/pthom/clcache","homepage":"","size":874,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"frerich:master","ref":"master","sha":"6d62cc1242777a9a52aa4330c77097578a4c5ed0","user":{"login":"frerich","id":533425,"node_id":"MDQ6VXNlcjUzMzQyNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/533425?v=4","gravatar_id":"","url":"https://api.github.com/users/frerich","html_url":"https://github.com/frerich","followers_url":"https://api.github.com/users/frerich/followers","following_url":"https://api.github.com/users/frerich/following{/other_user}","gists_url":"https://api.github.com/users/frerich/gists{/gist_id}","starred_url":"https://api.github.com/users/frerich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frerich/subscriptions","organizations_url":"https://api.github.com/users/frerich/orgs","repos_url":"https://api.github.com/users/frerich/repos","events_url":"https://api.github.com/users/frerich/events{/privacy}","received_events_url":"https://api.github.com/users/frerich/received_events","type":"User","site_admin":false},"repo":{"id":1190383,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkwMzgz","name":"clcache","full_name":"frerich/clcache","private":false,"owner":{"login":"frerich","id":533425,"node_id":"MDQ6VXNlcjUzMzQyNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/533425?v=4","gravatar_id":"","url":"https://api.github.com/users/frerich","html_url":"https://github.com/frerich","followers_url":"https://api.github.com/users/frerich/followers","following_url":"https://api.github.com/users/frerich/following{/other_user}","gists_url":"https://api.github.com/users/frerich/gists{/gist_id}","starred_url":"https://api.github.com/users/frerich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frerich/subscriptions","organizations_url":"https://api.github.com/users/frerich/orgs","repos_url":"https://api.github.com/users/frerich/repos","events_url":"https://api.github.com/users/frerich/events{/privacy}","received_events_url":"https://api.github.com/users/frerich/received_events","type":"User","site_admin":false},"html_url":"https://github.com/frerich/clcache","description":"A compiler cache for MSVC, much like ccache for gcc","fork":false,"url":"https://api.github.com/repos/frerich/clcache","forks_url":"https://api.github.com/repos/frerich/clcache/forks","keys_url":"https://api.github.com/repos/frerich/clcache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frerich/clcache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frerich/clcache/teams","hooks_url":"https://api.github.com/repos/frerich/clcache/hooks","issue_events_url":"https://api.github.com/repos/frerich/clcache/issues/events{/number}","events_url":"https://api.github.com/repos/frerich/clcache/events","assignees_url":"https://api.github.com/repos/frerich/clcache/assignees{/user}","branches_url":"https://api.github.com/repos/frerich/clcache/branches{/branch}","tags_url":"https://api.github.com/repos/frerich/clcache/tags","blobs_url":"https://api.github.com/repos/frerich/clcache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frerich/clcache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frerich/clcache/git/refs{/sha}","trees_url":"https://api.github.com/repos/frerich/clcache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frerich/clcache/statuses/{sha}","languages_url":"https://api.github.com/repos/frerich/clcache/languages","stargazers_url":"https://api.github.com/repos/frerich/clcache/stargazers","contributors_url":"https://api.github.com/repos/frerich/clcache/contributors","subscribers_url":"https://api.github.com/repos/frerich/clcache/subscribers","subscription_url":"https://api.github.com/repos/frerich/clcache/subscription","commits_url":"https://api.github.com/repos/frerich/clcache/commits{/sha}","git_commits_url":"https://api.github.com/repos/frerich/clcache/git/commits{/sha}","comments_url":"https://api.github.com/repos/frerich/clcache/comments{/number}","issue_comment_url":"https://api.github.com/repos/frerich/clcache/issues/comments{/number}","contents_url":"https://api.github.com/repos/frerich/clcache/contents/{+path}","compare_url":"https://api.github.com/repos/frerich/clcache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frerich/clcache/merges","archive_url":"https://api.github.com/repos/frerich/clcache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frerich/clcache/downloads","issues_url":"https://api.github.com/repos/frerich/clcache/issues{/number}","pulls_url":"https://api.github.com/repos/frerich/clcache/pulls{/number}","milestones_url":"https://api.github.com/repos/frerich/clcache/milestones{/number}","notifications_url":"https://api.github.com/repos/frerich/clcache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frerich/clcache/labels{/name}","releases_url":"https://api.github.com/repos/frerich/clcache/releases{/id}","deployments_url":"https://api.github.com/repos/frerich/clcache/deployments","created_at":"2010-12-22T15:14:53Z","updated_at":"2018-11-12T19:03:41Z","pushed_at":"2018-10-17T23:59:26Z","git_url":"git://github.com/frerich/clcache.git","ssh_url":"git@github.com:frerich/clcache.git","clone_url":"https://github.com/frerich/clcache.git","svn_url":"https://github.com/frerich/clcache","homepage":"","size":858,"stargazers_count":210,"watchers_count":210,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":54,"open_issues":35,"watchers":210,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/frerich/clcache/pulls/330"},"html":{"href":"https://github.com/frerich/clcache/pull/330"},"issue":{"href":"https://api.github.com/repos/frerich/clcache/issues/330"},"comments":{"href":"https://api.github.com/repos/frerich/clcache/issues/330/comments"},"review_comments":{"href":"https://api.github.com/repos/frerich/clcache/pulls/330/comments"},"review_comment":{"href":"https://api.github.com/repos/frerich/clcache/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/frerich/clcache/pulls/330/commits"},"statuses":{"href":"https://api.github.com/repos/frerich/clcache/statuses/9e80bee41ed54f202e87d464c566f4aaea46a7a1"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":419,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"pthom"}}