-
Notifications
You must be signed in to change notification settings - Fork 321
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
zephyr: namespace the generated version.h
- take 1
#8459
base: main
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch?
|
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.
Change looks good, but I wonder @ycsin if we could introduce this incrementally? We have Zephyr use SOF as a submodule, but we also have SOF mainline using Zephyr as a module (sof/west.yml), so we have dependencies both ways, so changes like these are not easy to get through.
There will be a new compatibility Kconfig that allows the use of legacy path in the Zephyr PR, does that address your concern? |
@ycsin wrote:
But there's a chichen and egg problem. Most of our CI fails for this PR as the Zephyr version does not have zephyr/version.h. Hmm, possible options:
|
80c5ecc
to
c74f38d
Compare
This won't work as the version macros require the header, another chicken & egg
Yet another 🐔 & 🥚 issue, the process to update the header paths in Zephyr is to update the paths in the affected modules first 😅 The |
c74f38d
to
d7b189a
Compare
#include <version.h> | ||
#include <zephyr/kernel.h> |
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.
why are you removing kernel.h?
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.
oops, copy paste error
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.
fixed
test this please |
1e3321c
to
263c63e
Compare
force pushed to amend author info |
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.
Thanks @ycsin ! This looks better now. Our CI tests that take the Zephyr main fail -- not sure why yet, I thought the version.h location has not changed.
Aa, this was just merged to main:
Explains the fail in https://github.com/thesofproject/sof/actions/runs/6810140232/job/18519160165?pr=8459 |
@fabiobaltieri I was going to use that Kconfig here for compatibility, should I create that Kconfig in EDIT: Added a Kconfig in the |
263c63e
to
478cf01
Compare
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.
Thanks @ycsin , this works!
478cf01
to
d687e96
Compare
force pushed to add the license identifier to the newly added |
@marc-hb good for you ? |
d687e96
to
1da3433
Compare
not sure what's wrong with the |
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.
Aa, this was just merged to main:
commit 702399080e94131c
Thanks @ycsin for fixing the build but please add references to the corresponding Zephyr changes in the commit message, that's the least the commit message requires.
Yet another 🐔 & 🥚 issue, the process to update the header paths in Zephyr is to update the paths in the affected modules first 😅
It should be easy enough to solve this sort of problem with a branch. We don't care if SOF CI does not build on a temporary branch.
Please don't add a new Kconfig just to solve a temporary chicken-and-egg problem, that's really not what Kconfig is for.
@marc-hb good for you ?
I'm afraid I wasn't copied on this.
Now I found the giant ... which finally gave me some better understanding. Please refer to it in this commit message, no one should have to search for this. I don't see any zephyr/west.yml change in that 63973 (yet?) but I assume it is why you're submitting this PR 8459 to the sof/main branch, correct? But zephyr/west.yml does not have to point at the SOF main branch: https://docs.zephyrproject.org/latest/develop/modules.html#allowed-practices
Emphasis mine. I also found zephyrproject-rtos#31 by sheer chance. It is of course preferred to minimize differences with upstream but there are plenty of exceptions and I think this is one of them. See other exceptions there: This PR 17 exception is funny enough! If zephyr/sof PR 31 is not possible for some reason, then @kv2019i can you please create some new transition branch https://github.com/thesofproject/sof/commits/version-h-migration or with some better name? This is a pure branching problem, let's please not add unnecessary and temporary Kconfig complexity to solve it. Git should be enough. |
@marc-hb Hmm, I don't fully get why this PR is such a big problem. But zephyrproject-rtos#31 is ok to me as well. Based on the comments, @dbaluta , this is probably ok for you if we sign up to cherry-pick when we uprev to newer Zephyr...? |
It's a problem because when the build breaks (and it will for some people, this is a backwards incompatible change), the answer from 1st level support (me among others) should be as simple as "run west update" and walk away. It should not involve inspecting every user's .config file or any other unnecessary Kconfig acrobatics. That's not what Kconfig is designed for and the extra complexity is not needed here, west is enough. Let's keep it simple with everyone and everything on the same configuration. |
@marc-hb Still not fully convinced as the Kconfig settings come from version-control as well, so west update will have similar effect. Also zephyrproject-rtos#31 will create a similar flag day and once the change is merged to Zephyr, you cannot go forward/backward unless you cherry-pick/drop the needed patch to SOF. Oh well, I'm good with zephyrproject-rtos#31 approach, can we proceed with that @ycsin ? |
Removing from v2.8 milestone as this is completely tied to the Zephyr upstream change and we'll have to make the change in tandem anyways. Whether that happens before or after v2.8 branch, has no impact on the release. |
version.h
version.h
- take 1
I can imagine how a new Kconfig could help with some corner cases, but I prefer not to. Let's keep it simple with less flexibility and less complexity.
I don't think anyone asked for #8502. I think we were all asking to just re-open zephyrproject-rtos#31 and that's all. |
1da3433
to
ce4a18e
Compare
Zephyr's build time generated headers are now in the `zephyr` to provide proper namespace, update the path accordingly. See ZephyrProject upstream PR at: zephyrproject-rtos/zephyr#63973 Signed-off-by: Yong Cong Sin <[email protected]>
ce4a18e
to
419f008
Compare
I don't understand why you just pushed this, this is confusing. Please use zephyrproject-rtos#34 (which replaced 31 for some unknown reason) to resolve compilation issues entirely on the https://github.com/zephyrproject-rtos side, NOT involving https://github.com/thesofproject/ yet. Only after everything is merged and passing on the https://github.com/zephyrproject-rtos side, then we will look at the thesofproject side. Backwards-incompatible changes have always been (successfully) deployed like this. |
Sorry, I probably got confused myself 😅 |
Zephyr's build time generated
version.h
is now in thezephyr
to provide proper namespace, update the includes of this module accordingly.See zephyrproject-rtos/zephyr#63973