Difftastic: Syntax-aware structured diff tool
1–10 of 62 posts
Re: Difftastic: Syntax-aware structured diff tool
#2Much better than "guessed" syntax diff or even line diff.
Re: Difftastic: Syntax-aware structured diff tool
#3Re: Difftastic: Syntax-aware structured diff tool
#4Re: Difftastic: Syntax-aware structured diff tool
#5To ease the pain in conventional differs, we use a pre-commit hook to format the source code (prettier). This way we only see differences if something _actually_ changed.
A similar Python tool is Black: https://github.com/psf/black
> Black makes code review faster by producing the smallest diffs possible.
Re: Difftastic: Syntax-aware structured diff tool
#6The biggest problem I ran into is that the largest segment of user growth were too fickle. They wanted all kinds of magic in new optional features for their personal preferences that took incredible effort. I lacked the analytics to see who used which exotic features. Most of these people just wanted a beautifier more that a diff tool and would drop you in a heartbeat for more popular tools that wouldn’t do what they wanted but were popular.
The tool I wrote did have a strong following mostly around markup language parsing that was not at all exotic but solved problems other tools refused to approach.
My guidance is don’t become a code beautifier. In the languages I was supporting during the time frame I was supporting this code beautifiers were all the rage. Nobody seemed to want a diff tool with extra capabilities. Stick to being a diff tool. The people that are intentionally looking for intelligent diff tools tend to be more engineering focused and make for a loyal audience. People looking for code vanity are just the same as window shoppers walking down a street.
Re: Difftastic: Syntax-aware structured diff tool
#7Re: Difftastic: Syntax-aware structured diff tool
#8How can he have crashes if it's written in Rust?
Re: Difftastic: Syntax-aware structured diff tool
#9To ease the pain in conventional differs, we use a pre-commit hook to format the source code (prettier). This way we only see differences if something _actually_ changed.
And if you do make style changes, put them in a separate commit at the very least so the diffs are cleaner and code reviews are easier.
In my project I use gofmt (goimports) for back-end code and prettier for front-end; I've configured my editor to apply those on save, and a pre-commit hook to either run the formatter, or error if the formatting is not according to the spec.
One of Go's proverbs is "Gofmt's style is no one's favorite, yet gofmt is everyone's favorite.". Consistency and low noise is more important (in that case) than a specific code style preference.