w3c / alreq

Documenting gaps and requirements for support of Arabic and Persian on the Web and in eBooks.
Other
60 stars 31 forks source link

move function into preProcess #240

Closed deniak closed 3 years ago

deniak commented 3 years ago

move functions into preprocess

r12a commented 3 years ago

Unfortunately, there's no improvement. https://www.w3.org/TR/2021/WD-alreq-gap-20210120/#bidi_text

I must say, that seems odd, if the scripts are run before the general respec code, since the structure of the document looks ok, it's just the bits that should be sucked in from GH issues that are missing.

Could there be a caching problem snarling things up?

r12a commented 3 years ago

Note that it works fine for the ED and from my hard drive. It is also adding the italicised prompts, which are read in from a separate file with a relative link. It's just the GH issue data that's not appearing. It's not an origin problem associated with the build code, is it?

r12a commented 3 years ago

Or perhaps it's just down to the delay incurred in obtaining the data during the build of the doc by the spec-generator? For example, when the page works as expected in the ED or from the hard drive there can be a 1-2 second delay before the GH issue text appears in the document.

deniak commented 3 years ago

After more investigation, the issue comes from the github issue fetching. All the calls are asynchronous and respec doesn't wait for them to finish. I've refactored the script a little bit: https://github.com/w3c/i18n-activity/pull/1009 This should fix the issue.

r12a commented 3 years ago

@denis it hasn't fixed the issue yet, see https://www.w3.org/TR/alreq-gap/#bidi_text but i'm inclined to suspect that this may be because the real latest version is not being served because of caching?

I get a console message "XHR GET https://www.w3.org/TR/tr-outdated-spec Not found" when trying to load https://www.w3.org/TR/2021/WD-alreq-gap-20210120/

I may try to republish another page and see whether that breaks...

r12a commented 3 years ago

Actually, https://labs.w3.org/spec-generator/?type=respec&url=https%3A%2F%2Fw3c.github.io%2Falreq%2Fgap-analysis%2F%3FspecStatus%3DWD%26shortName%3Dalreq-gap#bidi_text is still producing intermittent failures, too (although it works more often than it fails, this time, which is the opposite of what we had before).

deniak commented 3 years ago

I tried to debug and I believe the bug comes from respec (see https://github.com/w3c/respec/issues/3273)