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

Display the package(s) that required a failing patch #256

Closed
TravisCarden opened this issue Mar 5, 2019 · 5 comments
Closed

Display the package(s) that required a failing patch #256

TravisCarden opened this issue Mar 5, 2019 · 5 comments

Comments

@TravisCarden
Copy link

TravisCarden commented Mar 5, 2019

When a build fails because composer-patches can't apply a patch declared by a third party package, it can be difficult to find the culprit in order to fix it. Output in that case currently looks like this:

  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/2241865-50.patch (#2241865: Do not create a new file entity to overwrite an existing entity)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2241865-50.patch
In Patches.php line 320:
                                                                               
  Cannot apply patch #2241865: Do not create a new file entity to overwrite a  
  n existing entity (https://www.drupal.org/files/issues/2241865-50.patch)!   

Perhaps it output could be expanded to include the package(s) that called for the patch. As inspiration, consider the output of composer depends:

$ composer depends drupal/acquia_connector
acquia/blt-project     dev-fc19a525eb8e51de360633e98ebcd2119399f042  requires  drupal/acquia_connector (*)
drupal/lightning_core  3.7.0                                         requires  drupal/acquia_connector (^1.1)

Workaround: It appears that this information gets written to composer.lock under extra.patches_applied in the declaring package object(s), so you can manually search for the answer there (if you get that far). ht @phenaproxima

@cweagans
Copy link
Owner

cweagans commented Feb 7, 2023

main no longer resolves patches from dependencies out of the box, so this shouldn't happen anymore :)

@cweagans cweagans closed this as completed Feb 7, 2023
@TravisCarden
Copy link
Author

Thank you, @cweagans. Could you point me to a PR/issue detailing this behavior change whereby "patches from dependencies are no longer resolved out-of-the-box"? I need to fully understand the change so I know whether my Drupal builds need to do anything in response.

@cweagans
Copy link
Owner

cweagans commented Feb 8, 2023

#267 is where it was removed. Don't make changes just yet though. This will be detailed in the release announcement down the road a bit + there may be another way to do it by then if I (or somebody else) writes a plugin to re-add the functionality.

@cweagans
Copy link
Owner

cweagans commented Feb 8, 2023

Just to be clear - this is for 2.x, which is not released yet. I won't be changing that behavior in 1.x.

@TravisCarden
Copy link
Author

Great, thanks. 🙂

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

2 participants