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

include arduino_secrets when needed #438

Merged
merged 3 commits into from
Jul 8, 2021
Merged

include arduino_secrets when needed #438

merged 3 commits into from
Jul 8, 2021

Conversation

fstasi
Copy link
Contributor

@fstasi fstasi commented Jul 7, 2021

No description provided.

@fstasi fstasi requested review from ubidefeo and AlbyIanna July 7, 2021 14:34
@per1234
Copy link
Contributor

per1234 commented Jul 8, 2021

The only possible issue I found after a lot of testing of this change is that if you write something like this in the local sketch:

#ifndef SECRET_SOMETHING
#include "arduino_secrets.h"
#endif

(you might do this to allow the normal secret definition to be overridden via a -D compiler flag for automation or testing)

Then after a push and pull, it turns into this:

#include "arduino_secrets.h"
#ifndef SECRET_SOMETHING

#endif

It's reasonably common to use whitespace after the # of a preprocessor directive to provide indentation:

#ifndef SECRET_SOMETHING
#  include "arduino_secrets.h"
#endif

which turns into this after a push and pull:

#include "arduino_secrets.h"
#ifndef SECRET_SOMETHING
#  include "arduino_secrets.h"
#endif

But I think that it's unlikely for users will do something like this and also a lot of work to allow for something like this.

@fstasi fstasi merged commit 461ca06 into main Jul 8, 2021
@fstasi fstasi deleted the add-secrets-include branch July 23, 2021 13:01
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants