Skip to content

Conversation

@dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Aug 1, 2018

Fixes (again) #1770

On windows we are hitting the same issue where the warnings
aapt2 is producing are being logged as errors.

The weird part is that the "file" group was not being populated
with the right informaton.. This turns out to be down to how
aapt2 is reporting the warnings..

W/ResourceType(23681): For resource 0x0101053d, entry index(1341) is beyond type entryCount(733)
W/ResourceType( 5536): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1155)
	       ^
	    Hmmmmm.

This space throws off our regex and results in the entire line
ending up in the message property.
So the fix is to update the regex to allow spaces for the line
capture group. We then also need to Trim that value before passing
it into int.Parse to ensure we don't get an error.

Fixes (again) dotnet#1770

On windows we are hitting the same issue where the warnings
`aapt2` is producing are being logged as errors.

The weird part is that the "file" group was not being populated
with the right informaton.. This turns out to be down to how
`aapt2` is reporting the warnings..

	W/ResourceType(23681): For resource 0x0101053d, entry index(1341) is beyond type entryCount(733)
	W/ResourceType( 5536): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1155)
		       ^
		    Hmmmmm.

This space throws off our regex and results in the entire line
ending up in the `message` property.
So the fix is to update the regex to allow spaces for the `line`
capture group. We then also need to Trim that value before passing
it into `int.Parse` to ensure we don't get an error.
@jonpryor jonpryor merged commit 221a219 into dotnet:master Aug 2, 2018
jonpryor pushed a commit that referenced this pull request Aug 3, 2018
…2027)

Fixes (again): #1770

On Windows we are hitting the same issue where the warnings `aapt2`
is producing are being logged as errors.

The weird part is that the "file" group was not being populated
with the right information.  This turns out to be down to how
`aapt2` is reporting the warnings: there may be *spaces* within the
line number portion:

	W/ResourceType(23681): For resource 0x0101053d, entry index(1341) is beyond type entryCount(733)
	W/ResourceType( 5536): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1155)
		       ^

This space throws off our regex and results in the entire line ending
up in the `message` property.  The fix is to update the regex to
allow spaces for the `line` capture group.  We then also need to Trim
that value before passing it into `int.Parse()` to ensure we don't
get an error.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 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.

3 participants