-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
v.util: ensure output of color_compare_files
is colorized
#21244
Conversation
I've reverted bfd53a9 in 056a443. The reason is that import v.util
import v.util.diff
diff_cmd := diff.find_working_diff_command()!
res := util.color_compare_files(diff_cmd, 'v.mod', 'v2.mod')
println(res) |
I think this still can be used with #21242 and that the PR does not need to be reverted or this one closed |
What command does it use for you? Do you have colordiff additionally installed? |
I disagree. It represents a regress in functionality, and a break on FreeBSD (whose diff tool does not support color output at all). |
The list of commonly used diff commands is in It would be nice, for the diff to work when it is supported, and to be customizable when the user has more sophisticated tools and needs (which currently can be done by setting VDIFF_TOOL and VDIFF_OPTIONS). That can be done by changing |
Yes I wanted to take the diff module there. Though thought it's organic and sophisticated doing it step by step |
e8fc154
to
f47f936
Compare
Yes, on both Linux and on FreeBSD, but I renamed it while testing. |
Awesome fix thanks 👍 |
I was sloppy here with reviewing as well. With two things
Improving the module while adding test we can eventually get there I believe as both things can be solved. |
Makes the function do what it's name implies. I was really missing this when there is just diff installed and working in the codebase.
Due to the ansi codes in the output, it will conflict with #21242. Depending on which one is resolved first conflicts in the other will need to be taken care of.