Skip to content

Conversation

@erhankur
Copy link
Collaborator

@erhankur erhankur commented Oct 11, 2025

Dependency inverted as common to target. Now flow will be like this:

Entry Point (src/)
    ↓
Common (generic target implementations with weak functions)
    ↓
Target (overridden weak functions for target specific implementations)
    ↓
Base (interface headers only serves both common and target)

Common code can now use target specific headers like <soc/soc.h> to implement generic functions once instead of duplicating across 13+ targets

@github-actions
Copy link

github-actions bot commented Oct 11, 2025

Messages
📖 This PR seems to be quite large (total lines of code: 1516), you might consider splitting it into smaller PRs

👋 Hello erhankur, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Addressing info messages (📖) is strongly recommended; they're less critical but valuable.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 709ef1e

@erhankur erhankur mentioned this pull request Oct 11, 2025
6 tasks
@erhankur erhankur force-pushed the dependency_inversion branch from a35e5f7 to e4c17cf Compare October 11, 2025 22:15
Copy link
Collaborator

@dobairoland dobairoland left a comment

Choose a reason for hiding this comment

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

LGTM

@erhankur erhankur force-pushed the dependency_inversion branch from e4c17cf to dfc804e Compare October 12, 2025 20:19
@Dzarda7
Copy link
Collaborator

Dzarda7 commented Oct 13, 2025

LGTM, thanks, left one comment. This is what I had in mind, we can also limit some supported functions by using target capabilities without adding circular dependency now IIUC, still would like to avoid ifdefs, but it is possible.

@antmak
Copy link
Collaborator

antmak commented Oct 14, 2025

This structure looks good!

Sorry for nit-picking, just to get better README. Which the three layers do you mean? I found lists with 4 items.

@erhankur erhankur force-pushed the dependency_inversion branch from afff630 to 709ef1e Compare October 14, 2025 13:59
@erhankur
Copy link
Collaborator Author

This structure looks good!

Sorry for nit-picking, just to get better README. Which the three layers do you mean? I found lists with 4 items.

Base is not a physical layer. Interface for common and target.

srs --> common --> target
           |         |
         base       base

Readme is updated to clarify private folder purpose.

@erhankur
Copy link
Collaborator Author

Thanks everyone for reviews.

@erhankur erhankur merged commit dd8dc00 into master Oct 14, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants