-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feat/patch management #432
Conversation
lukasrothenberger
commented
Nov 1, 2023
- adds patch generator
- adds patch applicator
- adds line_mapping initialization & bookkeeping
hardcoded |
it would be helpful if the patch applicator would return an error code != 0 if applying the suggestions was not successful. |
@goerlibe fix proposed in 2378bd0 |
123370f
to
c91eaca
Compare
I am honestly fine with both. I think returning an error is more intuitive though, because the user tried to have something done and nothing was done. Maybe we can use different error codes for different errors (e.g. 1=already_applied, 2=patch_failed, >=2 indicates a yet unknown error) and document them in the argparse interface. Another (additional) option is to use stdout/stderr: I can show the output of stdout in an error message in the GUI and we can use stderr for the detailed error information (targeted at developers). This has the advantage that we do not need to update the GUI if we add more types of errors. Disadvantage is that we have to keep stdout clean. |
2b6357c
to
0e89b90
Compare
I can currently not apply more than one suggestion at once, not sure if I am doing something wrong, though by "at once" I mean "after another", i.e. two consecutive calls to the discopop_patch_applicator with different ids |
it would be nice if the patch_generator generates the applied_suggestions.json with an empty array. btw is there a reason for the entries being strings? they could be simple numbers, right? |