Replies: 2 comments 5 replies
-
|
Can't say I have ever seen this behavior but I have only run it on one OS 🤔 I guess the order is an undefined result because of the unordered dictionary as you said, although the result in memory should be deterministic as there is not randomization in there but could explain the different order on different OS (and why it's always the same on the same OS). |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Actually it turns out I misidentified the issue. It's not running on different OS's, it's running from MSBuild or dotnet that causes the issue. I though I had eliminated that, but apparently I made a mistake when verifying. Anyway... It's not where it's built, it's how it's built. A repo where this occurs is: https://github.com/xecrets/xecrets-slip39 . If you cd down to the 'src' directory where the solution file is, you can build the project from a Visual Studio Developer command prompt like so:
This will leave everything in source control unmodified. However, if you build it with dotnet instead, like this:
or even
The file From what I gather, the only obvious difference is how MSBuild is used and launched. In the first case, it's the MSBuild.exe that comes with Visual Studio, in the second case it's integrated into (The reason I misidentified it as a platform issue is because on Windows I use Visual Studio / MSBuild, on macOS and Linux I use VS Code / dotnet. I thought I had eliminated that, but as mentioned, I made a mistake. So it's as above.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
(Edit: See comments below, the actual difference is when building with MSBuild vs. dotnet build)
I have an annoying situation where builds on macOS and Windows produce slightly different output, causing source control to consider it a change... Both versions are "correct", but it's very annoying to have to revert changes all the time.
I have not completely analyzed it, but the differene is that some items are written in a different order on Windows and macOS respectively.
After a brief glance at the source code, a possible culprit could be the enumeration of the 'DocItems' dictionary. The order of the keys in the dictionary is unspecified, so it could certainly differ between platforms.
Has this behavior been noticed before? Does it seem like a reasonable cause for the divergence of the results?
Notably, the difference only occurs in one file, with one block of items moved on macOS compared to building on Windows. All other documentation generated appears stable across platoform builds. But I have a hard time finding other likely causes.
Comments or ideas from the community or the maintainer?
Beta Was this translation helpful? Give feedback.
All reactions