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 more explicit include guards for Arduino #2102

Merged
merged 2 commits into from
Nov 12, 2023
Merged

Use more explicit include guards for Arduino #2102

merged 2 commits into from
Nov 12, 2023

Conversation

petervdonovan
Copy link
Collaborator

@petervdonovan petervdonovan commented Nov 11, 2023

I believe that this is only a problem for Arduino because Arduino brings in header files that are not actually #included. This solution is a little bit of a hack because it should not be necessary to add this extra #ifndef, but it solves the problem and it should be mostly harmless for users who do not target Arduino.

Closes #2062. Note that the test case originally used in #2062 would not have worked because Arduino Uno does not have enough memory for our runtime.

@petervdonovan petervdonovan requested a review from lhstrh November 11, 2023 06:49
I believe that this is only a problem for Arduino because Arduino brings
in header files that are not actually #included. This solution is a
little bit of a hack because it should not be necessary to add this
extra #ifndef, but it solves the problem and it should be mostly
harmless for users that do not target Arduino.
@lhstrh
Copy link
Member

lhstrh commented Nov 11, 2023

It's a clever solution! I like it! It might be worth also generating a comment explaining the use of this extra include guard...

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

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

👍 Very nice!

@lhstrh lhstrh added this pull request to the merge queue Nov 12, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2023
@lhstrh lhstrh added this pull request to the merge queue Nov 12, 2023
Merged via the queue into master with commit b17c3d6 Nov 12, 2023
41 checks passed
@lhstrh lhstrh deleted the arduino-fix branch November 12, 2023 05:37
@lhstrh lhstrh added enhancement Enhancement of existing feature bugfix labels Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix enhancement Enhancement of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate Structure Names causes Inability to Compile Composed Reactors for Arduino
2 participants