nextstrain/docs.nextstrain.org

make livehtml: infinite loop with sphinx-autobuild-2024.2.4

joverlee521 opened this issue · 1 comments

Infinite loop discussed in #130 (comment) is back when I created a fresh Conda environment that included sphinx-autobuild-2024.2.4. Most likely caused by sphinx-autobuild allowing relative paths for --ignore

Possible solutions

  1. Pin sphinx-autobuild==2021.03.14
  2. Pin sphinx-autobuild>=2024.2.4 and update our --ignore invocation to use the relative paths
diff --git a/Makefile b/Makefile
index 3e1af10..bf53e57 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ help:
 # fnmatch(), where "*" means something other than a normal glob, for example),
 # but our usage is limited enough for this to work as much as necessary.
 livehtml:
-       sphinx-autobuild -b html $(patsubst %,--ignore "*/%",$(file < .gitignore)) "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+       sphinx-autobuild -b html $(patsubst %,--ignore "%",$(file < .gitignore)) "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
 .ONESHELL:
 docker-html:

Actually, using double asterisk (**) glob expression seems to work with both versions.

diff --git a/Makefile b/Makefile
index 3e1af10..36cb3ff 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ help:
 # fnmatch(), where "*" means something other than a normal glob, for example),
 # but our usage is limited enough for this to work as much as necessary.
 livehtml:
-       sphinx-autobuild -b html $(patsubst %,--ignore "*/%",$(file < .gitignore)) "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+       sphinx-autobuild -b html $(patsubst %,--ignore "**%",$(file < .gitignore)) "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
 .ONESHELL:
 docker-html: