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

Address LSP test failures. #1179

Merged
merged 1 commit into from
May 18, 2022
Merged

Conversation

petervdonovan
Copy link
Collaborator

This simplifies the pr method in CodeBuilder.java. The work ostensibly done by this method is, I think, taken care of elsewhere.

I believe that this fixes the test failure here. I was able to reproduce the failure by running the tests locally with the same random seed, and the failure was gone after I made this change.

After this change, the generated code still looks mostly the same to me as before.

The work ostensibly done by this method is, I think, taken care of elsewhere. A bug resulted from its complexity.
@petervdonovan
Copy link
Collaborator Author

What was the bug?

In Python, if the very first line in a {= =} code block had incorrect indentation, then the entire code block would have the same incorrect indentation. I think that this has been causing LSP tests to fail by moving syntax errors out of the range covered by the code maps.

@lhstrh
Copy link
Member

lhstrh commented May 18, 2022

Wow! Great detective work.

@lhstrh lhstrh self-requested a review May 18, 2022 18:55
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@petervdonovan petervdonovan merged commit 25935c8 into master May 18, 2022
@petervdonovan petervdonovan deleted the target-code-validation-fix branch May 18, 2022 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants