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

Decouple MATLAB Functions Test from Controller.def #6752

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CoolSpy3
Copy link
Contributor

@CoolSpy3 CoolSpy3 commented Jan 6, 2025

Description
This PR is a breakoff of #6740 containing just the changes to the MATLAB sources test. It updates the test to search for functions in the exposed header files rather than relying on the Controller.def file. This means that it can catch new functions whether or not the contributor remembers to place them in the def file.

The previous test also excluded constants from its search. I see no reason to do this, so I removed that restriction. I've created and attached a diff of the functions the test searches for before and after this change. Viewing it reveals that, with the exception of the aforementioned constants, there is no difference between the functions checked by the two versions.

Keep in mind that in order to achieve this, I had to update the function exclusion list. I think that all of these exclusions make sense (and I've added comments to that effect). The two exceptions are wbu_system_tmpdir and wbu_system_webots_instance_path. My guess is that these should be included in the MATLAB API and were just never added to Controller.def, but if there's another reason these should be excluded, let me know. IMO, adding them is out of scope for this PR and should be addressed separately.

The supervisor.h changes are to remove the wb_supervisor_field_remove_mf_item reference, which is a non-existent function that the grep search was picking up.

matlab_functions_diff.txt (GitHub won't let me upload a .diff)

@CoolSpy3 CoolSpy3 requested a review from a team as a code owner January 6, 2025 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant