Supporting PHP was required by many of our users. Today we wanted to let you know that we have upgraded SemanticMerge's core diffing and merging machine to parse and understand PHP. It will now be able to detect changes at the code line distribution but also within specific PHP methods and classes, for example.
I was invited to chat with the Cpp Cast crew, Rob Irving and Jason Turner – the best podcast on C++ development out on the interwebs. They wanted to know more about SemanticMerge, how it parses and merges C++ code and what this means for everyday programming in C++.
This is a short summary of our conversation on these and many other C++ topics such as the upcoming SD20 C++ teaching group or Alexander Boden's Cross-Platform framework.
Here is the scenario: you have a source file with a class and some methods, and then you think it is a good idea to do some cleanup. You know, sort the methods in visibility order (public first) maybe create a subclass to wrap some functionality together, or place methods close to each other depending on how they are called, just to improve readability.
But, someone was doing changes to the same file concurrently (you know, it happens) and then he is less than happy to merge his fixes together with your cleanup...
So, here is the deal: shouldn't we try to keep the code as clean as possible? Yes, of course, sticking to whatever common style rules the team agreed to stick to. But then, in real life, isn't it a merge killer?
This blogpost shows how SemanticMerge helps to solve this case, when integrated with Git. For those of you who didn't know, SemanticMerge parses the code before calculating any merges. Unlike other 3-way merge tools, it is not just based on text. It can parse Java code, C#/VB.net code (Roslyn based) and C. There are also external community written parsers for Delphi and JavaScript.
This is just a minor release after the changes released in 1.0.64 and solves a few customer requests.
There are 3 new tasks being merged in 1.0.65 which are:
We switched to the latest open-source Roslyn in the previous release and now we’re adding more features based on that.
This new release includes 2 major features:
- Automatic method body merge resolution with the
--merge-decl
param: so far if a method (or any declaration body) was modified by the two contributors, the user had to manually launch the external 3-way merge tool to solve the conflicts, even when the merge was automatic. Now the new param forces Semantic to try to solve every method body so now the merge is as automatic as possible. - Skip code formatting conflicts: suppose two developer reformat the same method but only one of them introduces an actual change. It can be time consuming to figure out that the change was only a reformat and that nothing really changes before accepting the real change. This is exactly what the new feature does for C#. It solves 3 User Voice requests:
- http://plasticscm.uservoice.com/forums/196398--mergebegins/suggestions/3986679-semantic-merge-needs-to-be-smarted-about-unimporta
- http://plasticscm.uservoice.com/forums/196398--mergebegins/suggestions/4124571-ignore-whitespace-around-curly-braces
- http://plasticscm.uservoice.com/forums/196398--mergebegins/suggestions/4416982-format-code-to-every-user-s-liking-and-end-the-end
We have just released a new version of SemanticMerge, full of interesting improvements.
The two main ones are:
- Semantic is now based in the newest Roslyn (the new open sourced version Microsoft just released) which means: Semantic now supports C# 5! :-) Also, Semantic now requires .NET 4.5 to run on Windows. The added C# 5 support closes one of the top UserVoice requests.
- Now Semantic is able to skip differences where only EOLs and indentation changed. Look at the following example:
Ever thought about writing a Mac GUI in C#?
You’re probably used to Buttons, Panels, Dialogs and the like, but how do they map to the Mac counterparts?
Well, this is what we try to cover in this post: a Cocoa 101 for WinForms developers.
Popular Posts
- GUI development: should you design it or code it - Dissecting SemanticMerge, Part 3
- Dissecting SemanticMerge, Part 4: Cocoa 101 for WinForms/WPF developers
- Dissecting SemanticMerge, Part 1: how we develop for Mac using C# and MonoMac
- Skip format conflicts with the new SemanticMerge 1.0.64
- Solving semantic conflicts with Git and SemanticMerge
- What most developers don't know about refactoring
- Dissecting SemanticMerge, Part 2: Enter MonoMac
- SemanticMerge for Mac is here
- New SemanticMerge 1.0.61 is out
- Cpp Cast interviews SemanticMerge team