Excluding a ino file with src_filter

If I’ve two files in the src folder; file1.ino and file2.cpp and I set the src_filter flag like:

src_filter = -<file1.ino>

and then start to compile my project (PIO 3.4.1) It will created a file1.ino.cpp

shouldn’t PIO exclude the file from the InoToCPPConverter too?

@ivankravets ?

Could you change to

src_filter = -<file1.ino.*>

Does it work now?

P.S: Try to avoid using INO files.

Thanks, it has solved the problem!

I can avoid to use INO files, but will be always someone using it! :slight_smile:

I’m back, it didn’t solve the problem the file was being generated too fast that I didn’t notice this.

Note that, what I want is to avoid that file being generated, I’m testing a new feature in Deviot and I need to stop that behavior

But we need that file for compilation. We can’t compile INO file directly.

I’m not trying to compile the INO directly, I’m trying to excluding it from the compilation

The description of src_filter say:

This option allows to specify which source files should be included/excluded from build process.

So, the file will continue in the src folder but as the flag is set to -<file1.ino> it should be totally excluded from the build process, or I’m misunderstanding something?

We have some problem here. Users see file1.ino but PIO Build System sees file1.ino.cpp. Before you start a build process, we convert INO -> CPP on-the-fly. On the end of a process, we remove this temporary file. Maybe, we should add some note to docs?

This issue related just to INO files. You have to use -<file1.ino.cpp> or -<file1.ino*> in this case.