- Issue created by @darren oh
- Merge request !12432Issue #3531174: Add configuration for additional known files in project root β (Open) created by darren oh
- πΊπΈUnited States darren oh Lakeland, Florida
darren oh β changed the visibility of the branch 11.x to hidden.
- πΊπΈUnited States phenaproxima Massachusetts
What's wrong with just flipping the already-existing
include_unknown_files_in_project_root
switch? Adding a whole new configuration option for this seems like overkill to me. - πΊπΈUnited States darren oh Lakeland, Florida
I donβt want to include unknown files or fight with you over what files should be considered known.
- πΊπΈUnited States phenaproxima Massachusetts
Not intending to fight!
The
include_unknown_files_in_project_root
switch would do what you want, but it sounds like you want to tailor the allow list, rather than do a flat allow-all/reject-all as is currently the case. Is that accurate?If so, I'm on board with making it more flexible, but I'm not sure that adding an entirely new setting is the best way to do it. Maybe we could convert
include_unknown_files_in_project_root
into an allow-list of paths, rather than having it be a boolean. Not sure. What does your use case call for? - πΊπΈUnited States phenaproxima Massachusetts
For example: what if, rather than adding a new setting, we converted
include_unknown_files_in_project_root
into a nullable sequence of glob patterns?So, to exclude everything unknown:
include_unknown_files_in_project_root: null
. That would be the default, in keeping with the current default behavior.But then you could do this to include anything unknown in the project root:
include_unknown_files_in_project_root: ['*']
, since that matches any file path pattern.Or, you could be more specific:
include_unknown_files_in_project_root: ['.special-config/*', 'an/extra/file']
This would be a lot more flexible than a simple boolean, and would not require a whole new setting -- just a pretty simple update path to convert the existing boolean to the new form.
What do you think?
- πΊπΈUnited States darren oh Lakeland, Florida
My use-case calls for including patches.json and patches.lock.json as known files. When I requested that you said my options were to wait for bugs to be fixed upstream, put the patches in composer.json, or include unknown files in the project root. I think a setting is the best way to deal with disagreements over what files should be considered known. That way we can hard code what we agree on and still know it works for everyone.
- πΊπΈUnited States phenaproxima Massachusetts
I agree that it makes sense for this to be configurable as a list of files. So let's convert the existing setting as I described in #9. Having two settings is quite confusing; it's not clear how they interact. One setting seems quite attainable and reasonable to me.
The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.