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
Toml header parsing fix #16141
Toml header parsing fix #16141
Conversation
ankushbhardwxj
commented
Jul 27, 2020
- Fixed error in regex of TOML header parsing
- Rewrote tests and removed future added in Mason fixes from #16091 and #16078 #16132
@ben-albrecht Please review this & let me know for any changes.
|
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.
@ankingcodes - thanks for the quick turn-around. I have some testing feedback inline.
@ben-albrecht made changes requested. |
@ben-albrecht - Made the changes requested here. Also, modified
We can also add a GSOC label here. |
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.
Passes local testing. I have 1 question about our implementation, but looks good otherwise!
|
||
|
||
// checks if quotes exist and avoids '.' within them to create subtables | ||
proc splitWithoutQuotes(tblPath: string) { |
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.
Will this do the right thing if we have mixed quotes, e.g.
[foo."a.b.c".bar]
If so, it could be useful to include this in the test cases.
Also, I suspect we don't yet handle escaped quotes, e.g.
[foo.\"a.b.c]
but I'm OK to defer that for future work.
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.
[foo."a.b.c".bar]
No, our current implementation doesn't support this. We basically count the number of periods before a quote is encountered and split that many times. I'm not sure how we could handle this case, since we cannot differentiate periods before and after the quotes, using our inbuilt split function.
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.
I believe we will need to get rid of using the inbuilt split function and create a new function which would avoid periods inside of quotes.
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.
I believe we will need to get rid of using the inbuilt split function and create a new function which would avoid periods inside of quotes.
I would support this approach. Let's discuss in today's call.
Adding a WIP label to help me keep track of which PRs are waiting on me. IIRC, we are pursuing the parsing / splitting fixes in this PR. |
@ankingcodes - Should we close this PR until you have time to come back to it? I'm not sure if you'd pick up from this branch or start a new PR when you get around to the bigger parsing/splitting changes. |
@ankingcodes - I am going to close this PR until we have a chance to revisit the design & implementation. |