Skip to content

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Jun 15, 2021

Context: #850

When a parsing issue is hit when importing Javadoc info, an "error" is printed out like this:

Error (31:41): Syntax error, expected: #PCDATA, <tt>, <TT>, <i>, <I>, {@code, {@docRoot}, {@inheritDoc}, {@link, {@linkplain, {@literal, {@value}, {@value, UnknownHtmlElementStart, </tt>, </TT>, </i>, </I>, </p>, </P>, <p>, <P>, <pre>, <PRE>, @author, @apiSince, @deprecated, @deprecatedSince, @exception, @param, @return, @see, @serialData, @serialField, @since, @throws, @[unknown], @version
    {@link #getCurrentTrackSelections()}}.</li>

This is intended to be informational, but this output format triggers the MSBuild error parsing regex, and is interpreted as an actual error, causing the build to fail.

Instead, we are going to prepend it as JavadocImport-Error so that MSBuild doesn't interpret as an error and the build can successfully complete.

JavadocImport-Error (31:41): Syntax error, expected: #PCDATA, <tt>, <TT>, <i>, <I>, {@code, {@docRoot}, {@inheritDoc}, {@link, {@linkplain, {@literal, {@value}, {@value, UnknownHtmlElementStart, </tt>, </TT>, </i>, </I>, </p>, </P>, <p>, <P>, <pre>, <PRE>, @author, @apiSince, @deprecated, @deprecatedSince, @exception, @param, @return, @see, @serialData, @serialField, @since, @throws, @[unknown], @version
    {@link #getCurrentTrackSelections()}}.</li>

@jonpryor jonpryor merged commit 95c9b79 into main Jun 15, 2021
@jonpryor jonpryor deleted the javadoc-error branch June 15, 2021 20:42
jonpryor pushed a commit that referenced this pull request Jun 15, 2021
Context: #850

When a parsing issue is hit when importing Javadoc info, an "error"
is printed out like this:

	Error (31:41): Syntax error, expected: #PCDATA, <tt>, <TT>, <i>, <I>, {@code, {@docroot}, {@inheritdoc}, {@link, {@linkplain, {@literal, {@value}, {@value, UnknownHtmlElementStart, </tt>, </TT>, </i>, </I>, </p>, </P>, <p>, <P>, <pre>, <PRE>, @author, @apiSince, @deprecated, @deprecatedSince, @exception, @param, @return, @see, @Serialdata, @serialField, @SInCE, @throws, @[unknown], @Version
	    {@link #getCurrentTrackSelections()}}.</li>

This is intended to be informational, but this output format triggers
the MSBuild error parsing regex, and is interpreted as an actual
error, causing the build to fail.

Avoid the error by prepending `JavadocImport-` to the
`LogMessage.Level` enum value, so that MSBuild doesn't interpret the
string as an error and the build can successfully complete:

	JavadocImport-Error (31:41): Syntax error, expected: #PCDATA, <tt>, <TT>, <i>, <I>, {@code, {@docroot}, {@inheritdoc}, {@link, {@linkplain, {@literal, {@value}, {@value, UnknownHtmlElementStart, </tt>, </TT>, </i>, </I>, </p>, </P>, <p>, <P>, <pre>, <PRE>, @author, @apiSince, @deprecated, @deprecatedSince, @exception, @param, @return, @see, @Serialdata, @serialField, @SInCE, @throws, @[unknown], @Version
	    {@link #getCurrentTrackSelections()}}.</li>
@jpobst jpobst added this to the 11.4 (16.11 / 8.11) milestone Jul 6, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants