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
ConflictError: Cannot add lines after given line since there are already lines. #1235
Comments
@Makman2 I think this is a usability issue, probably relevant for 0.5... ish? Could you tell us what you were expecting coala to do in this case? Print the same patch again? Are you aware that the patch would be no longer valid because the files on your FS have changed? |
@sils1297 wouldn't that also happen on Linux systems?
|
@sils1297 yes that's why we need to keep the old version if we want to print the patch and refer to that. I would like to be able to print the patch still, sometimes it's like "oh coala found something, just apply... oh wait damn, that was from SpecialSuperBear, omg need to check that again what I did..." |
@Makman2 I don't see any way to do this cleanly from a technical POV. I.e. we can't provide an action with the means to do that kind of thing without doing something completely weird, complicated that would work just for this one usecase which isn't that important anyway. I would rather think about executing applypatchaction automatically before applying the patch or so. |
Alright then let's remove the choice for displaying the patch when a user already applied it. |
Earlier, is_applicable() was not very smart and just checked if the diff existed. Now, we check if the diff has a conflict. If there is a conflict, this action is not applicable. We use a similar condition to ApplyPatchAction, as when the patch is viewable, it should also be applicable. Fixes #1235
There is the error message. If you have more questions, ask me.
The text was updated successfully, but these errors were encountered: