Skip to content

Add api version namespaces#95

Open
pum1k wants to merge 2 commits intoctu-mrs:ros2from
pum1k:feat/api-version
Open

Add api version namespaces#95
pum1k wants to merge 2 commits intoctu-mrs:ros2from
pum1k:feat/api-version

Conversation

@pum1k
Copy link
Member

@pum1k pum1k commented Mar 12, 2026

This PR adds inline namespaces to allow choosing API version. By default, the v1 API is set to inline, thus staying API compatible (however, it breaks ABI).

Additionally, source files inside src that were not part of the mrs_lib shared library were moved to examples directory.

@matemat13
Copy link
Member

Is there a specific problem this PR is aiming to solve?

Also, please don't mix different changes in a single PR. I don't see a reason not to accept the file rearranging, but the API namespacing is unrelated and will probably need some discussion. Also, changing 99 files in one PR is a lot - especially if it's more than one potential change that needs to be checked in each file.

@pum1k
Copy link
Member Author

pum1k commented Mar 17, 2026

Is there a specific problem this PR is aiming to solve?

Yes, this allows additions of backwards incompatible changes without breaking current users. By using a new api version namespace, the two versions will not collide and can be selected by setting the MRS_LIB_API_VERSION macro. This solution chosen as better alternative to introducing another user facing namespace, such as mrs_lib2. I alredy briefly discussed this with @klaxalk, but I'm open to suggestions.

Also, please don't mix different changes in a single PR. I don't see a reason not to accept the file rearranging, but the API namespacing is unrelated and will probably need some discussion.

If you think it would be better to split these, I can open PR with the first commit only and this can be merged after with only the second commit.

Also, changing 99 files in one PR is a lot - especially if it's more than one potential change that needs to be checked in each file.

I don't think the rest can be split in some reasonable way as it is just adding namespace around everything.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants