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

Cleanup pass removing deprecated reactor-body APIs #353

Merged
merged 28 commits into from
Feb 13, 2024
Merged

Conversation

edwardalee
Copy link
Contributor

@edwardalee edwardalee commented Feb 10, 2024

This PR removes old, deprecated API macros originally used in early versions of the C runtime in reaction bodies. This enables substantial code simplification and clarification. Specifically, the following macros are removed:

  • SET (use lf_set)
  • SET_ARRAY (use malloc/calloc + lf_set_array)
  • SET_NEW (use malloc/calloc + lf_set or lf_set_token)
  • SET_NEW_ARRAY (use malloc/calloc + lf_set_array)
  • SET_PRESENT (use lf_set_present)
  • SET_TOKEN (use lf_set_token)
  • SET_MODE (use lf_set_mode)

This PR also fixes a bug (see #352). A companion PR in lingua-franca updates tests that had been using the deprecated API.

Some API functions have also been removed:

  • get_current_tag (use lf_tag)
  • get_elapsed_physical_time (use lf_time_physical_elapsed)
  • error_print_and_exit (use lf_print_error_and_exit)

@edwardalee edwardalee marked this pull request as ready for review February 12, 2024 19:35
@edwardalee
Copy link
Contributor Author

This PR is ready for review. There is a companion PR in lingua-franca that requires a further companion review in the benchmarks repo in order to get all tests to pass.

Copy link
Collaborator

@erlingrj erlingrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, just some tiny comments

include/core/reactor.h Show resolved Hide resolved
include/api/schedule.h Show resolved Hide resolved
include/api/reaction_macros_undef.h Outdated Show resolved Hide resolved
include/api/reaction_macros_undef.h Outdated Show resolved Hide resolved
include/api/reaction_macros.h Outdated Show resolved Hide resolved
include/api/reaction_macros.h Outdated Show resolved Hide resolved
edwardalee and others added 5 commits February 13, 2024 03:06
Co-authored-by: erling <erling.jellum@gmail.com>
Co-authored-by: erling <erling.jellum@gmail.com>
Co-authored-by: erling <erling.jellum@gmail.com>
Co-authored-by: erling <erling.jellum@gmail.com>
@edwardalee edwardalee merged commit 153825c into main Feb 13, 2024
28 checks passed
@edwardalee edwardalee deleted the cleanup-pass branch February 13, 2024 15:54
@lhstrh
Copy link
Member

lhstrh commented Feb 13, 2024

Since these are breaking changes, this suggests that the next version will be 1.0.0...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants