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

Properly set and read is_ref in delegate.hpp to fix non-$this variable source components in query iteration #1327

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

Gaspard--
Copy link
Contributor

  • set is_ref in populate_self so that it's properly set for any type of query
  • always set row to 0 for components with is_ref to avoid indexing garbage

Fixes #1324

…e source components in query iteration

- set is_ref in populate_self so that it's properly set for any type of query
- always set row to 0 for components with is_ref to avoid indexing garbage

Fixes SanderMertens#1324
@SanderMertens
Copy link
Owner

Nice! Can you:

  • Add a test case that reproduces the bug
  • Run bake once on the repository so the distr/flecs.h files get updated? (this is what's causing CI to fail)

@Gaspard--
Copy link
Contributor Author

I tried to cover some range of scenarios in the test. Didn't add optional arguments because I felt like the test was getting a bit long.

@SanderMertens
Copy link
Owner

Thanks, almost there:

  • Can you split up the test into three individual test cases?
  • You'll need to add the test cases to the test/cpp/project.json file for them to be executed

@Gaspard--
Copy link
Contributor Author

I thought about is some more and I'm pretty sure these 2 tests cover all cases. I wanted to make sure reading / writing relationships was consistent originally, but I'm pretty sure that superfluous.

@SanderMertens
Copy link
Owner

Thanks for the PR!

@SanderMertens SanderMertens merged commit 7922011 into SanderMertens:master Sep 1, 2024
72 checks passed
@Gaspard-- Gaspard-- deleted the fix_cpp_term_source branch September 1, 2024 22:53
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.

Source is not properly taken into account when iterating with the C++ API
2 participants