Skip to content
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

Composer cache interferring with patching #66

Closed
mike-potter opened this issue Aug 23, 2016 · 4 comments
Closed

Composer cache interferring with patching #66

mike-potter opened this issue Aug 23, 2016 · 4 comments

Comments

@mike-potter
Copy link

mike-potter commented Aug 23, 2016

When patching a dependency/module, then later you update the patch URL (to point to a newer patch) and run "composer update", it will try to apply the new patch to the cached previously patched download rather than applying it to a fresh download.

For example:

"patches": {
    "drupal/core": {
        "2655104 - List unmet dependencies instead of just failing":
        "https://www.drupal.org/files/issues/list-missing-dependencies-2655104-19.patch"
    }
},

then do "composer install". This works. Now edit the composer.json to be:

"patches": {
    "drupal/core": {
        "2655104 - List unmet dependencies instead of just failing":
        "https://www.drupal.org/files/issues/2655104-51.patch"
    }
},

then do "composer update". This will fail to apply the patch. From what I can tell, it is trying to apply the updated patch to the previously patched version that is in the composer cache, rather than re-downloading and applying from scratch.

If I do a "composer clear-cache" and THEN do a "composer update", then it works.

Edited: Using v1.5.0 of composer-patches

@mike-potter
Copy link
Author

Tried to reproduce this today to see if changing the key for the patch would help. But now I cannot reproduce this issue. Not sure what changed but will post more info if I learn something.

@cybtachyon
Copy link

Noting that I'm only seeing this issue with patches that add new files.

@kevinquillen
Copy link

Yes, I added some patches to composer.json after previously requiring the module via composer. I had to run composer update a few times, eventually composer removed the module, and then on the next composer update, added it back and applied the patch. Until that point, composer kept saying no patches supplied.

@cweagans
Copy link
Owner

cweagans commented Feb 7, 2023

I don't think this is an issue in main anymore. Please let me know if that's not the case.

@cweagans cweagans closed this as completed Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants