You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
# This Feature...
Over the next few diffs, we'll be implementing the functionality for sub-configs. This involves selecting configuration values from a sub-config for a matched file path, overriding the value used in the root config (if present). It will allow users with multiple projects in the same repository that should use different settings to work under the same config, type checking everything at once, and could make LSP configuration easier if we choose to emulate Pyright's approach.
## High Level Approach
1. Make all config values `Option` types. This will let us know that we need to fall back to the next sub-config or the root config, instead of taking whatever default value we find.
2. Make a `BaseConfig` type, which will be flattened into the main `ConfigFile` type.
3. Make a `Glob` type (pull some of the logic from `Globs`).
4. Create `SubConfigs` and add them to `ConfigFile`, which are `BaseConfigs` paired with a `Glob`.
5. Implement configuration resolution, which will figure out which `SubConfig` to use (or the default), and grab the given config value from it.
# This Diff...
This diff creates associated getter functions for `ConfigBase`, which will make the getters easy to pass around with our upcoming sub config searching functionality.
Reviewed By: ndmitchell
Differential Revision: D73085221
fbshipit-source-id: 27838141872c463fb6b85220f7b4a38dd8340ab3
0 commit comments