workaround for https://github.com/foxglove/rosmsg/issues/39 #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix
What is the current behavior? (You can also link to an open issue here)
foxglove/rosmsg mixes up types with the same name, which means that ros-typescript-generator generates incorrect interfaces. For a minimal example see
Types with same name are mixed up foxglove/rosmsg#39
What is the new behavior (if this is a feature change)?
When a message field's type is declared without an explicit package name, assume it refers to a type in the same package.
Other information:
This should probably be fixed upstream in foxglove/rosmsg, but their parser seems rather elaborate and I couldn't figure it out, so I reported the bug there and implemented this workaround here for the time being.