Git Product home page Git Product logo

diffengine's People

Contributors

0xced avatar 304notmodified avatar actions-user avatar coenm avatar dependabot-preview[bot] avatar dependabot[bot] avatar githubpang avatar heskandari avatar jonreid avatar ldeluigi avatar oskar avatar piedone avatar poke avatar simoncropp avatar valdisthomann avatar x9void avatar ygra avatar zshazz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

diffengine's Issues

BuildServerDetector.Detected also set for tests running in Dockerfile?

Is the feature request related to a problem

I recently came across a problem where a Verify test failed in our docker build process (tests being executed as part of our Dockerfile) where it tried to start the diffengine from within the docker daemon (hope I'm using these terms correctly :-)) Setting the environment variable DiffEngine_Disabled in our test when running in docker solves the problem as explained here: https://github.com/VerifyTests/DiffEngine#buildserverdetector. However, I'm wondering if it would be a good idea to also detect if a test run is being executed as part of the docker build in a similar way as I assume is the case for for instance TeamCity, Azure Devops etc and set BuildServerDetector.Detected automatically?

Describe the solution

Not sure if this is even possible or how to go about fixing it but before trying to look for a solution I thought that I'd ask if this is something that's desirable to try to find a solution to before creating a PR for it?

This blog post https://www.hanselman.com/blog/detecting-that-a-net-core-app-is-running-in-a-docker-container-and-skippablefacts-in-xunit mentions an environment variable named DOTNET_RUNNING_IN_CONTAINER, maybe that one is still around to be used?

Describe alternatives considered

The alternative solution to this is most probably to set the DiffEngine_Disabled variable manually but if this is possible to avoid I think it would be a good idea.

Support newer KDiff path

Describe the bug

KDiff3 v1.8.2 64b installed under %ProgramFiles%\kdiff3\bin\kdiff3.exe for me (I just used the default installation options). This is not a path DiffEngine searches under, since that's %ProgramFiles%\KDiff3\kdiff3.exe (note the difference in casing and the bin folder). While the casing difference wouldn't cause any issues on NFTS, the subfolder difference does, and thus DiffEngine can't find KDiff.

I expected DiffEngine to look under the mentioned path too. Note that KDiff3 v0.9.98 64b (i.e. an older version) is actually installed under the path DiffEngine searches under.

One workaround is to add a symlink under %ProgramFiles%\KDiff3 .

I'm using DiffEngine via Shouldly.

Minimal Repro

var result = await DiffRunner.LaunchAsync(DiffTool.KDiff3, "a.txt", "b.txt");

The scan paths are also mentioned in the docs.

Submit a PR that fixes the bug

I can't build the solution since I can't install the .NET 6 SDK yet (and retargeting it doesn't seem to suffice for some reason) but I think this should be sufficient (I don't really know what could be tested on this, also given that the current KDiff3 definition is not tested): #266

I'd also suggest adding alternates that only differ in casing just to be sure.

Addional search path for WinMerge

Hi

When I install WinMerge using winget (winget install WinMerge.WinMerge) then the installation path is "C:\Users\%username%\AppData\Local\Programs\WinMerge\WinMergeU.exe" which is different than the hardcoded one. Is it possible to handle that use case?

rider diff tool not found on linux

Describe the bug

When running tests using verify from JetBrains Rider on Linux, a diff tool is selected with lower priority than Rider. I noticed the paths were changed in PR #377 because of the JetBrains Toolbox v2 update, however it looks like the path for Linux wasn't updated.

The rider.sh file is located for me in ~/.local/share/JetBrains/Toolbox/apps/rider/bin/rider.sh, but it seems to be looking at ~/.local/share/JetBrains/Toolbox/apps/Rider/*/*/bin/rider.sh, which is presumably the previous location including the version number (also note the difference in casing "rider" vs "Rider", as Linux file systems are case-sensitive).

Minimal Repro

On any Linux distro, install JetBrains Rider from the JetBrains Toolbox. Open a project in rider and run tests using Verify from it, it will not open the diff view of Rider but of a tool with lower priority. (I'm on Arch Linux, but assume it's the same for any other distro, and using the latest version of Rider 2023.2.2)

Uses for DiffEngine

Is the feature request related to a problem

Yes - As part of RazorLight, I want to figure out the best way to compare a snapshot of a Razor compiler output to the latest output. Rob D. Moore of MRCollective suggested this is called "approval testing", and that Shoudly and ApprovalTests.Net both support launching a file diff tool. DiffEngine seems like it could be useful here.

Describe the solution

Let's discuss what you're building this project for and whether it makes sense to adopt an ecosystem around DiffEngine.

Describe alternatives considered

Use ApprovalTests.Net or Shoudly.

Additional context

toddams/RazorLight#309 (comment)

Allow configuring the default click action

  • DiffEngineTray Version: 6.7.0+9fa4bef3082fd2ad6f7896f4a3f200b403bae808
  • OS: Microsoft Windows NT 10.0.19043.0

Would it be possible to configure the default click action for items in the diff engine tray? Currently it requires a lot of clicking and fine mouse work:

  • Right click the tray icon
  • Click the drop down next to the item. 9 times out of 10 (or at least if feels like it) this opens the drop down the other side of the window
  • Carefully move the mouse to the drop down, making sure to not stray off the item, otherwise the drop down will close
  • Click "Open diff tool"

image

Intermittent TypeInitializationException in the DiffEngine.ProcessCleanup class

Using DiffEngine 8.5.1 (which, by the way, doesn't have a tag on this repository) through Verify.Xunit 14.9.1 I sometimes get this exception when running tests on macOS (in Rider, but that's not relevant).

System.TypeInitializationException
The type initializer for 'DiffEngine.ProcessCleanup' threw an exception.
   at DiffEngine.ProcessCleanup.Kill(String command)
   at DiffEngine.DiffRunner.Kill(String tempFile, String targetFile) in C:\projects\diffengine\src\DiffEngine\DiffRunner_Kill.cs:line 32
   at VerifyEngine.ProcessEquals() in /_/src/Verify/Verifier/VerifyEngine.cs:line 218
   at VerifyEngine.ThrowIfRequired(String message) in /_/src/Verify/Verifier/VerifyEngine.cs:line 117
   at InnerVerifier.VerifyInner(Object target, Func`1 cleanup, IEnumerable`1 targets) in /_/src/Verify/Verifier/InnerVerifier_Inner.cs:line 30
   at InnerVerifier.Verify[T](T target) in /_/src/Verify/Verifier/InnerVerifier_Json.cs:line 65
   at VerifyXunit.Verifier.<>c__DisplayClass1_0.<<Verify>b__0>d.MoveNext() in /_/src/Verify.Xunit/Verifier.cs:line 32
--- End of stack trace from previous location ---
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<<InvokeTestMethodAsync>b__1>d.MoveNext() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 264
--- End of stack trace from previous location ---
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 48
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 90

The underlying exception is either one of those exception:

System.ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'chunkLength')
   at System.Text.StringBuilder.ToString()
   at System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendFormatted[T](T value)
   at LinuxOsxProcess.RunPs() in C:\projects\diffengine\src\DiffEngine\Process\LinuxOsxProcess.cs:line 108
   at LinuxOsxProcess.FindAll()+MoveNext() in C:\projects\diffengine\src\DiffEngine\Process\LinuxOsxProcess.cs:line 31
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at DiffEngine.ProcessCleanup.Refresh() in C:\projects\diffengine\src\DiffEngine\Process\ProcessCleanup.cs:line 37
   at DiffEngine.ProcessCleanup..cctor() in C:\projects\diffengine\src\DiffEngine\Process\ProcessCleanup.cs:line 30

or

System.Exception
Process timed out. Command line: ps -o pid,command -x.
Output:   PID COMMAND
  455 /System/Library/Frameworks/LocalAuthentication.framework/Support/coreauthd
  456 /usr/sbin/cfprefsd agent
  460 /usr/libexec/UserEventAgent (Aqua)
  462 /usr/sbin/distnoted agent
  465 /System/Library/PrivateFrameworks/CloudServices.framework/Helpers/com.apple.sbd
  466 /usr/libexec/knowledge-agent
  467 /usr/libexec/trustd --agent
  468 /usr/libexec/lsd
  469 /usr/libexec/secd
  470 /System/Library/PrivateFrameworks/CloudKitDaemon.framework/Support/cloudd
  […]

The ArgumentOutOfRangeException is baffling, is there a bug in the new String Interpolation in C# 10 and .NET 6? 🤯 Note that this execption occurs while creating the interpolated string serving as message of the System.Exception. Eventually it fails inside StringBuilder.ToString()!

Anyway, when the ArgumentOutOfRangeException does not occur, the System.Exception occurs because of ps -o pid,command -x timing out after 500 ms occurs.

500 ms is a really long time for the ps command to timeout but it occurs, I've witnessed it several times but it's unfortunately impossible to reproduce reliably. I have run a quick experiment with hyperfine and I was only able to measure ps -o pid,command -x to last 388.2 ms:

hyperfine -m 1000 'ps -o pid,command -x' 
Benchmark 1: ps -o pid,command -x
  Time (mean ± σ):      89.4 ms ±  23.1 ms    [User: 21.1 ms, System: 64.9 ms]
  Range (min … max):    64.8 ms … 388.2 ms    1000 runs

Maybe the best solution is simply to increase the timeout? But what would be a reasonable value? 1 second, more?

It's too bad the System.Diagnostics.Process did not get much love in .NET Core and that iterating over Process.GetProcesses() and accessing its StartInfo property throws System.InvalidOperationException: Process was not started by this object, so requested information cannot be determined.. Using System.Diagnostics.Process would have been a cleaner solution than having to rely on the ps command!

DiffRunner.MaxInstancesToLaunch and environment variable DiffEngine_MaxInstances are in wrong order.

First of all, I'm not sure whether this is a bug or behavior as expected but I think it's a bug.

I'm working on a repository containing the following initialization of VerifyTest:

[ModuleInitializer]
public static void Initialize()
{
  // more code here
  DiffRunner.MaxInstancesToLaunch(int.MaxValue);
  // more code here
}

and I have created an environment variable DiffEngine_MaxInstances with the value 2.

I expect at most two instances of my compare tool (in this case Beyond Compare) to open but it seems that the MaxInstancesToLaunch method precedes the environment variable value.

Possible solutions:

  • Do nothing, this is as expected
  • Math.Min(env variable DiffEngine_MaxInstances, DiffRunner.MaxInstancesToLaunch value)
  • Environment variable has precedence over DiffRunner.MaxInstancesToLaunch.
  • Introduce second environment variable which has precedence over DiffRunner.MaxInstanceToLaunch (ie, environment variable DiffEngine_ForcedMaxInstances).

Failed to scan files

  • DiffEngineTray Version: 6.5.6+8423df9a9952b9bd945a60bee8a45ea557e98d33
  • OS: Microsoft Windows NT 10.0.19042.0
  • Action: Failed to scan files
  • Exception:
System.InvalidOperationException: No process is associated with this object.
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.get_Id()
   at Tracker.KillProcess(TrackedMove move, Process process) in C:\projects\diffengine\src\DiffEngineTray\Tracker.cs:line 239
   at Tracker.<HandleScanMove>g__RemoveAndKill|8_0(KeyValuePair`2 keyValuePair) in C:\projects\diffengine\src\DiffEngineTray\Tracker.cs:line 60
   at Tracker.HandleScanMove(KeyValuePair`2 pair) in C:\projects\diffengine\src\DiffEngineTray\Tracker.cs:line 79
   at AsyncTimer.RunLoop(CancellationToken cancellation) in C:\projects\diffengine\src\DiffEngineTray\AsyncTimer.cs:line 38

Cannot run Verify.Xunit tests on Windows ARM64

Describe the bug

I have a .NET 6 Xunit test project that uses the package Verify.Xunit (version 19.10.0).

Other relevant versions:

  • Microsoft Visual Studio Enterprise 2022 (ARM 64-bit) 17.4.4
  • xunit 2.4.2
  • xunit.runner.visualstudio 2.4.5

I'm running on Windows ARM64 (under Parallels, M1 MacBook Pro).

I'm using a basic test:

[UsesVerify]
public class VerifyTests
{
    [Fact]
    public async Task TestVerify()
    {
        var result = true;
        await Verifier.Verify(result);
    }
}

It fails with the following exception:

  Message: 
System.TypeInitializationException : The type initializer for 'DiffEngine.ProcessCleanup' threw an exception.
---- System.TypeInitializationException : The type initializer for 'System.Management.ManagementPath' threw an exception.
-------- System.TypeInitializationException : The type initializer for 'System.Management.WmiNetUtilsHelper' threw an exception.
------------ System.ComponentModel.Win32Exception : Failed to load required native library 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\wminet_utils.dll'.

I cannot find information regarding the compatibility with the ARM64 architecture

Visual Studio Always Used As Diff Tool, Rider and VS Code ignored

Using version 9.0.5 of DiffEngineTray, installed via dotnet tool install -g DiffEngineTray
Problem also exists in Rider's Verify Support plugin, version 2021.3.1.
Rider version 2021.2.1

When comparing received/verified (opening the diff tool), visual studio is used as the diff tool. According to tool order documentation, I expected Rider to be used, or at least VS code.

Rider is located:
C:\Program Files\JetBrains\JetBrains Rider 2021.2.1\bin\rider64.exe
VS Code is located:
C:\Users\user_name\AppData\Local\Programs\Microsoft VS Code\code.exe

@"%ProgramFiles%\JetBrains\JetBrains Rider *\bin\rider64.exe" found in Rider.cs should have matched (assuming * is used as a wildcard
@"%LocalAppData%\Programs\Microsoft VS Code\code.exe"" found in VsCode.cs should have matched vs code.

I attempted to debug, but I never cause breakpoints in those 2 files to get hit.

After running the tests from Rider, a breakpoint in PipeServer.Handle is hit with a payload like:

{
"Type":"Move",
"Temp":"C:\\Users\\user_name\\source\\path\\to\\tests\\testclass.execute.received.txt",
"Target":"C:\\Users\\user_name\\source\\path\\to\\tests\\testclass.execute.verified.txt",
"CanKill":false,
"Exe":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\Common7\\IDE\\devenv.exe",
"Arguments":"/diff \"C:\\Users\\user_name\\source\\path\\to\\tests\\testclass.execute.received.txt\" \"C:\\Users\\user_name\\source\\path\\to\\tests\\testclass.execute.verified.txt\" \"testclass.execute.received.txt\" \"testclass.execute.verified.txt\"",
"ProcessId":60484
}

WalkingCat's diff engines

Hi @SimonCropp ,

Feel free to close this if you don't have interest. I found https://github.com/WalkingCat/ today via Twitter, and he has a ton of good diff tools:

  1. https://github.com/WalkingCat/SymDiff - Diff tool for comparing symbols in PDB files
  2. https://github.com/WalkingCat/ExpDiff - Diff tool for comparing export tables in PE images
  3. https://github.com/WalkingCat/MetaDiff - Diff tool for comparing the CLI metadata in .NET assemblies or WinMD files.
  4. https://github.com/WalkingCat/ResDiff - Diff tool for comparing Win32 resources in PE images
  5. https://github.com/WalkingCat/PriDiff - Diff tool for comparing resources in PRI (Package Resource Index) files

Is the feature request related to a problem

More features 🗡️ ❤️

Describe the solution

I am not familiar with how to implement a new DiffEngine provider.

Describe alternatives considered

Doing nothing.
Alternatively, for some of these, there may be Roslyn APIs and it may be better to write Verify snapshots for Roslyn API dumps instead.

Additional context

Failed to move 'C:\Code\VerifyTests\Verify\src\Verify.Tests\Serialization\SerializationTests.GuidScrubbingDisabledNested.DotNet6_0.received.txt' to 'C:\Code\VerifyTests\Verify\src\Verify.Tests\Serialization\SerializationTests.GuidScrubbingDisabledNested.verified.txt'.

  • DiffEngineTray Version: 10.4.3+c45744271e123666f4cec67ae72911866d72920b
  • OS: Microsoft Windows NT 10.0.19043.0
  • Action: Failed to move 'C:\Code\VerifyTests\Verify\src\Verify.Tests\Serialization\SerializationTests.GuidScrubbingDisabledNested.DotNet6_0.received.txt' to 'C:\Code\VerifyTests\Verify\src\Verify.Tests\Serialization\SerializationTests.GuidScrubbingDisabledNested.verified.txt'.
  • Exception:
System.UnauthorizedAccessException: Access to the path is denied.
   at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at FileEx.SafeMove(String temp, String target) in C:\projects\diffengine\src\DiffEngineTray\FileEx.cs:line 82

Beyond Compare 4 is not being detected

Describe the bug

Updating ApiApprover, the BeyondCompareReporter is no longer displaying beyond compare.

Discussed some on Twitter.

I am trying to repro and submit a PR.

Fails to start with FileLoadException in logs

I installed DiffEngineTry 9.1.0 with dotnet tool install -g DiffEngineTray. I try to run the tool from command line, but it does not appear. However, no error message is displayed. I found a logs folder at '.dotnet\tools.store\diffenginetray\9.1.0\diffenginetray\9.1.0\tools\net6.0\any\logs\log.txt'. In that I can see logs like:

2022-06-22 18:31:28.944 +01:00 [FTL] Failed at startup
System.IO.FileLoadException: Could not load file or assembly 'System.Windows.Forms, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'System.Windows.Forms, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at Program.Inner()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Program.Inner()
at Program.Main() in C:\projects\diffengine\src\DiffEngineTray\Program.cs:line 11

I'm using Windows 10 Pro (Version 10.0.19043 Build 19043).

Investigate whether or not reference to Microsoft.Windows.Compatibility is required for all crosscompile versions

Describe the bug

It would possibly make sense to verify whether or not the dependecy on Microsoft.Windows.Compatibility must be applied to all crosscompile versions. This is not necessairily a bug, but a potentially unnecessary dependency tree for some versions.

Minimal Repro

See shouldly/shouldly#826

Submit a PR that fixes the bug

PR will be worked on shortly - One question though: Is it ok to base it off the code for 6.4.9 so shouldly can pull the change with little worries?

DiffEngineTray 'Accept all' changes all line endings from CRLF to LF

Windows 11 Pro
Visual Studio Enterprise 2022 (17.6.5)
DiffEngineTray 12.0.0

I ran my test (MSTest) and when I accept the change manually line endings stay constant but if I click the accept all button in DiffEnfineTray it changes all the line endings of the doc.verified.txt from CRLF to LF.

I'd prefer it just detects line endings for me or jsut uses CRLF automatically because it should know I'm on a Windows OS but another option would be to add a line ending option to the DiffEnfineTray settings.

In the past this never mattered to me because I always ignored whitespace when comparing files but recently I submitted a PR to a to someone else's repo and they rejected it due to me changing spaces to tabs inadvertently so now I've been leaving it on. That's how I just noticed this now.

DiffEngine does not display as a dotnet tool in NuGet

The DiffEngine tool in NuGet is not listed as a dotnet tool in NuGet.
This means that it does not display the proper install commands, which I often use to copy/paste when installing or updating to the latest version. (Currently the .NET CLI tab shows dotnet add package DiffEngine --version 8.2.0.)

It should show a .NET CLI Global and Local tabs like this.

I believe that this can be remedied by adding the following to the .csproj file:

<PackAsTool>true</PackAsTool>

DiffTools.TryFind method is confusing

The DiffTools.TryFind is a bit confusing.

Is the feature request related to a problem

Spot the issue:

// Add if not already there
if (!DiffTools.TryFind(name, out _))
{
    DiffTools.AddTool(name, ... );
}

The issue is here that:

  • There is a overload of TryFind that searches by name: public static bool TryFind(DiffTool tool, out ResolvedTool? resolvedTool), while the other (with string parameter), searches by extension: public static bool TryFind(string extension, out ResolvedTool? tool)
  • I expected that the TryFind method is consistent with the AddTool, where name is the first argument.

Describe the solution

There are multiple solutions, those could be technical or semantic breaking. See the "or"s below ;)

  • Add TryFindByExtension(string extension, ...)
  • Rename TryFind(DiffTool tool, ...) to TryFindByName(DiffTool tool, ...)
  • Add TryFindByName(string name, ...)
  • Make TryFind(string extension, ...) obsolete (breaking change!)
  • Make TryFind(DiffTool tool, ...) obsolete (breaking change!)

Describe alternatives considered

  • Instead of TryFind rename to TryFindTool etc for consistency with AddTool
  • No obsolete but hard breaking change

Additional context

Current work around (ugly, need Equals? Needs dictionary lookup?):

// Add if not already there
if (!DiffTools.Resolved.Any(c => c.Name == name))
{
    DiffTools.AddTool(name, ... );
}

Allow to set custom installation paths for supported diff tools

Is the feature request related to a problem

I have a custom installation folder for both VS Code and Visual studio. The search paths for these diff tools don't match with the ones hard-coded inside DiffEngine.

Describe the solution

One should be able to set a custom path for diff tools, for example with the help of environment variables.
For example: DiffEngine_<DiffToolName>_Path = D:\My\Folder\

Describe alternatives considered

As alternative, consider reading a configuration file in the home directory of the user or in the project folder.

Additional context

If necessary ask me.

P4Merge doesn't work for the binary extensions using the current command line arguments.

When running a verification using

await Verifier.Verify(result).UseExtension("png");

With P4Merge installed, the following error is displayed:

Image files cannot be merged

The P4Merge Implementation takes four command line arguments which works correctly for text based merge operations but for binaries/images only two file paths can be passed in it seems. Additionally there doesn't currently seem to be a way to actually merge the received into the verified...

Wondering if the binary image extensions should be disabled in P4merge?

P4merge Version: r21.3

ExeName for BeyondCompare on linux should be `bcompare` not `bcomp`

Describe the bug

The command for Beyond Compare on Linux is bcompare not bcomp as currently defined:

This can be verified via the following documentation which shows bcompare as being available on Linux and Mac but bcomp only on Mac: https://www.scootersoftware.com/v4help/command_line_reference.html

Simple validation on Debian with a fresh install of BeyondCompare from https://www.scootersoftware.com/files/bcompare-4.4.7.28397_amd64.deb

$ which bcomp
bcomp not found
                                                                                                                                                           1 
$ which bcompare
/usr/bin/bcompare

Minimal Repro

internal sealed class DiffToolsTests
{
    [TestCase(DiffTool.BeyondCompare)]
    [Explicit("Requires tools to be installed")]
    public void DiffTools_Resolved(DiffTool tool)
    {
        // Arrange
        // Act
        ResolvedTool[] tools = DiffTools.Resolved.ToArray();

        // Assert
        Assert.That(tools, Is.Not.Empty);
    }
}
  • Compared to:
    [Test]
    [Explicit("Requires tools to be installed")]
    public void DiffTools_AddTool_BeyondCompare()
    {
        // Arrange
        LaunchArguments launchArguments = new(
            Left: (temp, target) => $"--diff \"{target}\" \"{temp}\"",
            Right: (temp, target) => $"--diff \"{temp}\" \"{target}\"");
        OsSupport osSupport = new(
            Windows: null,
            Linux: new OsSettings(
                "bcompare",
                launchArguments
            ),
            Osx: null);
        DiffTools.AddTool(
            name: "BeyondCompareLinux",
            autoRefresh: true,
            isMdi: true,
            supportsText: true,
            requiresTarget: true,
            osSupport: osSupport,
            binaryExtensions: Array.Empty<string>());

        // Act
        ResolvedTool[] tools = DiffTools.Resolved.ToArray();
        string[] toolNames = tools.Select(x => x.Name).ToArray();

        // Assert
        Assert.That(toolNames, Does.Contain("BeyondCompareLinux"));
    }

Submit a PR that fixes the bug

Submit a Pull Request (PR) that fixes the bug. Include in this PR a test that verifies the fix. If you were not able to fix the bug, a PR that illustrates your partial progress will suffice.

Failed to kill process. Command: C:\Program Files\Beyond Compare 4\BCompare.exe /solo /leftreadonly "C:\Code\Replicant\src\Tests\../MatrixResults\Status_NotModified_cache=public,max-age=86400_exp=null_mod=null_mod=tag_useStale=True.received.txt" "C:\Code\Replicant\src\Tests\../MatrixResults\Status_NotModified_cache=public,max-age=86400_exp=null_mod=null_mod=tag_useStale=True.verified.txt"

  • DiffEngineTray Version: 6.5.7+28a5e68674f0a855bad0beb587c61058a62f978f
  • OS: Microsoft Windows NT 10.0.19042.0
  • Action: Failed to kill process. Command: C:\Program Files\Beyond Compare 4\BCompare.exe /solo /leftreadonly "C:\Code\Replicant\src\Tests../MatrixResults\Status_NotModified_cache=public,max-age=86400_exp=null_mod=null_mod=tag_useStale=True.received.txt" "C:\Code\Replicant\src\Tests../MatrixResults\Status_NotModified_cache=public,max-age=86400_exp=null_mod=null_mod=tag_useStale=True.verified.txt"
  • Exception:
System.InvalidOperationException: No process is associated with this object.
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.Kill()
   at Tracker.KillProcess(TrackedMove move, Process process) in C:\projects\diffengine\src\DiffEngineTray\Tracker.cs:line 229

DiffEngine.ProcessCleanup throws System.TypeInitializationException when running failing ApprovalTests

No problem prior to latest Windows update.
Using Visual Studio 2022
Approvaltests 5.7.3

Windows version now running:
Versjon Windows 10 Pro
Versjon 21H2
Installert den ‎12.‎03.‎2021
Operativsystembygg 19044.2130
Opplevelse Windows Feature Experience Pack 120.2212.4180.0

Error log from test:
Message: 

System.TypeInitializationException : Typeinitialiseringen for DiffEngine.ProcessCleanup forårsaket et unntak.
----> System.Management.ManagementException : Invalid class

Stack Trace: 

ProcessCleanup.TryGetProcessInfo(String command, ProcessCommand& process)
DiffRunner.InnerLaunch(TryResolveTool tryResolveTool, String tempFile, String targetFile) line 108
DiffRunner.Launch(String tempFile, String targetFile) line 43
DiffReporter.Report(String approved, String received) line 14
FileApprover.ReportFailure(IApprovalFailureReporter reporter) line 65
Approver.Verify(IApprovalApprover approver, IApprovalFailureReporter reporter) line 13
Approvals.Verify(IApprovalApprover approver, IApprovalFailureReporter reporter) line 71
Approvals.Verify(IApprovalWriter writer, IApprovalNamer namer, IApprovalFailureReporter reporter) line 52
Approvals.Verify(IApprovalWriter writer) line 124
Approvals.VerifyWithExtension(String text, String fileExtensionWithDot, Func2 scrubber) line 189 Approvals.Verify(String text, Func2 scrubber) line 176
ApprovalTests1.CreatedIntrumAssignmentsIsCorrect() line 85
--ManagementException
ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
ManagementObjectEnumerator.MoveNext()
d__3.MoveNext() line 38
List1.ctor(IEnumerable1 collection)
Enumerable.ToList[TSource](IEnumerable`1 source)
ProcessCleanup.Refresh() line 36
ProcessCleanup.cctor() line 30

Failed to receive payload

  • DiffEngineTray Version: 11.0.0+ba6a889a1ea9f164689d0eaa92a9820fd0947366
  • OS: Microsoft Windows NT 10.0.19045.0
  • Action: Failed to receive payload
  • Exception:
System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.IO.StreamReader.ReadBufferAsync(CancellationToken cancellationToken)
   at System.IO.StreamReader.ReadToEndAsyncInternal(CancellationToken cancellationToken)
   at PiperServer.Handle(TcpListener listener, Action`1 move, Action`1 delete, CancellationToken cancellation) in C:\projects\diffengine\src\DiffEngineTray\PiperServer.cs:line 61
   at PiperServer.Handle(TcpListener listener, Action`1 move, Action`1 delete, CancellationToken cancellation) in C:\projects\diffengine\src\DiffEngineTray\PiperServer.cs:line 85
   at PiperServer.Start(Action`1 move, Action`1 delete, CancellationToken cancellation) in C:\projects\diffengine\src\DiffEngineTray\PiperServer.cs:line 27

Failed to kill process. Command: C:\Program Files\Beyond Compare 4\BCompare.exe /solo /leftreadonly "C:\Code\Replicant\src\Tests\../MatrixResults\Status_NotModified_cache=no-cache_exp=null_mod=null_mod=null_useStale=True.received.txt" "C:\Code\Replicant\src\Tests\../MatrixResults\Status_NotModified_cache=no-cache_exp=null_mod=null_mod=null_useStale=True.verified.txt"

  • DiffEngineTray Version: 6.5.7+28a5e68674f0a855bad0beb587c61058a62f978f
  • OS: Microsoft Windows NT 10.0.19042.0
  • Action: Failed to kill process. Command: C:\Program Files\Beyond Compare 4\BCompare.exe /solo /leftreadonly "C:\Code\Replicant\src\Tests../MatrixResults\Status_NotModified_cache=no-cache_exp=null_mod=null_mod=null_useStale=True.received.txt" "C:\Code\Replicant\src\Tests../MatrixResults\Status_NotModified_cache=no-cache_exp=null_mod=null_mod=null_useStale=True.verified.txt"
  • Exception:
System.InvalidOperationException: No process is associated with this object.
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.Kill()
   at Tracker.KillProcess(TrackedMove move, Process process) in C:\projects\diffengine\src\DiffEngineTray\Tracker.cs:line 229

Include optional environment variables for tool installer paths

Is the feature request related to a problem

Yes, many of my diff tools are installed in their non-standard location and cannot be located

Describe the solution

In the list of paths to check for each diff tool, include one that is parsed from an environment variable
e.g. vscode's last search path could be something like System.Environment.GetEnvironmentVariable("VERIFY_DIFFENGINE_VSCODE_PATH") ?? string.Empty

Describe alternatives considered

I could add a new diff tool based on an existing, however I want this to be generic enough that anyone running the Verify test suite can.

Additional context

If you think this is a viable option I would be happen to submit a PR for it.

Clicking 'Update' in options kills app, doesn't relaunch

Describe the bug

Version: 6.0.0

Clicking the Update button in the Options menu kills the application and doesn't relaunch it again.

image

I would expect the application to launch again after applying (or attempting to apply) the update.

Minimal Repro

  1. Open the Options menu
  2. Click Update

The process cannot access the file because it is being used by another process

  • DiffEngineTray Version: 6.5.7+28a5e68674f0a855bad0beb587c61058a62f978f

  • OS: Microsoft Windows NT 10.0.14393.0

  • Exception:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: The process cannot access the file because it is being used by another process.
   at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at Tracker.InnerMove(TrackedMove move) in C:\projects\diffengine\src\DiffEngineTray\Tracker.cs:line 205
   at Tracker.AcceptAllMoves() in C:\projects\diffengine\src\DiffEngineTray\Tracker.cs:line 295
   at Tracker.AcceptAll() in C:\projects\diffengine\src\DiffEngineTray\Tracker.cs:line 278
   at MenuButton.<>c__DisplayClass0_0.<.ctor>b__0(Object <p0>, EventArgs <p1>) in C:\projects\diffengine\src\DiffEngineTray\Controls\MenuButton.cs:line 13
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
System.Private.CoreLib
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Private.CoreLib.dll
----------------------------------------
DiffEngineTray
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0
    CodeBase: file:///C:/Users/ascropp/.dotnet/tools/.store/diffenginetray/6.5.7/diffenginetray/6.5.7/tools/net5.0/any/DiffEngineTray.dll
----------------------------------------
System.Runtime
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Runtime.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 5.0.3.0
    Win32 Version: 5.0.321.7302
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.3/System.Windows.Forms.dll
----------------------------------------
System.Threading
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Threading.dll
----------------------------------------
System.Windows.Forms.Primitives
    Assembly Version: 5.0.3.0
    Win32 Version: 5.0.321.7302
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.3/System.Windows.Forms.Primitives.dll
----------------------------------------
System.ComponentModel.Primitives
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.ComponentModel.Primitives.dll
----------------------------------------
System.Runtime.InteropServices
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Runtime.InteropServices.dll
----------------------------------------
System.Drawing.Primitives
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Drawing.Primitives.dll
----------------------------------------
System.Collections.Specialized
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Collections.Specialized.dll
----------------------------------------
System.Drawing.Common
    Assembly Version: 5.0.0.1
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.3/System.Drawing.Common.dll
----------------------------------------
Serilog
    Assembly Version: 2.0.0.0
    Win32 Version: 2.10.0.0
    CodeBase: file:///C:/Users/ascropp/.dotnet/tools/.store/diffenginetray/6.5.7/diffenginetray/6.5.7/tools/net5.0/any/Serilog.dll
----------------------------------------
netstandard
    Assembly Version: 2.1.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/netstandard.dll
----------------------------------------
System.IO.FileSystem
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.IO.FileSystem.dll
----------------------------------------
Serilog.Sinks.File
    Assembly Version: 2.0.0.0
    Win32 Version: 4.1.0.0
    CodeBase: file:///C:/Users/ascropp/.dotnet/tools/.store/diffenginetray/6.5.7/diffenginetray/6.5.7/tools/net5.0/any/Serilog.Sinks.File.dll
----------------------------------------
System.Text.Encoding
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Text.Encoding.dll
----------------------------------------
System.Collections
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Collections.dll
----------------------------------------
System.Memory
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Memory.dll
----------------------------------------
System.Linq
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Linq.dll
----------------------------------------
System.Runtime.Extensions
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Runtime.Extensions.dll
----------------------------------------
System.Text.RegularExpressions
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Text.RegularExpressions.dll
----------------------------------------
System.Reflection.Emit.ILGeneration
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Reflection.Emit.ILGeneration.dll
----------------------------------------
System.Reflection.Emit.Lightweight
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Reflection.Emit.Lightweight.dll
----------------------------------------
System.Reflection.Primitives
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Reflection.Primitives.dll
----------------------------------------
System.Private.Uri
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Private.Uri.dll
----------------------------------------
System.Text.Json
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Text.Json.dll
----------------------------------------
System.Collections.Concurrent
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Collections.Concurrent.dll
----------------------------------------
System.Text.Encodings.Web
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Text.Encodings.Web.dll
----------------------------------------
System.Runtime.Intrinsics
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Runtime.Intrinsics.dll
----------------------------------------
System.Numerics.Vectors
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Numerics.Vectors.dll
----------------------------------------
System.Runtime.CompilerServices.Unsafe
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Runtime.CompilerServices.Unsafe.dll
----------------------------------------
System.Text.Encoding.Extensions
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Text.Encoding.Extensions.dll
----------------------------------------
System.Diagnostics.TraceSource
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Diagnostics.TraceSource.dll
----------------------------------------
Microsoft.Win32.Primitives
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/Microsoft.Win32.Primitives.dll
----------------------------------------
System.Buffers
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Buffers.dll
----------------------------------------
System.Net.Sockets
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Net.Sockets.dll
----------------------------------------
System.Net.Primitives
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Net.Primitives.dll
----------------------------------------
System.Diagnostics.Tracing
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Diagnostics.Tracing.dll
----------------------------------------
System.Net.NameResolution
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Net.NameResolution.dll
----------------------------------------
System.Threading.Overlapped
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Threading.Overlapped.dll
----------------------------------------
System.ComponentModel.TypeConverter
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.ComponentModel.TypeConverter.dll
----------------------------------------
Microsoft.Win32.SystemEvents
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.20.51904
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.3/Microsoft.Win32.SystemEvents.dll
----------------------------------------
System.Threading.Thread
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Threading.Thread.dll
----------------------------------------
System.ComponentModel.EventBasedAsync
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.ComponentModel.EventBasedAsync.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 5.0.321.7302
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.3/Accessibility.dll
----------------------------------------
System.ComponentModel
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.ComponentModel.dll
----------------------------------------
System.Threading.ThreadPool
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Threading.ThreadPool.dll
----------------------------------------
System.Diagnostics.Process
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Diagnostics.Process.dll
----------------------------------------
System.Globalization
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Globalization.dll
----------------------------------------
System.IO
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.IO.dll
----------------------------------------
System.IO.FileSystem.Primitives
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.IO.FileSystem.Primitives.dll
----------------------------------------
System.Diagnostics.StackTrace
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Diagnostics.StackTrace.dll
----------------------------------------
System.Reflection.Metadata
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Reflection.Metadata.dll
----------------------------------------
System.Collections.Immutable
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.Collections.Immutable.dll
----------------------------------------
System.IO.MemoryMappedFiles
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.IO.MemoryMappedFiles.dll
----------------------------------------
System.IO.Compression
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.321.7212
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.3/System.IO.Compression.dll
----------------------------------------

************** JIT Debugging **************



Rider version selection on macOS

Describe the bug

When running unit tests that utilise Verify under an EAP Rider version on macOS, when there is another version available results in inconsistent version selection. My hope is that when I run the tests, the current instance of Rider will be used to shell out the diff to (this is an unreasonable request), however it seems that the Rider selection is sorted by last write timestamp, which on my machine is constant flipping between the EAP and non-EAP instances. I can run two test runs, and have it pick a different version both times, seconds after the previous.

I suspect I can customize the tool selection somehow, but I would expect Verify to first resolve rider from my PATH and use that first, as that is what I personally use to indicate my main instance that I'm using day-to-day.

Minimal Repro

Install an EAP & non-EAP version of Rider, and run a test suite with differing contents. For me it happens quite inconstantly, I haven't figured out exactly when the timestamps are getting updated.

DiffEngine opens diffs in the wrong IDE instance

If I have multiple instances of Visual Studio open and my Verify test fails, the diff seems to always open in the first instance of Visual Studio.

Steps to recreate the issue

  • Open an instance of VS with a any non-target project
  • Open a second instance of Visual Studio that will contain the actual Verify tests
  • Run a failing Verify test in the second instance.
    • 💥The fail diff will open in the first (wrong) instance of Visual Studio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.