I have tried variations of ._*.* and similar as found on this forum, but nothing works.
I have the carloop directory as a submodule in my git repository. As such, I do not want to delete the examples, I simply want to ignore them.
I am currently building with particle compile e . and it shows me that the .cpp files in the carloop/firmware/examples directory are being flattened and added to the compilation step, which causes it to fail.
Please let me know what I am doing wrong and what needs to happen for these files to be ignored properly.
Another interesting thing to note: if I remove everything except main.ino from the particle.include file, the CLI tool still recurses and finds all the files automatically. Perhaps this is related to why particle.ignore is being, well, ignored.
I was about to ask this same question. I’ve updated the particle CLI to the latest version. I get the feeling that the CLI is not observing the particle.include and particle.ignore files at all.
I found this code:
but I haven’t been able to track down if that code is getting used from the CLI.
@TylerB a short term workaround is to pass every desired file from your include to the command line, though this doesn’t observe the ignore file, and doesn’t allow wildcards in the .include. But hey, better than nothing:
It seems that particle cli compilation still does not honour .particle.include and .particle.ignore
Is it meant to?
This is part of me coming to grief with this compilation return:
Compile failed. Exiting.
Server error
My thinking was that it was due to my locally copied Particle supplied libraries which have source in lib/examples// being the problem (but it is not because I have removed these sub-dirs and still the same result). This will be the subject of another ticket....
particle compile rather uses project.properties files now.
To create a project with the correct layout you can use particle project create and to add libraries you can use particel library add or particle library copy
AFAIK the “new” behaviour is that only *.cpp/*.h files in the src and lib folder will be included in the build and directory flattening is not required anymore. #include statements for libraries either referenced via dependencies (in project.properties via particle library add or in their lib subdirectory) shall not contain the library path but only the <libraryName>.h.
If you copy a library previous versions of CLI had an issue with the examples and <libraryName> folder. I’m not sure if this bug is already cured, but you can just remove these folders from the copies.
ie it looked like the examples sub-dir under a library was being compiled, but from what you have indicated (and the evidence now that I look at it), it is not (good).
Same thing with the following. I have a work in progress sub-dir "wip" at the top which gets pushed to the repo, but I don't want it compiled per se, but get lines like this with the compile:
wip/anothersubdir/another.cpp
I will call this case closed (noting that I did not open this case).