-
Notifications
You must be signed in to change notification settings - Fork 211
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
Expose options of other builders #3557
Comments
In general we do already have a special asset graph node for the The question I would have is how best to actually expose the We could identify the builder by a couple possible things that I can think of, the builder key + primary input, or just the primary output. So you could for instance have an api to get the Using the builder key + primary input could run into problems because technically the same builder could be applied to the same primary input multiple times, if it was configured to have different output extensions. |
Maybe Generators could have a lifecycle which receives a Map<String, BuilderOptions>? |
Well, they do sort of already have that (the constructor). I could see some way of maybe linking the options of two different builders, or creating maybe a "configuration alias" which would be some named configuration ID which you use instead of a builder key, and then any builder can "subscribe" to that? Possibly then the builder options you get would just be merged from that shared configuration and any customized configuration per the builder key. |
That could work too. I'm not too picky on the solution honestly. |
Hello!
Would it be possible for builders to access the options of other builders?
My use case is, I have a generator that integrates with another generator. So my generator may receive elements annotated with the other generator's annotation.
At the same time, my generator requires specific flags to be enabled (either in
build.yaml
or the annotation).While I can read the content of the annotation, I'm unable to read the generator's build.yaml settings
That is problematic because it prevents me from making a nice error message in the scenario where the necessary flags aren't set:
If the flag isn't set in the annotation, I have to assume that
build.yaml
is set correctly. If it isn't, my generator will silently failIf builders could read options from other builders, then my builder would be able to check the content of the builder it integrates with and check for the specific flagÏ
The text was updated successfully, but these errors were encountered: