-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
scripts: edt: Add support for include property filtering #29498
scripts: edt: Add support for include property filtering #29498
Conversation
This implements the ideas from PR #29306 |
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.
Looks good, just a couple minor questions.
c1a4d4f
to
30b94ca
Compare
30b94ca
to
e61daea
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.
I'm fine with this approach
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
e61daea
to
d8d5b88
Compare
d8d5b88
to
3b07d7f
Compare
LGTM, should allow using enums on stm32 pinctrl |
3b07d7f
to
1c00312
Compare
dd62ba0
to
4f54d62
Compare
I've finished the TODO list on this PR. I reworked the tests since I think we can make sure this works at the edtlib.Binding level without having to touch DTS at all. I also changed this slightly so that you can intermix strings and maps in a single Please take another look. I'm going to +1 this even though that's kind of cheating. |
4f54d62
to
d1fab96
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.
I don't think the description is sufficiently clear on whether map elements can have both or neither of the lists.
Also "allowlist" vs "blocklist" doesn't seem a natural pairing. The coding guidelines sanction "allowlist/denylist" or "blocklist/passlist" or "rejectlist/acceptlist". Pick one.
Then the coding guidelines should be fixed. West uses these already and so does Chrome: https://9to5google.com/2020/06/12/google-android-chrome-blacklist-blocklist-more-inclusive/ They're in widespread use; just google them. I'm not going to change these names. |
d1fab96
to
51bf64e
Compare
wording fixed, still don't like the naming deviation. Zephyr doesn't use blocklist
.
I was present at all of the inclusive language meetings and I do not recall this ever being discussed at any of them, despite the fact that I mentioned that west was changing from whitelist/blacklist and had already chosen terms. I don't recall having my input requested in the coding guidelines PR you're referring to either. (I'm actually not sure what you're referring to.) You're saying "Zephyr" but I disagree with whoever in the community ruled this out, and the fact that west is already using these terms de facto means they're going to be used by Zephyr users. So I stand firm on keeping them. |
Done here: #33228 |
@galak this can be merged now that the coding guidelines have been fixed to allow this terminology. |
Hmm, do we need some means to block/allow child binding properties? Was trying to do:
and get:
|
@galak good catch, it's actually one of the usecases... |
We will need some way to say what level of child binding you are doing the filtering in. I suggest this syntax: include:
- name: pincfg-node.yaml
child-binding:
property-allowlist: [foo] With the ability to nest it like this to get at the grandchild, etc: include:
- name: foo.yaml
child-binding:
child-binding:
property-allowlist: [foo] And similarly for Thoughts? I can see if that's feasible if it looks OK. |
looks reasonable to me. |
Marked DNM til we implement the child-binding support. |
301525a
to
db80dd6
Compare
now implemented |
Add the ability to filter which properties get imported when we do an include. We add a new YAML form for this: include: - name: other.yaml property-blocklist: - prop-to-block or include: - name: other.yaml property-allowlist: - prop-to-allow These lists can intermix simple file names with maps, like: include: - foo.yaml - name: bar.yaml property-allowlist: - prop-to-allow And you can filter from child bindings like this: include: - name: bar.yaml child-binding: property-allowlist: - child-prop-to-allow Signed-off-by: Kumar Gala <[email protected]> Signed-off-by: Martí Bolívar <[email protected]>
db80dd6
to
85e2021
Compare
Add the ability to filter which properties get imported when we do an
include. We add a new YAML form for this:
include:
property-blocklist:
or
include:
property-allowlist:
Signed-off-by: Kumar Gala [email protected]
TODO: