-
Notifications
You must be signed in to change notification settings - Fork 36
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
Comments multiple lines after conditional comments not handled as expected #137
Comments
Hi @teng-vungle - sorry I didn't see this until just now, otherwise I would have tried to squeeze the fix in with the v3 release that just went out. Anyway, I will take a look at this behavior and double check to make sure there isn't some obscure reason why it works this way, otherwise your expected behavior makes sense to me! |
I found this to be the case too! A comment directly after LAMS (between LAMS and any other manifest comment) results in a LAMS error. If I double-comment it out, it works fine. It seems like with commented-out content, LAMS doesn't know where to stop reading and trying to interpret something. It "stops" as soon as it finds any parameter in regular LookML, but anything commented out between the end of LAMS and the beginning of other content, it tries to interpret. Fabio -- in case it's helpful, here's the error I was getting:
There were, in fact, lots of rules specified in the manifest, both explicit inclusions + custom rules. The line it was trying to read for me was:
When I changed that line to:
And when I changed it to
it returned: So it was "skipping" the word "This" in the comment, but once it reached the "s" or "x", it threw the parsing error. (I can't repro this now due to the new error I'm getting, but if it would be helpful, happy to hop on a call and show you Github Action history of the tests I ran when I was figuring this out! Feel free to hit me up -- [email protected]) |
Thanks for the offer for more info. I think the cause is pretty clear here, namely the Unfortunately, I had just prioritized this lower as:
I'm still a little undecided on how I would like to release this change without disrupting people... perhaps a command-line flag, although it would need to be passed down into the parser module as well |
LAMS rule exemption block will cause parsing error if it's followed by a regular comment block.
Example that causes parsing error
Example without error (comments separated by non-comment contents):
Another example without error (regular comments come before LAMS):
What's expected:
Comment blocks—when separated by an empty line—should stop being meaningful for LAMS, and they shouldn't cause parser error because of that.
The text was updated successfully, but these errors were encountered: