3 ms·
Before we can get a vcs that understand semantic diffs, we need a way to communicate semantic diffs. That way each file type can have its own “semantic differ”
by superb_dev 3y ago
Before we can get a vcs that understand semantic diffs, we need a way to communicate semantic diffs. That way each file type can have its own “semantic differ”. Similar to how language servers help abstract away the differences for IDEs
- AeroNotix 3y agoY'all know you can change the diff viewer git uses, right?
- dreamcompiler 3y agoOf course. But the diffs are still line-oriented.
- stop50 3y agoYou already can change that. Git-lfs already uses this mechanism
- nemetroid 3y agoNo, they’re not.
- chlorion 3y agoThe diffs don't have to be line-oriented if you are using a diffing tool that isn't based on line changes. Git itself just stores snapshots of your files, then you can bring your own diffing tool that works in any way you'd like, it's not limited to line based diffing.
- devjab 3y agoYou can set a lot of that up with the shared config in the .vscode folder, and then enforce it with whatever rule set you chose and however you chose. We do it with auto-save and the prettier engine for Typescript, the C# engine for C#, the standard VSC engine for C++, whatever the Rust plug in for Rust is called for Rust and so on. Technically it’s a little more free to be done differently by different developers because it’s rather easy to not use our “standards” if you so chose, but if you don’t follow our defined syntax for languages it’ll likely not pass through our CI/CD pipeline, or in a few cases (like indents, line-ends) simply get altered to the standard. I do agree with your point about different IDEs, but I think VSC is actually one of the better tools for helping development teams unify the way they code. Then again, all our developers use VSC, except for that one guy who is stuck in regular VS and often has a ton of swearing because of it. Which is pretty much the legacy experience of regular VS from having used it for 10 years myself. It still amazes me just how slow it becomes with certain plugins, and how bloaty the various templates are. But hey, he’s happy/angry with it sooo. I guess the story becomes a little different if you work with PHP or Java or similar, where VSC is arguably much worse than its competition, but you’ll likely still have some developers who prefer it because they also work with other languages. Or in Python heavy environments where there are also a lot of great IDEs for the more ML/AI/BI side of things.