Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to generate respec files with non-HTML data-include #140

Open
dontcallmedom opened this issue Jun 29, 2022 · 6 comments
Open

Fail to generate respec files with non-HTML data-include #140

dontcallmedom opened this issue Jun 29, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@dontcallmedom
Copy link
Member

I’m building the spec as part of a GitHub CI Action for w3c/N3 [1]. The spec references a number of files which are symlinked into the /spec directory along with /spec/index.html. It loads all of those that end in “.html”, but fails to load “/spec/n3.ebnf”. If I run respec locally (on Mac) it seems to work fine:

respec -s ["http://localhost:8000/spec/index.html"](http://localhost:8000/spec/index.html) -o /dev/null --verbose -t 20 -e

But, the GitHub action fails. I’ve tried renaming “n3.ebnf” to “n3.ebnf.txt”, but no joy.

reported by @gkellogg in https://lists.w3.org/Archives/Public/spec-prod/2022AprJun/0022.html

@sidvishnoi sidvishnoi added the bug Something isn't working label Jun 29, 2022
@sidvishnoi
Copy link
Member

It successfully loaded /spec/n3.ebnf (checked generated artifact).

But I can see the files from grammar directory aren't copied to final output (they're referenced in index.html, but not copied). Is that the issue?

@dontcallmedom
Copy link
Member Author

(I'll leave it to @gkellogg to reply - thanks a lot for already looking into this!)

@gkellogg
Copy link
Member

Thanks @dontcallmedom. I perhaps should have just created the issue, but I thought there may have been some requirement I was unaware of.

The error comes up in the "Generate Static HTML" step that it can't fetch /spec/n3.ebnf, although it appears in the later $ ls -R

Warning: ING] Failed to fetch /spec/n3.ebnf. Some assets might be missing.

$ ls -R
      .:
      crypto.html
      index.html
      list.html
      log.html
      math.html
      n3.ebnf
      string.html
      time.html

And, as I said in the email, running this locally on my Mac does not show the same error.

[w3c-N3] respec -s "http://localhost:8000/spec/index.html" -o /dev/null --verbose -t 20 -e
[INFO] [Timeout: 20000ms] Processing resource: http://localhost:8000/spec/index.html ...
[INFO] [Timeout: 19999ms] Launching browser
[INFO] [Timeout: 19571ms] Navigating to http://localhost:8000/spec/index.html
[INFO] [Timeout: 18815ms] Navigation complete.
[INFO] [Timeout: 18769ms] Using ReSpec v32.1.10
[INFO] [Timeout: 18769ms] Processing ReSpec document...
[INFO] [Timeout: 16501ms] Processed document.
[INFO] [Timeout: 15493ms] Done.

[w3c-N3] respec --version
32.1.10

The GH Action seems to be running exactly the same version of ReSpec.

@sidvishnoi
Copy link
Member

The "failed to fetch" part is just a warning, you can ignore it.

spec-prod (not ReSpec) tries to recursively find all referenced resources (HTML files, markdown, images etc.) from the built spec (i.e. after ReSpec builds it) to copy them to a to-be-deployed directory.

This warning exists as spec-prod assumed the ebnf file to be HTML and tried to fetch its linked subresources (it failed here). But it still successfully copied the ebnf file.

Looking further at the CI log, it seems your build failed at the link checker step. If rightly so, I would encourage you to disable link checking entirely as it's very experimental and I haven't had the time/motivation to fix it yet.

@gkellogg
Copy link
Member

Thanks @sidvishnoi. It would be great if it were easier to find the specific causes of errors in the GH Action output; I had missed the link-checker error, but it did find some dead URLs.

It seems that this issue really belonged against w3c/spec-prod after all.

@sidvishnoi
Copy link
Member

#133 will be helpful there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants