-
-
Notifications
You must be signed in to change notification settings - Fork 853
Closed
Labels
Milestone
Description
- PlatformIO Core.
If you’ve found a bug, please provide an information below.
Configuration
Operating system:
N/A
PlatformIO Version (platformio --version):
PlatformIO, version 3.5.4
Description of problem
When developing a library in default directory structure, setting srcFilter breaks build.
By default, $REPO_ROOT/src is the source directory, or src_dir. The code goes there. Everything is fine.
When srcFilter is set to whatever value, src_dir becomes $REPO_ROOT even if the value is +<*>.
Now #include <Foo.h> in the source must be modified to #include <src/Foo.h> since platformio cannot find the header. Or, all the files must be moved to $REPO_ROOT from src.
Steps to Reproduce
- Create
src/Foo.handexamples/foo/src/main.c - Include
<Foo.h>inmain.c - Set
srcFilterin, say,extrascript.py
Actual Results
examples/foo/src/main.c:13:24: fatal error: Foo.h: No such file or directory
Expected Results
The above logic is documented if this is a feature.
If problems with PlatformIO Build System:
The content of platformio.ini:
[platformio]
lib_dir = ../
src_dir = examples
[common]
upload_port = /dev/cuaU0
lib_deps =
https://github.com/BoschSensortec/BME280_driver.git#bme280_v3.3.4
[env:lolin32_espidf]
board = lolin32
platform = espressif32
framework = espidf
upload_port = ${common.upload_port}
lib_compat_mode = off
lib_ldf_mode = chain+
lib_deps = ${common.lib_deps}
; note that this src_filter works fine
src_filter = +<esp_idf/>Source file to reproduce issue:
# extrascript.py
Import("env")
# this one change the behavior
src_filter = ["+<*>"]
env.Replace(SRC_FILTER=src_filter)
Reactions are currently unavailable