-
Notifications
You must be signed in to change notification settings - Fork 2k
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
buildsystem: add EXTERNAL_PKG_DIRS functionality #17211
Conversation
From a quick look this looks very nice and consistent to how external modules are handled. Let's see if the CI likes this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, EXTERNAL_MODULES are handled separately then internal MODULES. This PR takes a similar approach but is as well doing other things:
- replacing current package dependency inclusion
- forcing internal packages to directories matching module name
Those two need more testing and IMO would be better be handled in individual PR's. I think it would be best to first add this functionality without touching how internal packages are handled.
Other than that it would be good to be sure that this works with docker as well.
I see. Thanks @benpicco and @fjmolinas for your comments. I'll take a closer look and try to do it more "the EXTERNAL_MODULES - way". The two other things you mentioned @fjmolinas are not intended (replacing dependency inclusion and forcing directory name). Seems like I was lucky to not run into those problems with native and board esp8266. Is there a way to run the checks / builds the CI / Murdock does locally? |
I'm not entirely happy with how I implemented it currently. I want to separate the make targets but also dont want to change too much like the first attempt. I know that it currently builds the external packages multiple times (second time calls make, but it is already up to date). @fjmolinas do you have any comments about this approach? |
Hi @NikLeberg I'm sorry for taking so long for getting back to you, some paper work and vacation got in the way. I took a second closer look at this. Regarding:
I now realize that I was wrong, this was already implicitly the case since rules where already doing something like But I still think it's better to split the change of using What do you think of opening a PR that only does the |
This one now needs a rebase! |
@leandrolanzieri how should we handle Kconfig for this one? Something like we did for EXTERNAL_MODULES? |
@fjmolinas I rebased and applied the relevant commits. Kconfig will fail in CI as it is not yet implemented, so to not waste Murdock time, could you remove the CI: ready for build label? |
I think that approach worked pretty well, I don't see why not take it also for this. |
@fjmolinas I found a bit of time anyway and played around with Kconfig. It seems that you also were the one that implemented it for the external modules with pr #16053 perfect! 😀 The way the external modules are handled in Kconfig confuses me a bit. It uses the make variabe Anyway with the lastest commit |
I think you caught that the test case was insufficient then..., when I made the PR #16053, #16104 was not yet in, so that test case was not addressed... Thanks for the catch
Looks good I think, could you add a test case in |
Thanks for the catch @NikLeberg I opened #17596 to fix, could you do something similar here in |
I extended |
Rebased. Kconfig now works on my machine. @fjmolinas Feel free to re-add the CI labels, I think code wise its done. |
Look good! Lets see what the ci thinks! |
CI had some unrelated issues, re-scheduling and lets see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All green here! Go! Thanks @NikLeberg!
Contribution description
The current buildsystem only allows packages residing inside the RIOT tree. For modules this is handled differently, those can be added from external directories with the
EXTERNAL_MUDULE_DIRS
variable. With this pull request I add the same mechanism of aEXTERNAL_PKG_DIRS
variable for packages outside of the RIOT tree. This mechanism can be used to separate RIOT and user supplied packages without cluttering the RIOT tree. Ultimately packages should be added to the RIOT upstream with a pull request. But with this mechanism one can develop more easily.This is a draft.
My goal is to get early feedback.@fjmolinas Provided some feedback (thanks!), which resulted in splitting of a part of these changes into pr #17551 that was sucessfully merged into master.
ToDo:
Testing procedure
I've ran
make static-test
with success.For precise test case similar to tests/external_module_dirs
I'll need a bit of guidance.I've managed to create a test based onriotgen test --interactive
and the mentioned similar testcase.Interested what the CI has to say about this...In my own project riot-tdd I'm using this functionality with no problems.
Issues/PRs references
resolves #15309
depends on pr #17551