-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Offer a way to handle conflicting options #12915
Comments
The namespace where the values land are currently the same Additionally options having different names based on the set of installed plugins would be a ux disaster A mechanism for namespaced long names plus conflict averse lookup is necessary |
I don't think "it is often the case" is really accurate here, given how rarely this comes up. In any case, I don't think pytest can easily solve this. The public-facing option values is not the only thing that conflicts, but as @RonnyPfannschmidt hints at, receiving options is also a shared namespace. If you remove/rename the option from Playwright, what's going to happen when Playwright reads Without fundamental changes on how plugins register and receive options, this can only be fixed in cooperation with the affected plugin(s):
I agree something like you propose would be very confusing, but for it to be possible in the first place, pytest would need something like a |
I started some experiments for typesetting alike/ I believe registring types that act as namespaces,+ declarations is the most viable way |
Thank you for your input. In my case I kind of just want to disable the playwright option as we are not planning on using it and instead need to use that argument ourselves. So I guess disabling it would be okay but I understand the complications when considering a more generalized solution. |
What's the problem this feature will solve?
When a user installs multiple plugins it is often the case that there are conflicting options. Currently there is no way to handle those conflicts but to uninstall one of the conflicting plugins. Also when adding custom options the user is forced to rename the option.
Describe the solution you'd like
There should be a way to either define a resolution for a conflict or to remove one of the conflicting options.
For example in the following case I remove a conflicting option from the playwright plugin before I add my own:
Alternatively there could be a function handling conflicts, a crude approach would look like this
The text was updated successfully, but these errors were encountered: