Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cruft now fails to apply, without providing conflict to manually resolve

See original GitHub issue

Prior to cruft 1.4.0, if it was unable to cleanly apply a patch, it would produce a conflict that had to be manually resolved.

As an example:

For my own project template, I updated the cruft version to 2.2.0+ here:

If I do cruft update using 1.3.0, it fails but then leaves behind this conflict .orig for me to manually resolve:

diff --git a/pyproject.toml b/pyproject.toml
index 1902c9f..b3f1069 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -98,7 +98,14 @@ extra_css = ["art/stylesheets/extra.css"]
 name = "material"
 favicon = "art/logo.png"
 logo = "art/logo.png"
 palette = {scheme = "isort"}
+pytest-mock = "^1.10"
+pep8-naming = "^0.8.2"
+portray = "^1.3.0"
+cruft = "^2.2"

On cruft 2.2.0, it fails but then marks it as a success leaving no way for me to know what the intended update was:

Apply diff and update? (y, n, s, v) [y]: y
error: patch failed:
error: repository lacks the necessary blob to fall back on 3-way merge.
error: patch does not apply
error: patch failed: pyproject.toml:23
error: repository lacks the necessary blob to fall back on 3-way merge.
error: pyproject.toml: patch does not apply

Good work! Project's cruft has been updated and is as clean as possible!

.orig files are messy, but it feels even worse to mark the project as updated when the update fully failed. I wonder if, we could update cruft to show the template diffs and request manually application of them in the case it cant apply them automatically:

Cruft was unable to automatically update pyproject.toml!

Here is what changed in that file:

-cruft = "^1.1"
+cruft = "^2.2"

Please manually update this file then enter Y to continue or N to cancel:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

samj1912commented, Aug 16, 2020

I am looking into a more complex enhancement that will help with this but I wanted to get in a bug fix first 😃 See #49

lsorbercommented, Aug 16, 2020

I can confirm that 2.3.0 addresses the issue, thanks!

That being said, I do think the output could be a little more friendly as to which files the developer should manually merge and how to go about that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot common coauthoring errors
Upload Failed: Resolve Conflict. Upload failed due to conflict banner. Experience: The error bar appears, AutoSave turns off, and no more updates come...
Read more >
The Big Book of Conflict Resolution Games
Experiential learning activities and exercises can challenge a team to deal with the real issues of conflict—differing personality styles, perceptions, ...
Read more >
How to resolve git stash conflict without commit?
Manually (or ideally using some merge tool, see below) resolve the conflict(s). Use git restore --staged . to mark conflict(s) as resolved ......
Read more >
5 Common Interview Questions About Conflict (With ...
Learn about five common interview questions about conflict and review our sample answers to guide your own response.
Read more >
United States Strategy to Prevent Conflict and Promote ...
The average internal armed conflict now lasts more than 20 years. ... U.S. interventions to address fragility will not be successful without ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found