Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore build directory from scan resources #3852

Merged
merged 4 commits into from
Mar 9, 2017

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Feb 28, 2017

This is a bug fix for the following bug (Github issue ARMmbed/mbed-cli#437):

If two builds were run specifying a non-default build folder, the second
build would fail to link with duplicate symbols and may not fit on the
device. The root of this problem is that these non-default build folders
are not ignored by scan-resources, and therefore included in the build.

We fix this bug by ignoring the build directory passed into the tools.

@screamerbg
Copy link
Contributor

Can't we have build for as param to scan resources and defaulting to None if not specified?

This will make it backwards compatible and also won't throw nasty python error if build dir is not assigned before scan resources

@theotherjimmy
Copy link
Contributor Author

Build dir is assigned in the constructor

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 6, 2017

Build dir is assigned in the constructor

Does that answer your question @screamerbg ?

@theotherjimmy
Copy link
Contributor Author

Hey @0xc0170 New implementation coming soon.

@theotherjimmy theotherjimmy force-pushed the ignore-build-dir branch 5 times, most recently from c17aea5 to 36736cf Compare March 6, 2017 18:15
@theotherjimmy
Copy link
Contributor Author

@screamerbg Could you review again?

@theotherjimmy theotherjimmy force-pushed the ignore-build-dir branch 4 times, most recently from 2997deb to 326a0e4 Compare March 6, 2017 23:10
This is a bug fix for the following bug (Github issue ARMmbed#437):

If two builds were run specifying a non-default build folder, the second
build would fail to link with duplicate symbols and may not fit on the
device. The root of this problem is that these non-default build folders
are not ignored by scan-resources, and therefore included in the build.

We fix this bug by ignoring the build directory passed into the tools.
The prior patch in this series makes the assumption that any building
will go through `build_api.prepare_toolchain`. This was not a valid
assumption for the mbed2 build process. So, instead of maintaining 2
ways of using the toolchain classes, I elected to unify on
`prepare_toolchain`.
An earlier patch in this series relies on the assumption that all
toolchain construction goes through `prepare_toolchain`. This is still
not the case. The only remaining user of the `mbedToolchain` object that
does not go through `prepare_toolchain` is the static analysis scanner.
It's basically dead-code at this point. I say we remove it. So this
patch removes it.
An earlier patch in this series changed the API for
`build_api.prepare_toolchain`. This commit updates the `find_test`
function to call `prepare_toolchain` correctly.
@theotherjimmy
Copy link
Contributor Author

This snowballed pretty good.

Copy link
Contributor

@screamerbg screamerbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! And you took care of some legacy mbed 2.0 routines. Sweet!

@screamerbg
Copy link
Contributor

/morph test

@mbed-bot
Copy link

mbed-bot commented Mar 7, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1650

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants