Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Repair patch #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

AntonEvers
Copy link

This patch did not install.

Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
Found 1 patches for symfony/dependency-injection.
  - Installing symfony/dependency-injection (v6.1.12): Extracting archive
Executing async command (CWD): '/usr/bin/unzip' -qq '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/composer/tmp-994403dcf948f97b159c6e40ba3dad06' -d '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/composer/788c53c7'
Executing async command (CWD): rm -rf '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/composer/788c53c7'
> post-package-install: cweagans\Composer\Patches->postInstall
  - Applying patches for symfony/dependency-injection
    https://raw.githubusercontent.com/symplify/vendor-patch-files/main/patches/generic-php-config-loader.patch (0)
Downloading https://raw.githubusercontent.com/symplify/vendor-patch-files/main/patches/generic-php-config-loader.patch
patch '-p1' --no-backup-if-mismatch -d '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/symfony/dependency-injection' < '/var/folders/p6/y1jmbsqx1kv6lhwntxczrv600000gn/T/63f8a0115e465.patch'
Executing command (CWD): patch '-p1' --no-backup-if-mismatch -d '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/symfony/dependency-injection' < '/var/folders/p6/y1jmbsqx1kv6lhwntxczrv600000gn/T/63f8a0115e465.patch'
patching file 'Loader/PhpFileLoader.php'
Patch creates file that already exists!  Assume -R? [y]

After this change, it does install.
I have also removed the whitespace changes at the end of the patch that were not adding anything functional.

This patch did not install.

```
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
Found 1 patches for symfony/dependency-injection.
  - Installing symfony/dependency-injection (v6.1.12): Extracting archive
Executing async command (CWD): '/usr/bin/unzip' -qq '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/composer/tmp-994403dcf948f97b159c6e40ba3dad06' -d '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/composer/788c53c7'
Executing async command (CWD): rm -rf '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/composer/788c53c7'
> post-package-install: cweagans\Composer\Patches->postInstall
  - Applying patches for symfony/dependency-injection
    https://raw.githubusercontent.com/symplify/vendor-patch-files/main/patches/generic-php-config-loader.patch (0)
Downloading https://raw.githubusercontent.com/symplify/vendor-patch-files/main/patches/generic-php-config-loader.patch
patch '-p1' --no-backup-if-mismatch -d '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/symfony/dependency-injection' < '/var/folders/p6/y1jmbsqx1kv6lhwntxczrv600000gn/T/63f8a0115e465.patch'
Executing command (CWD): patch '-p1' --no-backup-if-mismatch -d '/Users/antonevers/web/AntonEvers/monorepo-builder/vendor/symfony/dependency-injection' < '/var/folders/p6/y1jmbsqx1kv6lhwntxczrv600000gn/T/63f8a0115e465.patch'
patching file 'Loader/PhpFileLoader.php'
Patch creates file that already exists!  Assume -R? [y]
```
After this change, it does install.
I have also removed the whitespace changes at the end of the patch that were not adding anything functional.
@AntonEvers
Copy link
Author

@TomasVotruba I suspect that this has something to do with running the patch command on a mac:

$ patch --version
patch 2.0-12u11-Apple

I suspect that this patch format is more compatible with mac and linux alike.
I generated it with git diff.

@TomasVotruba
Copy link
Member

TomasVotruba commented Feb 24, 2023

Hi Anton,

thanks for the PR. Where exactly this patch did not install?
It worked well so far :)

Changing paths can easily break it.

@AntonEvers
Copy link
Author

I am running it on a mac. I suppose the same thing is going on with the patches in the rector repo.

@TomasVotruba
Copy link
Member

We'll need a test case in CI for Mac then to make sure this passes and does not break on other OS.
In the past we've merge such PRs, only to revert it for crash on Linux, so I want to avoid it :)

@AntonEvers
Copy link
Author

AntonEvers commented Feb 24, 2023

I understand. If you like I can test running this patch on a linux machine.
I create patches frequently and have not seen issues with the git format on any server so far.
I've minimized the PR to only change the file path

AntonEvers pushed a commit to AntonEvers/monorepo-builder that referenced this pull request Mar 3, 2023
This should fail and later pass with deprecated-packages/vendor-patch-files#2
@kayw-geek
Copy link

@AntonEvers This commit able to resolve your problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants