-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Update optionsProcessed
API to pass "raw" maps.
#25126
Comments
Is there any way to get better type information? Should we pre-process the YamlNodes into something that is compatible? |
I've puzzled about this but I'm not sure. The rub is that yaml (and the options format) is so open-ended. For example, a valid value might be a string, bool, list or map. In the end, I don't see any way to sensibly process options without a bunch of |
Aside from a general like for type annotations :-) I'm a bit concerned that processors will end up needing to be written like this:
because it has to handle both raw inputs and merged inputs. I hate the idea of having to duplicate large amounts of logic. Maybe a wrapper around one form or the other that makes them look the same? |
:) I feel you. I believe that |
Updates processing API to accept untyped options maps. Required to support processing options merged from embedders and local analysis options. See: #25126 [email protected] Review URL: https://codereview.chromium.org/1506963002 .
Rationale here: dart-lang/sdk#25126 Note the TODO in `parseConfig`. If we don't replace the untyped options map with something typed, we'll want to come back and unify the divergent parse implementations. BUG= [email protected] Review URL: https://codereview.chromium.org//1508893002 .
Analyzer API: ee310b6. |
Currently the expectation is that we pass options of type
Map<String,YamlNode>
which is not compatible with the type of map we get when merging embedded options with user-defined ones.This blocks: #25115.
The text was updated successfully, but these errors were encountered: