Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robot: remove empty expression .{0} in parsers/robots.c to fix unit test tmain and units on FreeBSD #1866

Merged

Conversation

derekschrock
Copy link
Contributor

Removing empty expression .{0} fixes unit test on FreeBSD due to FreeBSD libc regcomp not liking the following (a|b|.{0}). Even though .{0} is valid removing it shouldn't create any issues.

@coveralls
Copy link

coveralls commented Sep 3, 2018

Coverage Status

Coverage remained the same at 84.841% when pulling 0e10675 on derekschrock:empty-regex-expression into 0d87063 on universal-ctags:master.

@masatake
Copy link
Member

masatake commented Sep 4, 2018

Thank you.

I wondered who wrote the original line. Surprisingly, I wrote it. I should explain the background of the change in the commit log.

#1571 (comment)
81a4593

However, "make units" on MacOSX on Travis says nothing wrong about your patch.
I wonder why.

I would like to merge your change. I have one request.

Could you refer the above URLs (or commit ID) in your commit log?
So we can know the background of the change easier with git blame when we receive a bug report from a MacOS user. Feel free to do "git push --force" after updating the commit log.

@masatake masatake changed the title Remove empty expression .{0} in parsers/robots.c to fix unit test tmain and units on FreeBSD Robot: remove empty expression .{0} in parsers/robots.c to fix unit test tmain and units on FreeBSD Sep 5, 2018
Running unit tests tmain and units via 'make check' the empty expression
.{0} from the matching group in parsers/robot.c was causing FreeBSD libc
regcomp to produce an error: empty (sub)expression.

tmain would fail for some checks while units would fail for robots checks.

Removing the emptry expression .{0} "match anything exactly zero times"
fixes this issue and all expected tests pass for both tmain and units.

Testing the same change, removing the expression .{0} from the
matching group, on centos7 does not appear to have any regessions.

This reverts the following commit
universal-ctags@81a4593

That was created for the following issue:
universal-ctags#1571 (comment)

It's possible there's some regression for macOS however macOS on Travis
doesn't seem to have any issues.
@masatake masatake merged commit 1c39fd3 into universal-ctags:master Sep 10, 2018
@masatake
Copy link
Member

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants