-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Bson.opEquals: order of object keys is not determined #2183
Conversation
Looks like that fail unrelated with this PR. |
Yes, Vibe.d currently doesn't compile with 2.081. A new patch release is under its way. |
Ping |
Ping @s-ludwig - are you okay with this? |
(going to merge this if there are no objections within the next 72h) |
I wonder what the correct approach here is, or whether there is one (the spec doesn't seem to be helpful). It could be argued that the order is part of the semantics. In fact, MongoDB appears to compare objects including their order. |
The spec is pretty clear on that: Implementation Defined: The built-in associative arrays do not preserve the order of the keys inserted into the array. In particular, in a foreach loop the order in which the elements are iterated is typically unspecified. https://dlang.org/spec/hash-map.html Of course, it might make sense for Bson to have a defined order, but you can't rely on built-in arrays for this. |
As releasing a new version is a bit more difficult for Vibe.d, I set the version to be tested at the project tester to master: dlang/ci#241 |
Subj. This PR is needed for druntime#2243
If it is possible, make a new tag if this will be approved, please.