RFC 237: Exclusions in WEB_FEATURES.yml files#237
RFC 237: Exclusions in WEB_FEATURES.yml files#237jugglinmike wants to merge 4 commits intoweb-platform-tests:mainfrom
Conversation
|
Thanks @jugglinmike! The goal of establishing symbolic relationships (Single Source of Truth) is fantastic and definitely the right direction for maintainability over time. I notice the RFC leans toward a string-based micro-syntax ( I’d love for us to consider a hybrid like Schema that supports both simple strings and objects. ExampleWe keep simple strings for standard paths (no visual tax), but allow objects when a rule needs metadata (like an exclusion). features:
- name: alerts
files:
- path: ./*
exclude_ids: # Standard YAML list, zero ambiguity
- print
- logging
- name: print
files:
- ./print-* # Simple file path can stay a simple string!Compared to the originalfeatures:
- name: alerts
files:
- ./*
- "!#print"
- "!#logging"One major benefit:
|
|
Hi @jcscottiii! Thanks for your feedback! One novel aspect of your proposal is that it scopes exclusions to individual path patterns. While I think that could be tenable, it's not a capability that we've specifically felt a need for. It sounds like we're aligned on prioritizing human authors/readers. To that end, I think "scoped" exclusions may make these rules more difficult to understand since they would effectively introduce a grouping operator that hasn't been motivated by experience. (Well, not our experience, anyway. I'd be happy to hear about any instances where you wanted it!) How would you feel about expressing exclusions with a standalone object so that each list item could be either a string value or a dict with a single key (namely, features:
- name: alerts
files:
- - path: ./*
- exclude_ids: # Standard YAML list, zero ambiguity
+ - ./*
+ - exclude_ids: # Standard YAML list, zero ambiguity
- print
- logging
- name: print
files:
- ./print-* # Simple file path can stay a simple string!Anecdotally, I've only observed a small number (read: 1 to 3) of exclusions per feature entry, so a nested list like features:
- name: alerts
files:
- - path: ./*
- exclude_ids: # Standard YAML list, zero ambiguity
- - print
- - logging
+ - ./*
+ - exclude_id: print # Standard YAML string, zero ambiguity
+ - exclude_id: logging # Standard YAML string, zero ambiguity
- name: print
files:
- ./print-* # Simple file path can stay a simple string!...but I don't feel this flattening would have a huge impact on ergonomics, so I could go either way! In any case (in your proposal and in my suggested amendments), the |
Rendered