error details
Playing with the new link syntax, I've had a few cases of syntax error. Currently, they look like:
[1/1] Generating pango-doc with a custom command
FAILED: docs/Pango
/var/home/mclasen/Sources/pango/subprojects/gi-docgen/gi-docgen.py generate --add-include-path=/var/home/mclasen/Sources/pango/docs/../pango --config=/var/home/mclasen/Sources/pango/docs/pango.toml --output-dir=docs/Pango --no-namespace-dir --content-dir=/var/home/mclasen/Sources/pango/docs pango/Pango-1.0.gir
Traceback (most recent call last):
File "/var/home/mclasen/Sources/pango/subprojects/gi-docgen/gidocgen/gidocmain.py", line 63, in run
res = options.run_func(options)
File "/var/home/mclasen/Sources/pango/subprojects/gi-docgen/gidocgen/gdgenerate.py", line 1611, in run
gen_reference(conf, options, parser.get_repository(), templates_dir, theme_conf, content_dir, output_dir)
File "/var/home/mclasen/Sources/pango/subprojects/gi-docgen/gidocgen/gdgenerate.py", line 1506, in gen_reference
content_files = _gen_content_files(config, theme_config, content_dir, ns_dir, jinja_env, namespace)
File "/var/home/mclasen/Sources/pango/subprojects/gi-docgen/gidocgen/gdgenerate.py", line 1419, in _gen_content_files
dst_data = utils.preprocess_docs(src_data, namespace, md)
File "/var/home/mclasen/Sources/pango/subprojects/gi-docgen/gidocgen/utils.py", line 216, in preprocess_docs
link = LinkGenerator(namespace=namespace, fragment=fragment, endpoint=endpoint)
File "/var/home/mclasen/Sources/pango/subprojects/gi-docgen/gidocgen/utils.py", line 151, in __init__
self._name, self._func_name = self._rest.split('.')
ValueError: not enough values to unpack (expected 2, got 1)
It would be very useful if we could handle that enough to print out the content file and line number or something like that. If it happens in gir content, we can perhaps print some context like the class or name ?