-
-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package deleted but not reinstalled and patched #26
Comments
Sorry for the slow response here. I've been insanely busy for the past month :( First, please ensure that you're running the latest Compose, as that may affect this functionality. If the problem persists, are you able to provide a complete |
I'm also running into this problem. I can reproduce it in the following way:
Example file:
Example output after adding a patch and running
Output after running for the second time:
|
I suspect that the issue has to do with how the composer-patches library works in combination with installer-paths. composer-patches see's that drupal/drupal needs to be patched. It sees that drupal/drupal is installed to /docroot, so it delete's /docroot and patches drupal/drupal. But wait! That wipes out the subdirectories :( |
I'm seeing the exact same problem and it is fairly annoying especially when using this in an automated deployment context. Every time a patch gets either added or removed from composer.json, the This output
indicates the right thing: let's delete that package, re-install it and then patch it. Just the middle part (re-install) is missing. |
We've now seen this issue on multiple projects. When
We've temporarily worked around this by automating a removal of all package directories and clearing composer caches prior to any Unfortunately #59 does not appear to resolve the issue. |
Quick reproduction of the issue:
Run:
Output:
Notice that entity_browser is patched initially after running |
A couple of observations:
|
It seems that packages are correctly removed here: https://github.com/cweagans/composer-patches/blob/master/src/Patches.php#L117 However, when they are re-downloaded, the patches are not applied. This is because the re-downloaded packages have Instead, |
Not really sure how to reset the patches and patches_applied arrays. Seems like this is the right place: But, using setExtra() doesn't appear to persist data.
|
@cweagans I think we have a good read on the root cause at this point. I'm going to pause and wait for your input before pushing forward with a fix. |
It seems that when composer-patches removes and re-downloads a packages, the re-downloaded package is missing its patch information in |
This is resolved by #30 |
This is happening on both Composer install\update after I've initially updated the patches file. The next time I run an install or update however the package is reinstalled and patched as expected.
This is the terminal output when the package is not reinstalled:
The extra section of my composer.json
and my composer.patches.json
The text was updated successfully, but these errors were encountered: