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

BugFix: PyNative would fail to translate math fns inside message loops. #1077

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

Robadob
Copy link
Member

@Robadob Robadob commented Jul 5, 2023

This affected the pynative tutorial from the documentation.

The prior code

            # message input iterator arg
            elif self._message_iterator_var:
                if t.value.id == self._message_iterator_var:

Would cause the branch to be taken if inside a message loop, but then if the message iterator var was not being used, it would break from that branch and fail to check the other conditions. Hence math and other functions inside message loops would not be translated.

Related: FLAMEGPU/FLAMEGPU2-docs#150

@Robadob Robadob added the bug label Jul 5, 2023
@Robadob Robadob requested a review from mondus July 5, 2023 20:50
@Robadob Robadob self-assigned this Jul 5, 2023
Copy link
Member

@mondus mondus left a comment

Choose a reason for hiding this comment

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

Logic change for this looks correct. It is obviously why function calls inside loops where failing to proceed with parsing. Happy to merge this now (although would benefit from a test of expected message format inside a message loop).

This affected the pynative tutorial from the documentation.

Have added a test that catches this bug.
@Robadob Robadob force-pushed the bugfix_pynative_2023_07_05 branch from b1e5233 to 806fbab Compare July 6, 2023 09:17
@Robadob Robadob merged commit 71cf06c into master Jul 6, 2023
18 checks passed
@Robadob Robadob deleted the bugfix_pynative_2023_07_05 branch July 6, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants