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

Make patch-package output better errors #683

Closed

Conversation

estellecomment
Copy link
Contributor

@estellecomment estellecomment commented Sep 6, 2023

Partial fix to #361

Example command :
patch-package --patch-dir patches/change-sections-order-in-security-privacy-settings

Obtained output :

**ERROR** Failed to apply patch for package matrix-react-sdk at path

    node_modules/matrix-react-sdk

  This error was caused because matrix-react-sdk has changed since you
  made the patch file for it. This introduced conflicts with your patch,
  just like a merge conflict in Git when separate incompatible changes are
  made to the same piece of code.

  Maybe this means your patch file is no longer necessary, in which case
  hooray! Just delete it!

  Otherwise, you need to generate a new patch file.

  To generate a new one, just repeat the steps you made to generate the first
  one.

  i.e. manually make the appropriate file changes, then run

    patch-package matrix-react-sdk

  Info:
    Patch file: patches/matrix-react-sdk+3.71.1.patch
    Patch was made for version: 3.71.1
    Installed version: 3.78.0

Expected last lines of output to be instead :

  Info:
    Patch file: patches/change-sections-order-in-security-privacy-settings/matrix-react-sdk+3.71.1.patch
    Patch was made for version: 3.71.1
    Installed version: 3.78.0

@estellecomment
Copy link
Contributor Author

argh yarn.lock is messed up, will fix it

@estellecomment estellecomment marked this pull request as draft September 6, 2023 10:22
@estellecomment
Copy link
Contributor Author

This is not really necessary any more now that the CI outputs errors properly, and it's a bit complicated, so I'm closing it without merging. It's adding complications to the build without really solving a problem.

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

Successfully merging this pull request may close these issues.

None yet

2 participants