You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I actually am in need of this functionality which is why I forked the project! What direction were you thinking of going to support this?
For my use case, it would be cool if both log trees were shown with filters. Filters could maybe behave similar to diffing two folders in Araxis (All, Diff). When diff is selected, only the msbuild targets that differed are shown in each tree, and when the node is selected/double clicked a standard diff window is shown with green for additions and red for missing on each side (not sure if a new window is best, or if using the standard tabbed details view is good - I really like that one, but screen real-estate could be a problem).
Yeah, it's tricky to get right, I didn't think about it yet.
For now you have two quick workarounds: use the Save as XML feature to get two .xml files for logs, and diff those using your favorite XML diffing tool (some of them are really good).
Or you can right-click on any node and say Copy subtree, which will copy the text contents of the subtree to clipboard. You can diff those as well.
As for my plan, I was thinking of a new menu items - "Diff 2 .binlogs", where you select two .binlog files and it opens a single merged tree, where nodes are as follows:
node that exactly matches in both (including children) is semi-transparent with Opacity 30% (so it's easy to ignore things that haven't changed)
node that matches but has differences underneath is normal
node that is only on the left is red
node that is only on the right is green
I would also add heuristics to ignore non-important changes. For instance, for all nodes where the order of children doesn't matter, children will be sorted before diffing.
I'm waiting for Visual Studio 16.6 to ship. MSBuild there has a really important new feature that allows to parent a project under the MSBuild task that started it. This will greatly improve the diffing experience. After that is available I'll start on the feature.
It is already in MSBuild master and will be available in Visual Studio 16.6. I believe it is already available if you install a Preview of VisualStudio 16.6.
I would absolutely love this feature for comparing changes between two builds. In particular, the ability to compare specific targets with path normalization (if I built the project in one repo and then built it in another repo on a different commit).
Yes I’m using ListDiff for comparing flat sequences and it’s great. However the complication is elsewhere when diffing binlogs - we need to unify to remove a lot of noise to highlight the signal.
Activity
BihtSift commentedon Apr 4, 2018
I actually am in need of this functionality which is why I forked the project! What direction were you thinking of going to support this?
For my use case, it would be cool if both log trees were shown with filters. Filters could maybe behave similar to diffing two folders in Araxis (All, Diff). When diff is selected, only the msbuild targets that differed are shown in each tree, and when the node is selected/double clicked a standard diff window is shown with green for additions and red for missing on each side (not sure if a new window is best, or if using the standard tabbed details view is good - I really like that one, but screen real-estate could be a problem).
I'm happy to help in any way I can :)
KirillOsenkov commentedon Apr 4, 2018
Yeah, it's tricky to get right, I didn't think about it yet.
For now you have two quick workarounds: use the Save as XML feature to get two .xml files for logs, and diff those using your favorite XML diffing tool (some of them are really good).
Or you can right-click on any node and say Copy subtree, which will copy the text contents of the subtree to clipboard. You can diff those as well.
As for my plan, I was thinking of a new menu items - "Diff 2 .binlogs", where you select two .binlog files and it opens a single merged tree, where nodes are as follows:
I would also add heuristics to ignore non-important changes. For instance, for all nodes where the order of children doesn't matter, children will be sorted before diffing.
nvmkpk commentedon Apr 4, 2020
That will be a good start. I hope you are working on it already but I can help with it if you need any.
KirillOsenkov commentedon Apr 4, 2020
I'm waiting for Visual Studio 16.6 to ship. MSBuild there has a really important new feature that allows to parent a project under the MSBuild task that started it. This will greatly improve the diffing experience. After that is available I'll start on the feature.
nvmkpk commentedon Apr 14, 2020
That is good to know. I was wondering why it is not already doing that. Do you have a link I can check the status if that change?
KirillOsenkov commentedon Apr 14, 2020
It is already in MSBuild master and will be available in Visual Studio 16.6. I believe it is already available if you install a Preview of VisualStudio 16.6.
KirillOsenkov commentedon Apr 14, 2020
Here's the PR where this was fixed: dotnet/msbuild#5013
KirillOsenkov commentedon Jul 10, 2020
One can use this to diff two lists: https://github.com/praeclarum/ListDiff
KirillOsenkov commentedon Jul 10, 2020
Unfortunately there's still this bug that would make diffs a bit complicated:
dotnet/msbuild#5473
forrestcoward commentedon Nov 26, 2020
I would absolutely love this feature for comparing changes between two builds. In particular, the ability to compare specific targets with path normalization (if I built the project in one repo and then built it in another repo on a different commit).
mcopeland-clgx commentedon May 11, 2022
@KirillOsenkov Did you ever try this to get a diff and did it work? https://github.com/praeclarum/ListDiff
KirillOsenkov commentedon May 11, 2022
Yes I’m using ListDiff for comparing flat sequences and it’s great. However the complication is elsewhere when diffing binlogs - we need to unify to remove a lot of noise to highlight the signal.
KirillOsenkov commentedon Dec 15, 2022
I've noticed there's some in-progress prototype work in the branches of this fork:
https://github.com/pchaurasia14/MSBuildStructuredLog/branches
KirillOsenkov commentedon Dec 28, 2022
Also here's a helper I have for diffing sorted sequences in O(n) time and no memory:
https://gist.github.com/KirillOsenkov/72dc4b0b0a864c461b8c54dee61846d5
Jeremy-Price commentedon Sep 20, 2024
It would also be nice to be able to diff two subtrees in the same binlog, e.g., when a project is built twice.
KirillOsenkov commentedon Sep 20, 2024
you can right-click any node, either Copy Children or Copy Subtree and then diff two texts, as a workaround
I do understand this is suboptimal
YuliiaKovalova commentedon Nov 17, 2024
@KirillOsenkov, do you still consider it as a valuable piece of work?
I find myself more often struggling without this feature :)
KirillOsenkov commentedon Nov 17, 2024
yes it is much needed but also super hard, I've been mustering courage for it