Pure Starlark parser for Bazel BUILD files#191
Closed
mateusz-olczyk wants to merge 7 commits intoEngFlow:mainfrom
Closed
Pure Starlark parser for Bazel BUILD files#191mateusz-olczyk wants to merge 7 commits intoEngFlow:mainfrom
mateusz-olczyk wants to merge 7 commits intoEngFlow:mainfrom
Conversation
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Collaborator
|
Sorry, this is too complicated. This is too much code and complexity to maintain for a test framework. |
Collaborator
Author
|
Yeah, Starlark definitely was not designed for such purposes... Anyway, it was nice to play with it just to prove such things are possible. The implementation is horrible, I agree. It's hard to make it better with the lack of the most fundamental features. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The solution is the answer to #190 (comment).
Inspired by the Go implementation in bazelbuild/buildtools.
The implementation does much more than is actually needed. I started with something simple, of course, but gradually expanded it to almost complete grammar support. This wasn't nearly as much work with proper LLM support. See the
README.mdfile to understand what this parser is capable of.