whatwg / html-build

Build scripts for https://github.com/whatwg/html
Other
65 stars 61 forks source link

Build does not fail on invalid Web IDL #201

Closed domenic closed 4 years ago

domenic commented 5 years ago

The highlighter chokes on it (as seen in https://github.com/whatwg/html/issues/4832), but the build does not fail when this happens. We should figure out how to make this fail, instead, so that such issues don't recur. (Just edit your local copy of HTML to have an IDL error while testing.)

tabatkins commented 5 years ago

Hm, currently I either send a 200 response if everything's fine, or a 404 response if you didn't call it correctly. I can send a different error code on highlight failure, perhaps 400?

domenic commented 5 years ago

At this point I'd like to defer to @sideshowbarker, as our point person for highlighter integration :). That does sound pretty nice to me though.

sideshowbarker commented 5 years ago

So what we need here is to make wattsi fail with a non-zero exit status if the highlighter response is a 4xx (or really, anything other than a 200)?

I can send a different error code on highlight failure, perhaps 400?

400 sounds appropriate to me

tabatkins commented 4 years ago

@sideshowbarker highlighter should be emitting 400 when the highlighting code errors, let me know if there are any problems

sideshowbarker commented 4 years ago

OK, https://github.com/whatwg/wattsi/pull/103 has a patch to make wattsi fail if the highlighter responds with 400 status.

highlighter should be emitting 400 when the highlighting code errors, let me know if there are any problems

The highlighter doesn’t seem to be emitting a 400 when the Web IDL parser finds a syntax error; see https://github.com/tabatkins/highlighter/issues/14