Closed wayneparrott closed 3 years ago
Fixing the build error asap. I did not have test_interface_files pkg installed in my dev env.
update-1: At 1st glance, file generation from the generate_message is not generating the service msgs (
I plan to look into the generate_messages issue with test_interface_files pkg but would like to ask if we need to test against this package since test_msgs pkg seems to be the one we should focus on in testing?
update-2: Upon inspecting the diffs between test_interface_files pkg and the test_msgs pkg, the services in the test_interface_files pkg do not include the
Thanks for making the improvements for ts, I investigated the error reported on trybot
Caught error: Error: Cannot find module './test_interface_files__srv__Arrays_Request.js'
Require stack:
- C:\proj\rclnodejs\generated\test_interface_files\test_interface_files__srv__Arrays.js
- C:\proj\rclnodejs\lib\interface_loader.js
- C:\proj\rclnodejs\rostsd_gen\index.js
- C:\proj\rclnodejs\scripts\generate_messages.js
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents):
Just as you have mentioned in update-2 that the services in the test_interface_files pkg don't include the _Request.msg and _Response.msg files, so the idl_generator doesn't generate the corresponding JS files for them. Because the test_interface_files
has been deprecated, I think that's the reason why there is no _Request/Response.msg files, unfortunately, the .srv
is still there.
Some comments based on your latest update
Conclusion: the test_interface_files pkg is goofed and tsd_gen script should do a better job at identifying goofed up interfaces.
Strongly agree, probably we could just check if the _Request/Response.msg exist practically.
Added checks for actions and services to verify that the required interfaces are present before generating the respective tsd info. When an invalid service or action is detected (e.g., test_interface_files/srv/*) an informative error msg is output to stdout and the invalid interface is not included in the interfaces.d.ts file.
After landing this PR, I think v0.16.0 is ready to publish, thanks for your effort!
Improve client and service typing support.
Key changes
Fix #708