-
Notifications
You must be signed in to change notification settings - Fork 351
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
Named arguments in eskip #3037
Comments
Hello, for custom filters you may use flow style yaml and parse arguments yourself, see example #3020
Of course this will not enable editor support. |
For named arguments we would need to support another style of filter constructor Lines 180 to 190 in 708e97a
as well as maybe change eskip Predicate/Filter interfaces Lines 233 to 262 in 708e97a
Before we invest into this we need to understand how named arguments will help with outlined usecases, specifically given that
I think one would need to consult documentation anyway for parameter names. |
Is your feature request related to a problem? Please describe.
The eskip file format includes only positional arguments. The eskip file format is used in places such as configuration files, web based editors, editors like vscode, and so on. It is often unintuitive to edit a filter / predicate arguments as we constantly refer to the documentation of the filter in different places - skipper docs for internal ones, other docs for custom ones. Matching filter signature manually is often painful, especially if there are multiple arguments.
Adding editor support (to show filter signature inline) to all places where eskip file format is used is complex and sometimes impossible (for example yaml configuration files). Instead, it would be beneficial to add named arguments to the eskip language directly.
Describe the solution you would like
Support for named arguments syntax in predicates and filters. For example,
This way, we also eliminate the order in which the arguments appear.
Would you like to work on it?
Yes if I find time
The text was updated successfully, but these errors were encountered: