Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use consistent parameter order of (before, after) throughout update APIs #1293

Open
rmunn opened this issue Nov 29, 2024 · 2 comments · May be fixed by #1303
Open

Use consistent parameter order of (before, after) throughout update APIs #1293

rmunn opened this issue Nov 29, 2024 · 2 comments · May be fixed by #1303
Assignees
Labels
📖 MiniLcm issues related to miniLcm library code, includes fwdat bridge and lcmCrdt

Comments

@rmunn
Copy link
Contributor

rmunn commented Nov 29, 2024

Currently most of the update APIs use the parameter order (before, after), but there are some that have the order (after, before). Since these parameters are the same type the compiler won't be able to catch it if we accidentally call them with (before, after) and we'll get runtime bugs where an update gets applied in the "wrong direction". We should make the update APIs consistent so that any APIs that take (before, after) or (old, new) parameters always take them in the same order.

@rmunn rmunn self-assigned this Nov 29, 2024
@rmunn
Copy link
Contributor Author

rmunn commented Nov 29, 2024

Currently #1267 is still outstanding, so I'd like to wait until it's merged before tackling this. That way we'll minimize the chances of bugs being introduced by merge conflict resolutions.

@rmunn
Copy link
Contributor Author

rmunn commented Dec 3, 2024

Going to start working on this using #1295's branch as a base, then rebase to develop when #1295 is merged.

@rmunn rmunn linked a pull request Dec 4, 2024 that will close this issue
@hahn-kev hahn-kev added the 📖 MiniLcm issues related to miniLcm library code, includes fwdat bridge and lcmCrdt label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 MiniLcm issues related to miniLcm library code, includes fwdat bridge and lcmCrdt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants