-
Notifications
You must be signed in to change notification settings - Fork 8.9k
edtlib: fix phandle edge circular dependency #106226
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
Open
ifx-rmcs
wants to merge
2
commits into
zephyrproject-rtos:main
Choose a base branch
from
ifx-rmcs:ifx_pse84_edtlib
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+84
−19
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm guessing that the test won't pass without the edtlib patch, but this is exactly the sort of thing that we intend to capture as a circular dependency. I know that there are some unpleasant limitations in our current approach, but this is not something I am open to revisiting in a piecemeal fashion, use-case-by-use-case, like is being done here.
For now I would suggest refactoring your DT to avoid this. If you want to re-start the larger conversation about how zephyr tracks DT dependencies, I would request that you file a much more detailed report and plan. It would be a stability and maintainability nightmare in my opinion if zephyr had subtle but minor differences in how it managed DT dependencies between releases, which is the path we are going down if we start to merge PRs like this one.
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, I am currently working around this issue by placing my DT in a way that it doesn't encounter the circular dependency. This PR is to improve the end user experience. I figured that generalizing the existing solution for the Ethernet would be beneficial for others also.
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.
This doesn't improve the end user experience in my opinion. It seems to directly contradict our specification for how dependencies are supposed to work:
https://docs.zephyrproject.org/latest/build/dts/api/api.html#inter-node-dependencies
I understand your idea but please close this PR if you don't have the resources to try to tackle the more general problem
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.
It looks to me like the existing Ethernet phy-handle is a piecemeal or a case-by-case solution. Perhaps I don't understand the general issue related to circular dependency and the test I added is too specific? I can close the PR if there's some other bigger picture I'm not seeing.
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.
Part of the bigger picture that I'm referring to is that this PR seems to completely break the algorithm we have documented for how dependency tracking is meant to work. If that's not clear, let's just close this for now. Thanks for your contribution but changes to this code have a huge blast radius and I don't believe you've worked through the details enough for me to accept this. I appreciate your effort, though.