arcade icon indicating copy to clipboard operation
arcade copied to clipboard

Autobuild does not copy some static file changes

Open pushfoo opened this issue 1 year ago • 4 comments

Bug Report

System Info

Tip of development

Actual behavior:

Sphinx autobuild:

  1. detects the change in the CSS file and triggers rebuild
  2. does not seem to copy the CSS file

Expected behavior:

Sphinx autobuild:

  1. detects the change in the CSS file and triggers rebuild
  2. copies the CSS file

pushfoo avatar Jul 16 '24 00:07 pushfoo

It looks like thumbnail generation also doesn't fire when those files are updated.

pushfoo avatar Jul 16 '24 01:07 pushfoo

It this still a problem?

einarf avatar Mar 27 '25 22:03 einarf

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.

Infamous003 avatar May 29 '25 14:05 Infamous003

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:

  1. cd into your Arcade repo's top-level directory
  2. touch .ENABLE_DEVMACHINE_SPHINX_STATIC_FIX
  3. 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 $BEVERAGE of choice, because this starts 3.4 billion years ago in the Sphinx repo.

What happened?

  1. Sphinx:
    1. had and fixed a bug (yay)
    2. but not in time for Arcade 3.0 (oh no)
  2. We fixed our _static copy issues like everyone does:
    1. a helper script
    2. an ugly call in conf.py
  3. 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

  1. util/sphinx_static_file_temp_fix.py
  2. These lines::
# 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")

pushfoo avatar May 29 '25 23:05 pushfoo