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

OPL parser does not recognize line comments after OR operator #1116

Closed
5 of 6 tasks
fishstamp82 opened this issue Nov 8, 2022 · 0 comments · Fixed by #1117
Closed
5 of 6 tasks

OPL parser does not recognize line comments after OR operator #1116

fishstamp82 opened this issue Nov 8, 2022 · 0 comments · Fixed by #1117
Labels
bug Something is not working.

Comments

@fishstamp82
Copy link

fishstamp82 commented Nov 8, 2022

Preflight checklist

Describe the bug

Importing namespaces from OPL fails if line comments // are declared immediately after the OR operator ||. I expect the comment operator to work despite what preceding token it follows.

Reproducing the bug

The setup is based on rewrites example, but where I added a docker-compose to launch it.

git clone https://github.com/fishstamp82/opl-bug && cd opl-bug

run

docker-compose up

Notice the error message complaining about non-defined namespaces, it is quite hard to pin it to the comment.

Relevant log output

msg=Failed to parse OPL config files at target file://./namespaces.keto.ts. audience=application error=map[me
ssage:error from 41:69 to 41:141: expected "this", got "// Will not parse this file due to the comment following the OR operator"

Relevant configuration

No response

Version

0.10.0-alpha.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker Compose

Additional Context

No response

@fishstamp82 fishstamp82 added the bug Something is not working. label Nov 8, 2022
hperl added a commit that referenced this issue Nov 8, 2022
hperl added a commit that referenced this issue Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant