szeidler / composer-patches-cli

Adds a CLI wrapper for cweagans/composer-patches
MIT License
28 stars 8 forks source link

Seeking clarity on multiple patches for the same project #18

Open nerdstein opened 4 years ago

nerdstein commented 4 years ago

Thank you for your work on this project.

I am curious if the current approach has support for patching the same project more than once.

When I run the following commands, I see messaging that discusses removing core (the target of the patch). If core gets removed for each patch, does it remove a previous patch? I am unclear from the current messaging.

composer patch-enable --file='patches.json'
The composer patches file was created.
The composer patches functionality was enabled successfully.

composer patch-add drupal/core "STM patch 564553073" "https://www.drupal.org/files/issues/2018-11-26/2991895-15.patch"
The patch was successfully added.
Gathering patches from patch file.
Removing package drupal/core so that it can be re-installed and re-patched.
  - Removing drupal/core (8.9.x-dev), source is still present in core
> Drupal\Composer\Composer::ensureComposerVersion
Deleting core - not deleted

composer patch-add drupal/core "STM patch 1665039650" "https://www.drupal.org/files/issues/2018-12-10/2938803-52.patch"
The patch was successfully added.
  - Removing drupal/core (8.9.x-dev), source is still present in core
Gathering patches from patch file.
Removing package drupal/core so that it can be re-installed and re-patched.
> Drupal\Composer\Composer::ensureComposerVersion
Deleting core - not deleted
szeidler commented 4 years ago

Hi @nerdstein , thanks for your report. Actually the composer-patches should always reapply all patches for the project, that got reinstalled. Usually you should get a report for each of those patches. For some reason it seems that none of the patches got applied, which would be indeed a problem. Could you confirm which patch had been applied at which step or not?