<p>There's another issue with backwards compatibility: the current implementation assumes that every operations occurs from top to bottom. This way, you cannot reference objects which occur only later in the file. Although your implementation is not incorrect from a technical point of view, it allows for scenarios, which are forbidden in the current implementation. If we ever need to switch back to the current implementation, this will no longer be possible.</p>
<p>Here's an example:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<osmChange version="0.6" generator="iD">
<create>
<node id="-1" lat="1" lon="2" changeset="1251"/>
<way id="-1" changeset="1251">
<nd ref="-1"/>
<nd ref="-2"/>
</way>
<node id="-2" lat="1" lon="2" changeset="1251"/>
</create>
</osmChange>
</code></pre>
<p>Expected result:</p>
<p>HTTP 400 - Placeholder node not found for reference -2 in way -1</p>
<p>Actual result:</p>
<p>HTTP 200 OK</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<diffResult version="0.6" generator="OpenStreetMap server" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
<node old_id="-1" new_id="5003081852" new_version="1"/>
<node old_id="-2" new_id="5003081853" new_version="1"/>
<way old_id="-1" new_id="4000212054" new_version="1"/>
</diffResult>
</code></pre>
<p>Furthermore, due to the internal resorting of objects, the <code>diffResult</code> result message no longer shows the object in the exact same sequence as they occured in the <code>osmChange</code> message. I also consider this to be a breaking change which needs to be corrected.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1995#issuecomment-429906614">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLXTVXNBAGisXbvowP5HeUz35MdW-ks5ulK0ggaJpZM4WsA9n">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLSLVQGbh3zCYOS7BDphaHGozDqYTks5ulK0ggaJpZM4WsA9n.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@mmd-osm in #1995: There's another issue with backwards compatibility: the current implementation assumes that every operations occurs from top to bottom. This way, you cannot reference objects which occur only later in the file. Although your implementation is not incorrect from a technical point of view, it allows for scenarios, which are forbidden in the current implementation. If we ever need to switch back to the current implementation, this will no longer be possible.\r\n\r\nHere's an example:\r\n\r\n\r\n```\r\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\r\n\u003cosmChange version=\"0.6\" generator=\"iD\"\u003e\r\n \u003ccreate\u003e\r\n \u003cnode id=\"-1\" lat=\"1\" lon=\"2\" changeset=\"1251\"/\u003e\r\n \u003cway id=\"-1\" changeset=\"1251\"\u003e\r\n \u003cnd ref=\"-1\"/\u003e\r\n \u003cnd ref=\"-2\"/\u003e\r\n \u003c/way\u003e\r\n \u003cnode id=\"-2\" lat=\"1\" lon=\"2\" changeset=\"1251\"/\u003e\r\n \u003c/create\u003e\r\n\u003c/osmChange\u003e\r\n```\r\n\r\nExpected result:\r\n\r\nHTTP 400 - Placeholder node not found for reference -2 in way -1\r\n\r\nActual result:\r\n\r\nHTTP 200 OK\r\n\r\n```\r\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\r\n\u003cdiffResult version=\"0.6\" generator=\"OpenStreetMap server\" copyright=\"OpenStreetMap and contributors\" attribution=\"http://www.openstreetmap.org/copyright\" license=\"http://opendatacommons.org/licenses/odbl/1-0/\"\u003e\r\n \u003cnode old_id=\"-1\" new_id=\"5003081852\" new_version=\"1\"/\u003e\r\n \u003cnode old_id=\"-2\" new_id=\"5003081853\" new_version=\"1\"/\u003e\r\n \u003cway old_id=\"-1\" new_id=\"4000212054\" new_version=\"1\"/\u003e\r\n\u003c/diffResult\u003e\r\n```\r\n\r\nFurthermore, due to the internal resorting of objects, the `diffResult` result message no longer shows the object in the exact same sequence as they occured in the `osmChange` message. I also consider this to be a breaking change which needs to be corrected.\r\n"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1995#issuecomment-429906614"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/1995#issuecomment-429906614",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/1995#issuecomment-429906614",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [openstreetmap/openstreetmap-website] add bulk_upload (#1995)",
"sections": [
{
"text": "",
"activityTitle": "**mmd**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@mmd-osm",
"facts": [
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"openstreetmap/openstreetmap-website\",\n\"issueId\": 1995,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"openstreetmap/openstreetmap-website\",\n\"pullRequestId\": 1995\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/1995#issuecomment-429906614"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 380637031\n}"
}
],
"themeColor": "26292E"
}
]</script>