Replies: 2 comments
-
There is a But, more generally, "cersion" is a rather complex concept and just checking against a version number brings its own problems. There are always changes in software, sometimes intentional and documented, sometimes not. So in the end, you'll always run into situations where some very specific small things don't work but we didn't update the version number correctly or whatever and things break. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I wasn't aware of that Lua option. Should at least allow some basic checking in combination with the already documented version specific functionality. |
Beta Was this translation helpful? Give feedback.
-
With the continued work on extending osm2pgsql's flex processing, e.g. the addition of more advanced geometry processing:
#1636
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?
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.
I am not thinking of something really complex here requiring rocket science. Just a properly documented variable, e.g.
local minimum_version_osm2pgsql=X
that could be recognized by osm2pgsql and allow the processing to halt immediately with a user friendly error message, e.g.:
"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'."
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.
Beta Was this translation helpful? Give feedback.
All reactions