RFR: 8247957: remove doclint support for HTML 4 [v3]
jjg at openjdk.java.net
Thu Dec 17 05:01:03 UTC 2020
On Thu, 12 Nov 2020 03:10:01 GMT, Yoshiki Sato <ysatowse at openjdk.org> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlTag.java line 410:
>>> 408: OBSOLETE,
>>> 409: UNSUPPORTED
>>> 410: }
>> On one hand, I don't think we need this level of detail, but on the other, I see it closely matches `AttrKind`, so OK.
>> Is there are useful distinction between INVALID / OBSOLETE / UNSUPPORTED ?
> OK: valid
> OBSOLETE: obsolete, deprecated, but still supported (valid)
> UNSUPPORTED: ever supported but no longer supported (invalid)
> INVALID: the rest of others (invalid)
> UNSUPPORTED can be used if we would like to choose a friendly message instead of saying "unknown tag" only.
> OBSOLETE is not used anywhere in this commit. Although HTML5 has some obsolete features, [JDK-8215577](https://bugs.openjdk.java.net/browse/JDK-8215577) didn't define them as valid features if my understanding is correct. So I chose not to allow obsolete features in order to avoid inconsistency.
For both `ElemKind` and `AttrKind` there only seem to be two kinds:
* previously valid
For these two cases, `OK` is obviously reasonable for `valid`, but `OBSOLETE` seems a better fit than `UNSUPPORTED`, but you could also use `HTML4` or `OLD_HTML4` or something like that to indicate why we're keeping the name around for better messages. Or, stay with `UNSUPPORTED` but add a doc comment explaining that it was previously supported but no longer supported
More information about the compiler-dev