Skip to content

Arduino builder compiles hidden directories #139

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

Open
NicoHood opened this issue May 1, 2016 · 3 comments
Open

Arduino builder compiles hidden directories #139

NicoHood opened this issue May 1, 2016 · 3 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@NicoHood
Copy link

NicoHood commented May 1, 2016

I sometimes need to move my code somewhere else to back it up for a huge api change. I wish I could use a .old folder for this, but arduino builder still compiles those files.

Example error:
/Arduino/sketchbook/libraries/IRLremote/src/.old/IRLremoteReceive.hpp:141:29: error: 'dataNec' was not declared in this scope

I guess the fix is quite simple, as only hidden folders has to be excluded from compiling/linking.

@matthijskooijman
Copy link
Collaborator

I was actually working on a refactor of some of the compilation steps that actually changed exactly this. I'll make sure to reference this issue from my PR when I'm done :-)

matthijskooijman added a commit to matthijskooijman/arduino-builder that referenced this issue May 18, 2016
This is a new helper function that takes care of listing files with
given extensions in a directory, recursively or non-recursively. This
functionality was previously duplicated in a few places. This new helper
function now replaces some duplicate code in SketchLoader and
CollectAllSourcesFilesFromFoldersWithSources. Compilation of code in the
core and libraries still uses two other mechanisms for listing files (in
builder_utils), which will later be converted to use this new helper
function too.

This new helper function has some subtle differences compared to the
previous code:
 - The new code raises an error when the root directory does not exist,
   which the CollectAllSourcesFilesFromFoldersWithSources code did not
   do. To compensate for this, LibraryToSourceFolder will only return
   the "utility" folder when it exists.
 - The new code completely ignores any hidden or source control folders
   or files. Originally, arduino-builder showed a warning when source
   control or hidden folders were present, and then compiled files
   inside of them anyway. Since f5edd23 (Avoid warning about SCCS folders
   in libraries, just ignore them) this warning is no longer shown in
   most cases, but the files themselves are still included in
   compilation. With this commit, they are just completely ignored
   instead (for sketch compilation and include detection, for core and
   library compilation they will are still used). See also arduino#139.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
@cmaglie cmaglie added this to the 1.3.19 milestone May 23, 2016
@cmaglie
Copy link
Member

cmaglie commented May 23, 2016

Fixed with 405a24a

@matthijskooijman
Copy link
Collaborator

Nope, this wasn't fixed by that.

@cmaglie cmaglie removed this from the 1.3.19 milestone Aug 1, 2016
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Oct 14, 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: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

4 participants