Skip to content

some exporters clobber .mbedignore file #5989

@bmcdonnell-ionx

Description

@bmcdonnell-ionx

Description

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions