gazebosim / gz-tools

Command line tools for the Gazebo libraries.
https://gazebosim.org
Apache License 2.0
14 stars 18 forks source link

Several ignition projects install the .yaml file even if the ruby script is not installed #71

Open traversaro opened 2 years ago

traversaro commented 2 years ago

Desired behavior

While debugging a related problem, I noticed that on a Windows installation of a Ignition Fortress, ign --help was printing this message:

(igntools) C:\Users\STraversaro>ign --help
The 'ign' command provides a command line interface to the ignition tools.

  ign <command> [options]

List of available commands:

  help:          Print this help text.
  fuel:          Manage simulation resources.
  gui:           Launch graphical interfaces.
  msg:           Print information about messages.
  plugin:        Print information about plugins.
  sdf:           Utilities for SDF files.
  topic:         Print information about topics.
  service:       Print information about services.

Options:

  --force-version <VERSION>  Use a specific library version.
  --versions                 Show the available versions.
  --commands                 Show the available commands.
Use 'ign help <command>' to print help for a command.

But then for several of this commands, the execution failed with with error like:

(igntools) C:\Users\STraversaro>ign plugin
Traceback (most recent call last):
        2: from C:/Users/STraversaro/AppData/Local/mambaforge/envs/igntools/Library/bin//ign:274:in `<main>'
        1: from C:/Users/STraversaro/AppData/Local/mambaforge/envs/igntools/Library/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
C:/Users/STraversaro/AppData/Local/mambaforge/envs/igntools/Library/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- C:/Users/STraversaro/AppData/Local/mambaforge/envs/igntools/Library/lib/ruby/ignition/cmdplugin1 (LoadError)

The problems seems that in many cases, even if the installation of the cmd<> ruby script is disable, the yaml file describing the ign-tool plugin is installed anyway.

This problem seems to affect the following repos:

Implementation suggestion

Probably for all this projects a single options should control the installation of both the yaml and rb ign-tools-related files.

Additional context

Even if strictly speaking this is not an ign-tools issue, I preferred to open an issue in ign-tools as the details of the issues affecting those repos are the same.

scpeters commented 2 years ago

I think both files should always be installed. For ign-plugin, there was a problem on windows, so the src/cmd folder was skipped in https://github.com/ignitionrobotics/ign-plugin/pull/38. We can fix the underlying issue using the change from https://github.com/ignitionrobotics/ign-tools/pull/65

scpeters commented 2 years ago

fix for ign-plugin in https://github.com/ignitionrobotics/ign-plugin/pull/63

chapulina commented 2 years ago

As part of https://github.com/gazebo-tooling/release-tools/issues/472 we've been updating all libraries to always install the files needed by gz-tools.

traversaro commented 9 months ago

[ ] ign-msgs

This will be fixed by https://github.com/gazebosim/gz-msgs/pull/402 .

traversaro commented 9 months ago

[ ] sdformat (see https://github.com/ignitionrobotics/sdformat/blob/c9494fbeaa36f45f085921f2b509a4074f3984ca/conf/CMakeLists.txt and https://github.com/ignitionrobotics/sdformat/blob/c9494fbeaa36f45f085921f2b509a4074f3984ca/src/CMakeLists.txt#L255)

Fixed by https://github.com/gazebosim/sdformat/pull/1339 .