Bug#1036437: please provide a simple example to reproduce the bug
Hello Alexis, Alexis Murzeau a écrit : > [...] > That error can be fixed by changing the first line of furo.js > from this: > `import Gumshoe from "./gumshoe-patched.js";` > > to this: > `import * as Gumshoe from "./gumshoe-patched.js";` "import * as Gumshoe" looks out like a weird fix. It assumes that gumshoe-patched.js has only one importable item doesn't it? > As a side note (as you are the uploader of python-sumpy-doc, you might be > interested), I found that the version of python-sumpy-doc in testing and > unstable is missing many files in the html directory: [...] Thank you for pointing this mess! It was due to the use of intersphinx inventories, which cannot be downloaded from Internet during an official Debian build (accessing the Internet is not possible when a package is built in Debian's build farm). I could inject the inventory files, so they are now local to the file tree during the build, and python-sympy-doc provides HTML contents again. I added a short script to add `type="module"` when necessary in HTML files. Best regards, Georges. signature.asc Description: PGP signature
Bug#1036437: please provide a simple example to reproduce the bug
Hi, On 30/08/2023 17:30, Georges Khaznadar wrote: Dear Alexis, the bug about "import Gumshoe from "./gumshoe-patched.js";" is not due to furo: it is due to the package python-sympy-doc. When I modify the file /usr/share/doc/python-sympy-doc/html/index.html, and replace by then, Firefox accepts to import Gumshoe seamlessly. I've tried that on python-sympy-doc package with this line: `` But with Firefox 117.0 and a local http server, there is another error in the console: `Uncaught SyntaxError: ambiguous indirect export: default`. That error can be fixed by changing the first line of furo.js from this: `import Gumshoe from "./gumshoe-patched.js";` to this: `import * as Gumshoe from "./gumshoe-patched.js";` Then everything works (light/dark mode can be switched via a button on the page). I've proposed upstream to do the change if that's ok for them: https://github.com/pradyunsg/furo/discussions/717 As a side note (as you are the uploader of python-sumpy-doc, you might be interested), I found that the version of python-sumpy-doc in testing and unstable is missing many files in the html directory: https://packages.debian.org/sid/all/python-sympy-doc/filelist [...] /usr/share/doc/python-sympy-doc/examples/notebooks/trace.ipynb /usr/share/doc/python-sympy-doc/html/pics/consoleascii.png /usr/share/doc/python-sympy-doc/html/pics/consoleunicode.png /usr/share/doc/python-sympy-doc/html/pics/ipythonnotebook.png /usr/share/doc/python-sympy-doc/html/pics/ipythonqtconsole.png /usr/share/doc/python-sympy-doc/html/pics/pngview1.png /usr/share/doc/python-sympy-doc/sympy-live.sh In bookworm, all HTML files are there, so the issue is only in testing/unstable. By the way, the file python-sympy-doc also misses a file version.json; this file should be accessed properly only when one opens the file via a http: service, like in: firefox http://localhost/doc/python-sympy-doc/html/index.html Please can you check whether the bug you reported still exists when furo.js is invoked with the type "module"? Please be kind enough to send me another way to reproduce the bug you saw, taking in account that is the right way to use furo.js. Best regards. Georges -- Alexis Murzeau PGP: B7E6 0EBB 9293 7B06 BDBC 2787 E7BD 1904 F480 937F| OpenPGP_0xE7BD1904F480937F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Bug#1036437: please provide a simple example to reproduce the bug
Dear Alexis, the bug about "import Gumshoe from "./gumshoe-patched.js";" is not due to furo: it is due to the package python-sympy-doc. When I modify the file /usr/share/doc/python-sympy-doc/html/index.html, and replace by then, Firefox accepts to import Gumshoe seamlessly. By the way, the file python-sympy-doc also misses a file version.json; this file should be accessed properly only when one opens the file via a http: service, like in: firefox http://localhost/doc/python-sympy-doc/html/index.html Please can you check whether the bug you reported still exists when furo.js is invoked with the type "module"? Please be kind enough to send me another way to reproduce the bug you saw, taking in account that is the right way to use furo.js. Best regards. Georges Alexis Murzeau a écrit : > On 31/05/2023 16:43, georgesk wrote: > > Dear Alexis, > > > > I packaged furo for debian in order to be able to keep maintaining the > > package sympy, which depends on it. > > > > However sympy's documentation is rather big. Creating a minimal sphinx > > tree with sphinx-quickstart is not enough to trigger the bug which you > > are reporting. > > > > Please can you share a minimal example which would trigger this bug, so > > I can include it in furo package's test scripts, and prevent future > > regressions after this bug's fix? > > > > Thank you in advance. Georges. > > > > > Hi, > > You can reproduce it by: > - Installing python3-sympy-doc package > - Open firefox and browse to > file:///usr/share/doc/python-sympy-doc/html/index.html > - Check the Firefox' console, it will show "Uncaught SyntaxError: import > declarations may only appear at top level of a module" > for furo.js > - furo.js contains "import Gumshoe from "./gumshoe-patched.js";" line which > means it was not minified (which is what upstream does). > > The impact is just that dark/light theme and search bar won't work. > > I've checked if this would be possible to do the minification, but that seems > to require many node packages and not all of them > are available or up to date in Debian. > > So maybe that's too much work to just get dark/light theme and search bar... > (most of the theme, mostly css, is still working fine anyway) > > -- > Alexis Murzeau > PGP: B7E6 0EBB 9293 7B06 BDBC 2787 E7BD 1904 F480 937F| > -- Georges KHAZNADAR et Jocelyne FOURNIER 22 rue des mouettes, 59240 Dunkerque France. Téléphone +33 (0)3 28 29 17 70 signature.asc Description: PGP signature
Bug#1036437: please provide a simple example to reproduce the bug
On 31/05/2023 16:43, georgesk wrote: Dear Alexis, I packaged furo for debian in order to be able to keep maintaining the package sympy, which depends on it. However sympy's documentation is rather big. Creating a minimal sphinx tree with sphinx-quickstart is not enough to trigger the bug which you are reporting. Please can you share a minimal example which would trigger this bug, so I can include it in furo package's test scripts, and prevent future regressions after this bug's fix? Thank you in advance. Georges. Hi, You can reproduce it by: - Installing python3-sympy-doc package - Open firefox and browse to file:///usr/share/doc/python-sympy-doc/html/index.html - Check the Firefox' console, it will show "Uncaught SyntaxError: import declarations may only appear at top level of a module" for furo.js - furo.js contains "import Gumshoe from "./gumshoe-patched.js";" line which means it was not minified (which is what upstream does). The impact is just that dark/light theme and search bar won't work. I've checked if this would be possible to do the minification, but that seems to require many node packages and not all of them are available or up to date in Debian. So maybe that's too much work to just get dark/light theme and search bar... (most of the theme, mostly css, is still working fine anyway) -- Alexis Murzeau PGP: B7E6 0EBB 9293 7B06 BDBC 2787 E7BD 1904 F480 937F| OpenPGP_signature Description: OpenPGP digital signature
Bug#1036437: please provide a simple example to reproduce the bug
Dear Alexis, I packaged furo for debian in order to be able to keep maintaining the package sympy, which depends on it. However sympy's documentation is rather big. Creating a minimal sphinx tree with sphinx-quickstart is not enough to trigger the bug which you are reporting. Please can you share a minimal example which would trigger this bug, so I can include it in furo package's test scripts, and prevent future regressions after this bug's fix? Thank you in advance. Georges. signature.asc Description: PGP signature