infection icon indicating copy to clipboard operation
infection copied to clipboard

Both make compile and make compile-docker are broken

Open deviantintegral opened this issue 1 year ago • 1 comments

Question Answer
Infection version master as of ab91138f4ca44d406b730da6b825fd62d3c64958
PHP version 8.1.8
Platform macOS and Docker

When I run make compile on my macOS Homebrew PHP, I get:

? Generating new stub
  - Using shebang line: #!/usr/bin/env php
  - Using banner:
    > Generated by Humbug Box 3.16.0@adb282a.
    >
    > @link https://github.com/humbug/box
? Dumping the Composer autoloader

In ComposerOrchestrator.php line 172:

  Could not dump the autoloader.


In ComposerOrchestrator.php line 175:

  The command "'/usr/local/bin/composer' 'dump-autoload' '--classmap-authoritative' '--no-dev' '--ansi'" fa
  iled.

  Exit Code: 1(General error)

  Working directory: /private/var/folders/kh/l4v73x014452yvc02s48c3y40000gn/T/box/Box49204

  Output:
  ================


  Error Output:
  ================

  In AutoloadGenerator.php line 1384:


    require(/private/var/folders/kh/l4v73x014452yvc02s48c3y40000gn/T/box/Box49204/vendor/phpstan/ph
  pstan/boot
    strap.php): Failed to open stream: No such file or directory




  dump-autoload [-o|--optimize] [-a|--classmap-authoritative] [--apcu] [--apcu-prefix APCU-PREFIX] [--
  dev] [--no-dev] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs]


compile [-c|--config CONFIG] [--debug] [--no-parallel] [--no-restart] [--dev] [--no-config] [--with-docker] [-d|--working-dir WORKING-DIR]

make: *** [build/infection.phar] Error 1

With make compile-docker:

#0 19.00 Executing busybox-1.35.0-r15.trigger
#0 19.00 OK: 238 MiB in 61 packages
#0 19.05 + pecl install xdebug-3.0.4
#0 19.74 pecl/xdebug requires PHP (version >= 7.2.0, version <= 8.0.99), installed version is 8.1.8

I'm able to bump the xdebug version locally, but I would have expected builds to fail because of that.

deviantintegral avatar Aug 01 '22 23:08 deviantintegral

Actually, bumping xdebug leads to another error. I tried opting in the directory as safe in the Dockerfile, but the same error is thrown 🤔 .

Box version 3.16.0@adb282a 2022-02-13 23:54:13 UTC
./.tools/box validate

 // Loading the configuration file "/opt/infection/box.json.dist".

The configuration file failed validation: The tag or commit hash could not be retrieved from "/opt/infection": The tag or commit hash could not be retrieved from "/opt/infection": fatal: detected dubious ownership in repository at '/opt/infection'
To add an exception for this directory, call:

	git config --global --add safe.directory /opt/infection

make: *** [Makefile:229: build/infection.phar] Error 1
make: *** [compile-docker] Error 2

deviantintegral avatar Aug 01 '22 23:08 deviantintegral

Thank you for report, @deviantintegral

fixed on master

maks-rafalko avatar Aug 21 '22 15:08 maks-rafalko