-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Implement rules that directly produce Subsystems from options #5869
Comments
For reference: I think that this is still blocked on #6478. |
I looked into this a bit today, and the components of the work look fairly clear:
Notably, because 1) all file parsing will happen during construction of the Some rough notes follow.
|
I got started here last week, and while it's true that it would be possible to accomplish this without #6478, I noticed that there might be a shorter path available if we actually implement #6478 before diving all the way in here. I started by making But going back even further: since we're already re-reading all config files each time we run (in order to bootstrap), we can actually just inject the |
### Problem As described in #5869, we need a way to consume `Options` in the new engine in order to provide access to `Subsystems` in `@rules`. ### Solution Convert `OptionsBootstrapper` and `Config` into `datatype`s in order to give them useful eq/hash implementations. Then, modify the `@rules` that were added in #5889 to consume the `Params` API added in #6871 and expose a `ScopedOptions` wrapper around the set of options for a `Scope`. ### Result `@rules` can consume `ScopedOptions`, although there should probably be built-in rules that can consume `ScopedOptions` to create `Subsystems`. Nonetheless, let's say that this "fixes #5869", and open a followup for actually exposing `Subsystems` to `@rules` in a generic way.
This depends on #5788, #5831, and #6478. With the prerequisites in place, we should be able to write rules that accept environment variables and the contents of files outside the buildroot as
Params
that propagate down into subgraphs.This will likely look like using the "multi-parameter-Get" support from #6478 to additionally pass in a (renamed?) OptionsParseRequest as a
Param
when a @console_rule is executed. This will make theOptionsParseRequest
available anywhere in the subgraph below the@console_rule
.We should expand the rules in options_parsing.py to expose scoped options which could be requested by
@rule
s that construct Subsystems... ie, something like:...which would transitively consume the
OptionsParseRequest
, and which a Subsystem-constructing rule could consume using:The text was updated successfully, but these errors were encountered: