{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/5423","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/5423/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/5423/comments","events_url":"https://api.github.com/repos/composer/composer/issues/5423/events","html_url":"https://github.com/composer/composer/issues/5423","id":159548040,"number":5423,"title":"Cache package after cloning from source","user":{"login":"mikeshiyan","id":3637657,"avatar_url":"https://avatars.githubusercontent.com/u/3637657?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeshiyan","html_url":"https://github.com/mikeshiyan","followers_url":"https://api.github.com/users/mikeshiyan/followers","following_url":"https://api.github.com/users/mikeshiyan/following{/other_user}","gists_url":"https://api.github.com/users/mikeshiyan/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeshiyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeshiyan/subscriptions","organizations_url":"https://api.github.com/users/mikeshiyan/orgs","repos_url":"https://api.github.com/users/mikeshiyan/repos","events_url":"https://api.github.com/users/mikeshiyan/events{/privacy}","received_events_url":"https://api.github.com/users/mikeshiyan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/composer/composer/labels/Feature","name":"Feature","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-10T02:32:53Z","updated_at":"2016-06-13T06:57:23Z","closed_at":null,"body":"Feature request.\r\n\r\nThere are large packages (with very long log of commits) that don't provide URLs to their dists on packagist.org for some reason. It will be very nice to avoid a headache of cloning such projects every time a _composer create-project_ or _require_ command runs. \r\n\r\nSo if the composer could copy the _.git_ dir to the cache or if it could zip the package (make a local dist in cache) after the first clone-n-checkout it'd be a very pleasant feature.\r\n\r\nFor example, with no composer.json in empty directory I run this command:\r\n```\r\ncomposer require --profile drupal/drupal\r\n```\r\n\r\nI get this output:\r\n```\r\n[37.1MB/6.42s] Using version ^8.1 for drupal/drupal\r\n[37.1MB/6.42s] ./composer.json has been created\r\n[37.3MB/6.51s] Loading composer repositories with package information\r\n[37.4MB/6.89s] Updating dependencies (including require-dev)\r\n[76.6MB/8.72s]   - Installing wikimedia/composer-merge-plugin (v1.3.1)\r\n[76.6MB/8.74s]     Loading from cache\r\n[76.6MB/8.83s] \r\n[76.6MB/8.84s]   - Installing composer/installers (v1.0.25)\r\n[76.6MB/8.86s]     Loading from cache\r\n[76.7MB/8.92s] \r\n[76.6MB/8.93s]   - Installing drupal/drupal (8.1.2)\r\n[76.6MB/8.93s]     Cloning 6e89c78a29827737ad180d98079faf32acf609da\r\n[76.6MB/9232.72s] \r\n[76.4MB/9237.73s] Writing lock file\r\n[76.4MB/9237.73s] Generating autoload files\r\n[76.6MB/9237.86s] Loading composer repositories with package information\r\n[76.7MB/9238.39s] Updating dependencies (including require-dev)\r\n[115.8MB/9243.89s] Nothing to install or update\r\n[115.6MB/9243.90s] Generating autoload files\r\n[115.5MB/9244.07s] Memory usage: 115.51MB (peak: 119.68MB), time: 9244.07s\r\n```\r\n\r\nThe command ends execution successfully but it takes so long, and the package does not get cached in any way."},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/225502330","html_url":"https://github.com/composer/composer/issues/5423#issuecomment-225502330","issue_url":"https://api.github.com/repos/composer/composer/issues/5423","id":225502330,"user":{"login":"alcohol","id":21414,"avatar_url":"https://avatars.githubusercontent.com/u/21414?v=3","gravatar_id":"","url":"https://api.github.com/users/alcohol","html_url":"https://github.com/alcohol","followers_url":"https://api.github.com/users/alcohol/followers","following_url":"https://api.github.com/users/alcohol/following{/other_user}","gists_url":"https://api.github.com/users/alcohol/gists{/gist_id}","starred_url":"https://api.github.com/users/alcohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcohol/subscriptions","organizations_url":"https://api.github.com/users/alcohol/orgs","repos_url":"https://api.github.com/users/alcohol/repos","events_url":"https://api.github.com/users/alcohol/events{/privacy}","received_events_url":"https://api.github.com/users/alcohol/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T06:57:23Z","updated_at":"2016-06-13T06:57:23Z","body":"Composer already caches anything that is downloaded as a dist version (e.g. zipballs from Github). The only thing that is not cached are source downloads (git clone)."}}
{"actor":{"display_login":"alcohol"}}