bobthecow/psysh

Repo size 358.59 MiB seriously???

Closed this issue ยท 4 comments

Cloning into '/var/www/app/vendor/psy/psysh'...
remote: Enumerating objects: 73, done.
remote: Counting objects: 100% (73/73), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 12396 (delta 40), reused 45 (delta 24), pack-reused 12323
Receiving objects: 100% (12396/12396), 358.59 MiB | 15.23 MiB/s, done.
Resolving deltas: 100% (7542/7542), done.
du -h -d 0 --exclude=.git
1.6M    .

99.5% of repo - trash!

du -h -d 0 .git
360M    .git

On slow internet download takes a very, very long time. Composer fails:

  - Installing psy/psysh (v0.9.8): Cloning ed3c32c430
  [Symfony\Component\Process\Exception\ProcessTimedOutException]
  The process "git clone --no-checkout 'https://github.com/bobthecow/psysh.git' '/var/www/app/vendor/psy/psysh' && cd '/var/www/app/
  vendor/psy/psysh' && git remote add composer 'https://github.com/bobthecow/psysh.git' && git fetch composer" exceeded the timeout
  of 300 seconds.

Well first of:

  • Chill: being angry and rude won't get your anywhere, the most likely answer you will get from it is "fuck off"
  • The size of the repo is not chocking: it's not a trivial project and it is also well tested.

That said if you are really concerned about this issue, feel free to politely do a pull request to add a .gitattributes file in order to exclude directories like test and vendor-bin from the package download.

An alternative is also to download only the necessary files with --prefer-dist (or you can configure it in your composer.json file) which will likely reduce the size of the projects downloaded since you won't download the git history anymore

@theofidry thanx, --prefer-dist solved one of the problems.
But the bloated repository size is disrespect for library users.

But the bloated repository size is disrespect for library users.

Mouthful complains on OSS projects are disrespect for maintainers who don't owe you anything. If you feel it is an issue, instead of complaining you should attempt to fix it. Especially since I already gave the solution above, you just need to open a pull request with the right .gitattributes file...

Maybe this article could be a good read for you.

But the bloated repository size is disrespect for library users.

"seriously" and three question marks in your issue subject is disrespect for library maintainers.

  1. Don't be a jerk about open source. You'll get further in life.
  2. You shouldn't set Composer up to install from source. It's a lot slower, as you've noticed.
  3. If you don't want to change it globally, you can fix the issue yourself by setting the preferred-install config option on a per-package basis, to use dist for just the slow ones.
  4. There's also a process-timeout config option for Composer that increases the timeout, in case you ignore numbers 2 and 3 and ever run into another large repo.
  5. The size of this repo has been fixed.
  6. Seriously, don't be a jerk.