Esbonio crashes when Sphinx Immaterial Theme is used
twodrops opened this issue · comments
Immaterial theme looks like a good replacement for the not so good maintained RTD Theme.
Esbonio however has a problem with it.
On first startup the theme downloads and caches Google fonts.
https://github.com/jbms/sphinx-immaterial/blob/8c94664fd56baa87abf023a7b3aa7748c3c15828/sphinx_immaterial/external_resource_cache.py#L129
It works fine with a local sphinx-build.
Esbonio does not seem to like this async download step during its build and just hangs.
/usr/local/lib/python3.10/site-packages/esbonio/lsp/sphinx/init.py:164: RuntimeWarning: coroutine 'add_google_fonts..do_fetch' was never awaited
I have raised an issue at Immaterial theme as well
jbms/sphinx-immaterial#163
I suspect the issue has to do with nesting of asyncio stuff.
In principle the code in sphinx-immaterial for downloading resources could be changed to not use asyncio. But it would be better if that were not necessary.
I wonder if using nest-asyncio
would fix the issue:
https://pypi.org/project/nest-asyncio/
Still it is odd that it would hang rather than raise an exception.
Perhaps you can do some additional debugging and try to figure out the cause a bit more?
This issue has been fixed now by immaterial theme and can therefore be closed.
jbms/sphinx-immaterial#163