Skip to content

Add dependency checks to components #8875

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

Merged
merged 4 commits into from
Dec 11, 2018

Conversation

deepikabhavnani
Copy link

Description

Build dependency for components was not captured i.e. in case Network feature / RTOS is disabled (added to .mbedignore list), the build breaks. Resolving build issues in this PR.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@theotherjimmy
Copy link
Contributor

@0xc0170 No python was changed in the making of this PR. Why does it need tools input?

@deepikabhavnani
Copy link
Author

deepikabhavnani commented Nov 27, 2018

No python was changed in the making of this PR. Why does it need tools input?

May be my headline is confusing ?

@deepikabhavnani deepikabhavnani removed the request for review from a team November 27, 2018 16:08
@deepikabhavnani deepikabhavnani changed the title Add dependency checks to component build Add dependency checks to components Nov 27, 2018
@cmonr
Copy link
Contributor

cmonr commented Nov 27, 2018

@deepikabhavnani Can you rebase this to see if the continuous-integration/travis-ci/push disappears?

Deepika added 3 commits November 27, 2018 13:55
"ns_types.h" is not used, but included. Results in build failure when networking
feature is ignored with .mbedignored

"mbed_trace.h" not used.
"ns_types.h" results in build failure when networking feature is ignored with
.mbedignored. ESP8266 component should be enabled only when NSAPI is present.
…present

Build failures were observed when rtos is ignored with .mbedignored.
Components dependent on RTOS should be guarded with MBED_CONF_RTOS_PRESENT
@deepikabhavnani
Copy link
Author

Can you rebase this to see if the continuous-integration/travis-ci/push disappears

Yes it does. Thanks

@0xc0170 0xc0170 requested a review from SeppoTakalo November 28, 2018 13:10
Copy link
Contributor

@SeppoTakalo SeppoTakalo left a comment

Choose a reason for hiding this comment

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

Why cannot the non-RTOS build skip the whole components directory?

I don’t like this #ifdeffing because of one legacy feature.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 29, 2018

Why cannot the non-RTOS build skip the whole components directory?

We always do this config check for mbed 2. @ARMmbed/mbed-os-tools Please review

I don’t like this #ifdeffing because of one legacy feature.

True, ifdef is not be ideal but that is current approach. We will have something different in future.

@SeppoTakalo
Copy link
Contributor

But it is not the current way... At least not the only one.

Currently we exclude quite a many folder from non-rtos builds. See:
https://github.com/ARMmbed/mbed-os/blob/master/.travis.yml#L177

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 29, 2018

I see your point (this is using .mbedignore folder (user's task to add to some folders and in the scripts actually remove the folders). We will come up with better solution.

@deepikabhavnani this should follow what we have for features, shouldn't it ? Leave it as it is, and use .mbedignore folder (update our docs to reflect this, I recall there is at least a blog about this how to compile without rtos)

@deepikabhavnani
Copy link
Author

Currently we exclude quite a many folder from non-rtos builds.

That is done to test event queues without RTOS. And practically user should be able to remove just RTOS and still build without breaking anything, since we are not capturing dependencies correctly we have to remove so many folders, this is the side effect. Event queue examples should work by just removing rtos rm -r rtos.

update our docs to reflect this, I recall there is at least a blog about this how to compile without rtos

We cannot cover all combinations in docs. Users can have storage (feature+compoents) and other features even when RTOS is disabled but not network.

Trying to address these issues :#7800
#7889

True, ifdef is not be ideal but that is current approach. We will have something different in future.

For now this is the solution we have. We also need to address it in feature (network / green tea) which I will do after this.

@SeppoTakalo
Copy link
Contributor

We cannot cover all combinations in docs. Users can have storage (feature+compoents) and other features even when RTOS is disabled but not network.

This is not acceptable.
You are on other hand assuming that developers who have never worked with Mbed 2, would magically know the rules implied by this RTOS removal. And even without documenting it. Where is this rm -r rtos documented?

And on the other hand, you are placing requirements into teams that are not approved by product managers. This is rtos-less requires support, resources. We cannot spend resources without approval.

@0xc0170 0xc0170 requested a review from bulislaw November 30, 2018 08:41
@deepikabhavnani
Copy link
Author

@SeppoTakalo - Changes here are not related to non RTOS build or rm -rf in CI, which is not correct way of testing and hence not documented as well.

Changes here are related to documented .mbedignore feature. Build breaks when feature/network is added to .mbedignore. Also if we disable SERIAL in device_has we see build errors.

Changes are inline to your previous commits, just adding a few missed dependencies.

PelionIoT/atmel-rf-driver#59
#8327

@SeppoTakalo
Copy link
Contributor

Changes here are related to documented .mbedignore feature.

Where are these documented?

I think I tried to raise this point earlier.. If there is one documented way, why does the CI do this differently?

@SeppoTakalo
Copy link
Contributor

@artokin We need to pull in these changes to the Atmel driver repository as well.

@deepikabhavnani
Copy link
Author

Where are these documented?

https://os.mbed.com/docs/v5.10/tools/ignoring-files-from-mbed-build.html

I think I tried to raise this point earlier.. If there is one documented way, why does the CI do this differently?

Not sure why, we can definitely ignore folders using .mbedignore instead rm

@cmonr
Copy link
Contributor

cmonr commented Dec 10, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 11, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

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.

7 participants