gazebosim / gazebosim/sdformat

Changes to sdf::ParamPrivate should not break ABI

Open
#773 0 comments 1 reaction 0 assignees View on GitHub
enhancement help wanted
Dominant language
C++
Stars
216
Forks
125
Avg merge
1d 14h
Merged PRs (30d)
14

Description

## Desired behavior
Per the Pimpl idiom, one would expect changes to the `sdf::ParamPrivate` class to not break ABI, but
since the class is in a public header (`Param.h`) and since it's members are used in function templates of `sdf::Param`, any changes made to `sdf::ParamPrivate` could break ABI.

This is similar to https://github.com/ignitionrobotics/sdformat/issues/607

## Alternatives considered
n/a

## Implementation suggestion
Provide accessor functions in `sdf::Param` so that the function templates do not need direct access to `dataPtr`. Then we can move `sdf::ParamPrivate` to `Param.cc`. This would be a breaking change, so it will have to target the `main` branch.

Contributor guide

Open the contributing guide

Research direction

Start by reading Param.h and tracing how the function templates of sdf::Param access dataPtr in sdf::ParamPrivate. Use the proposed Param.cc move and accessor functions as the scope; the work is done when ParamPrivate is no longer exposed through the public header without breaking the intended ABI.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.