Description
In the current (2nd March 2020) alternatives report: https://raw.githubusercontent.com/elastic/built-docs/master/raw/en/elasticsearch/reference/master/alternatives_report.json
It shows that there are two examples attributed to the same line number 30:
{"source_location":{"file":"setup/restart-cluster.asciidoc","line":30},"digest":"1cd3b9d65576a9212eef898eb3105758","lang":"console","found":["ruby"],"source":"PUT _cluster/settings\n{\n \"persistent\": {\n \"cluster.routing.allocation.enable\": \"primaries\"\n }\n}"},
{"source_location":{"file":"setup/restart-cluster.asciidoc","line":30},"digest":"f27c28ddbf4c266b5f42d14da837b8de","lang":"console","found":[],"source":"POST /_flush"},
The issue presents from this file:
https://github.com/elastic/elasticsearch/edit/master/docs/reference/setup/restart-cluster.asciidoc
The above file has an include file on line 20 (include::{docdir}/upgrade/disable-shard-alloc.asciidoc[]), and that include file has an example on line 10 (so this is marked as being on line 20 + 10 = 30). The main file (restart-cluster.asciidoc) also has an example on line 30, hence the conflict.
When the report generator reads included asciidoc files and counts lines in the include file, it needs to carry forward the count into subsequent examples in the main file.
This has a downstream impact in the .NET code generation, where method names are constructed using the form public void Line<LineNumber>()
, which then results in a compilation error due to a naming collision. I can fix this downstream issue locally for now, but the problem sill exists in the generation process.