OpenC3 / cosmos

OpenC3 COSMOS
https://openc3.com
Other
103 stars 30 forks source link

openc3cli: xtce_converter not calling install_phase1/2 with correct arguments #207

Closed djordan-nh closed 1 year ago

djordan-nh commented 1 year ago

Running the xtce_converter from openc3cli fails with a ruby error due to calling the install_phase1 and install_phase2 functions with incorrect arguments (see openc3cli). OpenC3::PluginModel.install_phase1 requires a keyword argument existing_variables and OpenC3::PluginModel.install_phase2 requires a single positional argument for plugin_hash. Seems like a simple fix, other parts of openc3cli already call these correctly.

To Reproduce Clone the openc3 repo and create a plugin gem following the openc3 documentation. Then run the xtce_converter cli tool to export XTCE files. This is following the documentation from https://openc3.com/docs/v5/xtce

$ ./openc3.sh cli xtce_converter --plugin myplugin-*.gem --output output_dir
Installing myplugin-20220929140301.gem
Error: wrong number of arguments (given 2, expected 1; required keyword: scope)
/usr/local/lib/site_ruby/3.1.0/rubygems/uninstaller.rb:98:in `uninstall': gem "myplugin" is not installed (Gem::InstallError)
        from /openc3/bin/openc3cli:257:in `xtce_converter'
        from /openc3/bin/openc3cli:514:in `<main>'

Environment:

ryanmelt commented 1 year ago

Thanks for the report. We'll get this fixed in our next release.