webots icon indicating copy to clipboard operation
webots copied to clipboard

Decouple MATLAB Functions Test from `Controller.def`

Open CoolSpy3 opened this issue 10 months ago • 0 comments

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 avatar Jan 06 '25 21:01 CoolSpy3