-
Notifications
You must be signed in to change notification settings - Fork 64
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
Parse nested braces in log #21
base: master
Are you sure you want to change the base?
Conversation
If there are warnings about unmatched braces, I'd much rather fix the log parsing than paper over the problem. Do you know what's confusing the log parser? |
The problem is that braces might be nested. E.g., if the log contained
the parser would consume This happened for SIunitx in my case, not sure whether this also happens to other people. My commit fixes it for braces. The function I added could also be used for other delimiters, but so far I don't have issues with them. |
3a328a4
to
da3eead
Compare
Oh, I see. Yes, this makes sense. It'd be awesome if you could add a test to the test suite that triggers this problem before your fix and exercises the fix. |
text containing parentheses could break file stack.
Hi @temporaer. I had commented on what I can only assume were previous versions of these commits, but now my comments are nowhere to be found and at least some of them weren't addressed (for example, I had suggested a simpler way to write nested_parenthesis_end). Did you see these comments? Do you know where they went? Did you reply to them and GitHub ate the replies, too? |
hey, no idea where they went. I definitely saw the one you mentione, but instead of simplifying, I added functionality (parsing nested parenthesis of different types) that requires the complexity. |
Hi @aclements , your line-by-line comments were lost during my rebasing: https://stackoverflow.com/questions/10248666/how-to-view-line-comments-in-github . Sorry for that, I did not know this would happen. I am pretty certain I addressed all of them before rebasing and cleaning up the PR. Maybe you can find the time to review this again. |
Hi there, Any chance this can still get merged? We observe the same issue using |
latexrun
Outdated
self.__message('warning', None, | ||
"unbalanced `{' in log; file names may be wrong") | ||
self.__pos += epos + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off by one:
if epos == -1:
...
else:
self.__pos += epos
This currently causes it to skip one beyond the block, causing some warnings about bad blocks later on.
The warnings that say that the filename might be wrong after unmatched braces occur multiple times for the same file. This small check prevents them from being logged twice in succession.