Add --with-jing option and exercise both validators in CI#328
Conversation
872b604 to
b7fd137
Compare
| break; | ||
|
|
||
| case 'jing': | ||
| if (!in_array($v, ['auto', 'yes', 'no'])) { |
There was a problem hiding this comment.
| if (!in_array($v, ['auto', 'yes', 'no'])) { | |
| if (!in_array($v, ['auto', 'yes', 'no'], true)) { |
| $out = null; | ||
| $ret = null; |
There was a problem hiding this comment.
Left over from the old code. Likely there because the line after this uses it by reference. Which PHP already does for you. Removed ;-)
| $out = []; | ||
|
|
||
| if ( $ret == 0 ) | ||
| if ( !$ret ) |
There was a problem hiding this comment.
=== is better
was there ever a chance for the NULL value to survive?
There was a problem hiding this comment.
It should be an int if we set $ret. So strict is fine here.
7a0c87c to
59c1486
Compare
|
I think this is wrong, as calling configure.php --with-jing=yes on a machine where there is no Java, the code will blindly call xml_validate_jing(), that in turn IDREF errors are downgraded to warnings in translations, at validation step, but only in Java/Jing branches. See: f572f00 . The root problem can be more easily resolved by replicating the same downgrade on libxml branches, but only in translations. On doc-en, IDREFs should still be a hard failure. No |
|
That is, to change if in_translation if error_count == ifref_count { echo done, return } |
I have added improved error handling for when Java is absent. So that should not fail silently anymore. Also Jing errors are handled better now with
This PR was not meant to be a fix for #327, but rather a fix for the inconsistency between the production build, and the local or CI build. Given we allow both Jing and libxml validation, we should test both here. Otherwise it is bound to happen again one way or another. So in other words, we need a follow up PR in order to fix doc-it and apparently doc-uk as well. |
I think it is now ok.
There are a few changes on text-entities, configure fixups, en revcheck arg passing. I will try to make those in one go, next week. Also, any changes in doc-base will help the study of actions/checkout being stuck in the past. |
|
On second thought, this option can be named something The reason is twofold. First, the configure is run really once in CI, instead of double run, almost doubling performance. Second, I do not see this option being used outside Github CI. As its raison d'être is catching failure validation differences, both functions call exit, so either one failing will fail the entire (and unique) run. |
|
In fact, something like, to also include the requirement that CI has to have Java: |
|
In fact, as I'm slowly making changes and documentating the GH CI behavirour, I may need to include the |
Server build process doesn't use
jingfor XML validation. Which is related to why doc-it #327 is unable to build.This is a first step towards fixing it by making sure we have a correct CI pipeline that build with and without
jing.CI is expected to fail for doc-it with the message below: