<p></p>
<p dir="auto">With the continued work on extending osm2pgsql's flex processing, e.g. the addition of more advanced geometry processing:</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1124350184" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/osm2pgsql/issues/1636" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/osm2pgsql/pull/1636/hovercard" href="https://github.com/openstreetmap/osm2pgsql/pull/1636">#1636</a></p>
<p dir="auto">this raises a question for me if there shouldn't be some way to specify in an osm2pgsql Lua flex style fila a "minimum version" of osm2pgsql required to run this Lua file?</p>
<p dir="auto">With different versions of osm2pgsql out there that now have quite distinct capabilities, it becomes increasingly difficult to ascertain if a specific Lua style file is compatible with the osm2pgsql version present on a system.</p>
<p dir="auto">I am not thinking of something really complex here requiring rocket science. Just a properly documented variable, e.g.</p>
<p dir="auto"><strong>local minimum_version_osm2pgsql=X</strong></p>
<p dir="auto">that could be recognized by osm2pgsql and allow the processing to halt immediately with a user friendly error message, e.g.:</p>
<p dir="auto"><strong>"osm2pgsql has detected that the selected Lua flex style 'X' requires a minimum version of osm2pgsql 'Y' to run, while your system has version 'Z'."</strong></p>
<p dir="auto">Of course, the onus would be fully on the developer of the style to set the appropriate version, it is not the responsibility of osm2pgsql to fail gracefully if it is set wrong, but it could fail gracefully if it is set appropriately. The style developer also most likely tested his/her work, so he/she should really have no trouble setting the value.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/discussions/1638">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353VSJNCEVPWCZ6ORA4LUZQDVDANCNFSM5NSLQCUQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353UYOZP5AAAZMV6KOBTUZQDVDA5CNFSM5NSLQCU2YY3PNVWWK3TUL52HS4DFVJCGS43DOVZXG2LPN2VGG33NNVSW45C7NFSM4AB22OWA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/osm2pgsql/repo-discussions/1638</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/discussions/1638",
"url": "https://github.com/openstreetmap/osm2pgsql/discussions/1638",
"name": "View Discussion"
},
"description": "View this Discussion on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>