-
Notifications
You must be signed in to change notification settings - Fork 61
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
Improve build.sh error messages #189
Comments
Do you have any concrete ideas for improvement? In general, tracing what part of a HTML diff caused a parse error is a pretty hard problem. |
Sorry, I missed that. No, that is not what happened. What happened is that there's an error in the source file, but it's possible it took until line 94117 for the parser to figure that out, because of the "pretty hard problem" I mentioned. |
OK, it seemed that the parse error happened on a processed version of the file. I found the error - a missing Also found that missing a: Error: missing for topic "createimagebitmapoptions" explicitly from
|
It seems like if we implemented such a preprocessor, it would need to be an HTML parser — but the thing is, the error message in this case is actually coming from an HTML parser: specifically, the HTML parser that’s part of wattsi. So what we’d actually want to do is to make the wattsi HTML parser report a specific message indicating that there’s an unclosed element (the The (Java-based) validator.nu HTML parser actually does that; it emits an I’ve raised issue whatwg/wattsi#96 for that. |
What’s supposed to happen is that you get two error messages with two different line numbers. The first error message is that one cited in the question, which has the line number of the generated file — and which as you noted isn’t a useful line number in helping you find the problem in the source. But after that you should be seeing this message:
…followed by a second error message that identifies a line number in the actual source. If you’re not seeing that error message, then it seems there’s been a regression in the build tooling, so we have a build bug we need to fix — specifically, in the part that gets the results back from the remote wattsi build server. I’ll try to see if I can reproduce that problem. |
OK yeah I was able to quickly reproduce the problem of that second error report not being emitted. I’ve raised #190 for that and will try to help get it fixed asap. In the meantime, note that you can get the expected error-reporting behavior by building and installing and running wattsi locally. See https://github.com/whatwg/wattsi#building-wattsi for the how-to |
Thanks @sideshowbarker; my apologies @kenrussell for not being as dilligent in my investigation as I should have been. I'm glad we're on an optimistic path here. |
No worries. Thanks @domenic and @sideshowbarker for looking into this. |
Attempting to make a fairly small recent change, build.sh reports the following error:
$ ./build.sh
Checking if html-build is up to date...
Looking for the HTML source (set HTML_SOURCE to override)...
Found /home/kbr/src/kenrussell/whatwg/html (alongside html-build)...
Linting the source file...
Downloading caniuse data...
Downloading mdn-spec-links/html.json...
Pre-processing the source...
Started httpserver on port 8080
Local wattsi is not present; trying the build server...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9472k 100 152 100 9472k 72 4519k 0:00:02 0:00:02 --:--:-- 4521k
Parsing MDN data...
Parsing caniuse.com data...
Processing caniuse.com data...
Parsing...
Parse Error: (94117,77) parse error while closing p element
There were errors. Stopping.
Line number 94117 in "source" isn't anywhere near the changes I made. It seems clear the error's in a generated file but I can't figure out which one. Could the error messages from the build script please be improved? Diff is attached.
create-imagebitmap-options-diff.txt
The text was updated successfully, but these errors were encountered: