Autobuild does not copy some static file changes
Bug Report
System Info
Tip of development
Actual behavior:
Sphinx autobuild:
- detects the change in the CSS file and triggers rebuild
- does not seem to copy the CSS file
Expected behavior:
Sphinx autobuild:
- detects the change in the CSS file and triggers rebuild
- copies the CSS file
It looks like thumbnail generation also doesn't fire when those files are updated.
It this still a problem?
It is still a problem. Any changes made to the stylesheets cause the page to reload, but the styles aren't applied. A painful fix is to do a fresh build, but that takes too much time.
It this still a problem?
TL;DR: Our pre-3.0 temp fix should work until we test and deploy upstream's fix for their 10+ year bug
The Quick Fix
It is still a problem.
@Infamous003 I want you to try the temp fix:
-
cdinto your Arcade repo's top-level directory -
touch .ENABLE_DEVMACHINE_SPHINX_STATIC_FIX - Check if suddenly works
I apologize for not having this documented. Others seemed unbothered by this _static issue, so I made it opt-in only. Everyone who uses it might've forgotten it exists.
Do I need to read the rest?
| I want "funny" | I want code details |
|---|---|
| Continue reading | See bottom of comment |
Most of this comment is useful levity in the tradition of Arcade repo classics like:
...So without further ado, it's time for another Python Arcade Story :tm:!
Oops! All Forced Rebuilds!
[!WARNING] Sit down and pour a
$BEVERAGEof choice, because this starts 3.4 billion years ago in the Sphinx repo.
What happened?
- Sphinx:
- had and fixed a bug (yay)
- but not in time for Arcade 3.0 (oh no)
- We fixed our
_staticcopy issues like everyone does:- a helper script
- an ugly call in
conf.py
- It was supposed to be temporary, so of course people didn't know about it
In More Detail
| Event | Geological Era | Relevant Link |
|---|---|---|
| 10 yr Sphinx bug | Archean (3.4 BYA) | "Files from _static are not copied automatically" (sphinx/#1810) |
| 3.0 + kludge | Jan 25, 2025 | "Temp fix decade-long Sphinx bug breaking our CSS during partial rebuilds" (arcade/#2496) |
| Fix released(?) | Feb 11, 2025 | GH actions locks fix as "resolved" / limited to collaborators |
Our Temp Fix
# Temp fix for Sphinx not copying static files # pending: post-3.0 refactor
# Enable by creating a .ENABLE_DEVMACHINE_SPHINX_STATIC_FIX
run_util("sphinx_static_file_temp_fix.py")