-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Description
- Type: Bug (arguably)
- Related issue: mbed deploy does not respect .mbedignore mbed-cli#378 (comment)
- Priority: Minor
Some exporters (e2studio
, gnuarmeclipse
, and mcuxpresso
, I think) overwrite the .mbedignore
file, leaving no apparent way to generate an IDE project that has user-defined files excluded from the build.
Here's why I think it's just those three:
/path/to/myproj/mbed-os/tools/export
$ grep -R --binary-files=without-match mbedignore . | grep \.py
./e2studio/__init__.py: self.gen_file('gnuarmeclipse/mbedignore.tmpl', jinja_ctx, '.mbedignore')
./gnuarmeclipse/__init__.py: self.gen_file('gnuarmeclipse/mbedignore.tmpl', jinja_ctx, '.mbedignore')
./mcuxpresso/__init__.py: self.gen_file('mcuxpresso/mbedignore.tmpl', jinja_ctx, '.mbedignore')
Bug
mbed-cli version:
1.3.0
mbed-os sha:
96d9a00 (tag: mbed_lib_rev158, tag: mbed-os-5.7.3) Merge pull request #5841 from ARMmbed/release-candidate
Expected behavior
Adding files to .mbedignore
causes them to be excluded from the build in any offline IDE for projects created by mbed export
.
Actual behavior
Some exporters overwrite the .mbedignore
file, so anything added to it by the user is overwritten, thus not ignored.
Steps to reproduce
mbed new demoproj
cd demoproj
touch ignore-me-please.cpp
echo ignore-me-please.cpp > .mbedignore
echo .mbedignore before export:
cat .mbedignore
# try with -i {e2studio, gnuarmeclipse, mcuxpresso}
mbed export -m LPC4088 -i mcuxpresso
echo .mbedignore after export:
cat .mbedignore