Opened 12 months ago
Last modified 12 months ago
#23612 new defect
Comments in the Overpass query wizard output
Reported by: | opk12 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | overpass query wizard comment | Cc: |
Description
The Overpass query wizard sometimes accepts a broken input, making a broken output with placeholder comments.
Comments are not good placeholders and the code that emits them should fail instead.
Examples:
landuse
givesnwr/*landuse*/;
(follow-up report from OSM Italy)key1=* $ key2=*
givesnwr["key1"]/*$*/["key2"];
Why emitting a comment is not OK:
- Multiple expert mappers thought
/**/
is a filter syntax.- I cannot blame a mapper enthusiast, with work and life and scarce brainpower left to remember the exact syntax.
/**/
is hardly noticed, if the query is long and complex. It does not stand out visually.- A loud comment
/*TODO FIXME landuse*/
would also not get attention in case of a typo in a simple query which would not otherwise deserve human review of the output.
- A loud comment
I'd stress that the root issue that came out in the OSM Italy discussion is not just unrecognized broken syntax, it is the general approach of emitting comments instead of failing. For the symptom, that the query builder should either reject or support a key without =*
, I'm opening a separate ticket.
I'm omitting the Status report, as this is not specific to a version / event.
Specifically, the code may throw an exception and give visual feedback, instead of printing this and generate a wrong query.