ros / roscpp_core

ros distribution sandbox
89 stars 116 forks source link

MessageEvent constructors without connection information #22

Open dirk-thomas opened 10 years ago

dirk-thomas commented 10 years ago

The MessageEvent constructors not receiving connections header are "evil". I tried to remove them in #21 before but could not get rid of all code which uses it (therefore they have been reintroduced).

But in two cases that already backfired. Two code parts which worked before behaved wrong (silently having empty connection header) which was difficult to spot:

In both cases with the "evil" MessageEvent constructors present the code compiles but does not work correctly due to the missing connection info. When the two constructors are commented out the code fails to build. I worked around that with the two commits referenced above.

But this should not be necessary. I think the templated functions for subscribing to topics should deal with this problem and avoid the usage of the "evil" constructors without requiring the commited hacks.

dirk-thomas commented 10 years ago

@esteve @tfoote @wjwwood Any support is highly appreciated. We should be able to remove these "evil" constructors and also not require the above referenced commits (aka. hacks).

kalectro commented 8 years ago

Is anybody still working on this?

dirk-thomas commented 8 years ago

The milestone descriptions says:

It is unlikely that the maintainers will have time to address these issues. Please provide pull requests if you want these issues to be addressed.

cwecht commented 5 years ago

What about deprecating these constructors? This would make it easier to spot the places, where they are used without breaking any code all of a sudden.

peci1 commented 1 year ago

What about deprecating these constructors?

I don't think that's possible in an already released distro. Some packages take warnings as build errors, so we can't add any.