flame-engine / flame

A Flutter based game engine.
https://flame-engine.org
MIT License
9.26k stars 907 forks source link

Documentation search and highlight is broken due to Sphinx upgrade #1999

Closed spydon closed 2 years ago

spydon commented 2 years ago

Current bug behaviour

When searching for something on the docs the search never completes and in the console you can see:

Uncaught SyntaxError: redeclaration of const _highlight
    <anonymous> https://docs.flame-engine.org/main/_static/sphinx_highlight.js:1
[sphinx_highlight.js:1:1](https://docs.flame-engine.org/main/_static/sphinx_highlight.js)
    <anonymous> https://docs.flame-engine.org/main/_static/sphinx_highlight.js:1
Uncaught ReferenceError: SPHINX_HIGHLIGHT_ENABLED is not defined
    query https://docs.flame-engine.org/main/_static/searchtools.js:271
    setIndex https://docs.flame-engine.org/main/_static/searchtools.js:182
    <anonymous> https://docs.flame-engine.org/main/searchindex.js:1
[searchtools.js:271:9](https://docs.flame-engine.org/main/_static/searchtools.js)

Expected behaviour

That the search returns results

Steps to reproduce

Go into the docs and search for something.

More information

It is most likely due to a newer version of Sphinx since it is defined as a >= in the requirements file. The sphinx site lives here: https://github.com/flame-engine/flame/tree/main/doc/_sphinx

And you can follow these docs to run in locally: https://docs.flame-engine.org/main/development/documentation.html#building-documentation-locally

ayrotideysarkar commented 2 years ago

Can you assign me some documentation issue so that I can rectify them?

st-pasha commented 2 years ago

I think we should just use fixed versions of all sphinx-related packages

spydon commented 2 years ago

I think we should just use fixed versions of all sphinx-related packages

Indeed, do we know what versions that were the last to work?

ayrotideysarkar commented 2 years ago

so what I am supposed to do in there? can you guide me?

On Mon, 3 Oct 2022 at 12:12, Lukas Klingsbo @.***> wrote:

I think we should just use fixed versions of all sphinx-related packages

Indeed, do we know what versions that were the last to work?

— Reply to this email directly, view it on GitHub https://github.com/flame-engine/flame/issues/1999#issuecomment-1265001222, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASKQVJAB3MHR6S6WTCMMPHDWBJ54HANCNFSM6AAAAAAQ3CI4IM . You are receiving this because you commented.Message ID: @.***>

st-pasha commented 2 years ago

Here's the versions that I have in my environment:

linkify-it-py==2.0.0
myst-parser==0.18.0
Pygments==2.12.0
Sphinx==5.0.2
sphinxcontrib-mermaid==0.7.1
sphinx-autobuild==2021.3.14

@ayrotideysarkar This issue can be solved by replacing the contents of requirements.txt file with the list above (or similar -- need to verify that these versions actually work, and whether or not updating to more recent versions is beneficial).

spydon commented 2 years ago

@ayrotideysarkar And you can verify this by following these instructions for how to build and run the docs locally: https://docs.flame-engine.org/main/development/documentation.html#building-documentation-locally

spydon commented 2 years ago

@ayrotideysarkar yep, that should do it!

ufrshubham commented 2 years ago

This should be high priority fix. It must be affecting everyone going through docs.

spydon commented 2 years ago

This should be high priority fix. It must be affecting everyone going through docs.

It is already fixed!