Closed denisrosset closed 3 years ago
Could you provide some minimal example that has this error?
There it is:
https://github.com/denisrosset/sphinxcontrib-matlabdomain-report
Note that I'm doing weird things with references (autogenerating references for inherited members), so that's probably what triggers the original warning. I'm fine with that (and found that not using the dot prefix solves the problem).
The triggered warning is quite fragile, and some attempts to minimize the report further were unsuccessful, thus I'm leaving the code as it is.
The bug report concerns the way the warning is triggered by the Matlab domain, by calling warn_node
that has probably been deprecated. I was unable to find which Sphinx version deprecated that method though.
Thanks for the link. I have been busy at home and at work, and had no time to look into this yet. But I'll try to squeeze it in.
No problem, it's sitting there and not going away
Finally, had some time to look at this. I can confirm, that the it indeed triggers this warning. I found the commit where warn_node
was removed: https://github.com/sphinx-doc/sphinx/commit/02afc357ef530910b136396e611bf66351af1901 - and as you found, no alternative. I'll try to figure out how to warn.
Edit: Found a fix. @denisrosset would it be okay to include part of the repo you created as a test?
Absolutely! please take anything you want. If you want me to run some tests too; happy to do so.
I just looked at it again - and it seems I can replace warn_node
with a simple logger warning. Would that be ok for your use-case?
Thus, instead of emitting a warning, Sphinx crashes hard when there is a problem with reference resolution. Full output below.