Skip to content

change naming of defines to include namespace #18

Closed

Description

@dirk-thomas

The currently defined macros to log messages (e.g.

#define logWarn(fmt, ...) console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_WARN, fmt, ##__VA_ARGS__)
) are much to generic and collide with existing code. The should be prefixed with the package name to make them unique.

Even if this is a significant API change this should be fixed. Likely bumping more then just the patch version number.

Activity

  1. scpeters commented on Oct 12, 2015

    @scpeters
    Contributor

    So, for example, you would like the logWarn macro to change to something like CONSOLE_BRIDGE_logWarn?

  2. scpeters commented on Dec 9, 2015

    @scpeters
    Contributor
  3. dirk-thomas commented on Dec 9, 2015

    @dirk-thomas
    MemberAuthor

    Yes, prefixing all functions with console_bridge_ and macros with CONSOLE_BRIDGE_ would namespace those to prevent collisions.

  4. added 3 commits that reference this issue on Dec 9, 2015
    0bead6e
    87c6893
    7b4da66
  5. wjwwood commented on Jan 26, 2016

    @wjwwood
    Member

    What remains to be done here? It looks like @scpeters has at least added the new macros as an alternative?

  6. scpeters commented on Jan 26, 2016

    @scpeters
    Contributor

    Yeah, the new macros have been added, and the old ones are deprecated but still present. I was waiting to close this until the next version is released with the old macros redacted.

  7. wjwwood commented on Jan 26, 2016

    @wjwwood
    Member

    Sounds good to me.

  8. mikaelarguedas commented on Nov 16, 2017

    @mikaelarguedas
    Member

    @scpeters friendly 🔔 Is there still a plan to release a new version with the deprecated macros removed?

  9. scpeters commented on Nov 16, 2017

    @scpeters
    Contributor

    should we call it a 1.0?

  10. mikaelarguedas commented on Nov 16, 2017

    @mikaelarguedas
    Member

    Hmmm that's a good question, given the ros namespacing constraints I usually do only minor and patch releases even when breaking API. As this package is submitted upstream and not tied to a given distribution I think it would make sense to bump the major.
    Maybe @tfoote or @dirk-thomas can give feedback on this as well

  11. dirk-thomas commented on Nov 16, 2017

    @dirk-thomas
    MemberAuthor

    Following semver it should be at least 0.4 since it breaks API.

  12. scpeters commented on Nov 16, 2017

    @scpeters
    Contributor

    It depends on your interpretation of semantic versioning. We are extra strict in gazebo to bump major version if API or ABI changes.

    It's worth noting that the config version file uses COMPATIBILITY SameMajorVersion.

    But I'll defer to you.

  13. wjwwood commented on Nov 16, 2017

    @wjwwood
    Member

    Also:

    Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

    -- http://semver.org/#spec-item-4

  14. scpeters commented on Nov 16, 2017

    @scpeters
    Contributor

    That's a fair point. I take it that most are in favor of 0.4? If so I'll make a PR that bumps the version and removes the deprecated macros.

  15. scpeters commented on Nov 16, 2017

    @scpeters
    Contributor

    see #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions