brief-engineer-67497
11/26/2018, 5:10 PMdef product_types(cls):
return ['expanded_yaml']
and
def prepare(cls, options, round_manager):
super(MyGenerator, cls).prepare(options, round_manager)
round_manager.require_data('expanded_yaml')
but then how do I pass the value I'm interrested in ? (i.e the output directory in my case)
I tried self.context.products.register_data('expanded_yaml', target_workdir) for the producer and `self.context.products.get_data('expanded_yaml')`for the consumer. It seemed to work but after cleaning all caches and invoking directly gen on the consumer target, the result of self.context.products.get_data('expanded_yaml') is None …enough-analyst-54434
11/26/2018, 5:15 PM./pants --explain gen show that your task - installed in the gen goal - depends on the task that calls self.context.products.register_data('expanded_yaml', target_workdir) ?brief-engineer-67497
11/26/2018, 5:19 PM./pants --explain gen
Goal Execution Order:
bootstrap -> imports -> unpack-jars -> deferred-sources -> gen
Goal [TaskRegistrar->Task] Order:
bootstrap [substitute-aliased-targets->SubstituteAliasedTargets_bootstrap_substitute_aliased_targets, jar-dependency-management->JarDependencyManagementSetup_bootstrap_jar_dependency_management, bootstrap-jvm-tools->BootstrapJvmTools_bootstrap_bootstrap_jvm_tools, provide-tools-jar->ProvideToolsJar_bootstrap_provide_tools_jar]
imports [ivy-imports->IvyImports_imports_ivy_imports]
unpack-jars [unpack-jars->UnpackJars_unpack_jars]
deferred-sources [deferred-sources->DeferredSourcesMapper_deferred_sources]
gen [antlr-java->AntlrJavaGen_gen_antlr_java, antlr-py->AntlrPyGen_gen_antlr_py, jaxb->JaxbGen_gen_jaxb, protoc->ProtobufGen_gen_protoc, ragel->RagelGen_gen_ragel, thrift-java->ApacheThriftJavaGen_gen_thrift_java, thrift-py->ApacheThriftPyGen_gen_thrift_py, wire->WireGen_gen_wire, yaml-template->YamlTemplateApply_gen_yaml_template, twirl->TwirlGen_gen_twirl, controllers->ControllersGen_gen_controllers, routes->RoutesGen_gen_routes]enough-analyst-54434
11/26/2018, 5:20 PMbrief-engineer-67497
11/26/2018, 5:20 PMYamlTemplateApply_gen_yaml_template and the consumer ControllersGen_gen_controllersenough-analyst-54434
11/26/2018, 5:21 PMbrief-engineer-67497
11/26/2018, 5:22 PMbackend_packages in the right order in the pants.ini to make it work.enough-analyst-54434
11/26/2018, 5:22 PMIt seemed to work but after cleaning all caches and invoking directly gen on the consumer target,Does the consumer target express a dependency on a target pointing to the file the yaml task operates on?
enough-analyst-54434
11/26/2018, 5:23 PMbrief-engineer-67497
11/26/2018, 5:24 PMenough-analyst-54434
11/26/2018, 5:24 PMYes, I was a bit surprise that I have to declare theFlagging this for a re-visit after figuring out main issue.in the right order in the pants.ini to make it work.backend_packages
brief-engineer-67497
11/26/2018, 5:24 PMenough-analyst-54434
11/26/2018, 5:25 PMbrief-engineer-67497
11/26/2018, 5:25 PMSimpleCodegenTask and I implement mainly execute_codegenenough-analyst-54434
11/26/2018, 5:25 PMbrief-engineer-67497
11/26/2018, 5:27 PMenough-analyst-54434
11/26/2018, 5:28 PMbrief-engineer-67497
11/26/2018, 5:28 PMenough-analyst-54434
11/26/2018, 5:29 PMenough-analyst-54434
11/26/2018, 5:29 PMenough-analyst-54434
11/26/2018, 5:29 PMenough-analyst-54434
11/26/2018, 5:30 PMbrief-engineer-67497
11/26/2018, 5:30 PMbrief-engineer-67497
11/26/2018, 5:30 PMbrief-engineer-67497
11/26/2018, 5:31 PMenough-analyst-54434
11/26/2018, 5:31 PMenough-analyst-54434
11/26/2018, 5:31 PMenough-analyst-54434
11/26/2018, 5:31 PMbrief-engineer-67497
11/26/2018, 5:32 PMbrief-engineer-67497
11/26/2018, 5:33 PMenough-analyst-54434
11/26/2018, 5:33 PMenough-analyst-54434
11/26/2018, 5:33 PMbrief-engineer-67497
11/26/2018, 5:34 PMbrief-engineer-67497
11/26/2018, 5:34 PMbrief-engineer-67497
11/26/2018, 5:34 PMenough-analyst-54434
11/26/2018, 5:37 PMregister_products(self, target, target_workdir). So same shape as execute_codegen with a default noop implementation and the main difference that it's called for every vt after execute_codegen runs for the invalid ones: https://github.com/pantsbuild/pants/blob/14bfee29bb2f44c3b10e4144c67a118805522c45/src/python/pants/task/simple_codegen_task.py#L237enough-analyst-54434
11/26/2018, 5:38 PMbrief-engineer-67497
11/26/2018, 5:38 PMenough-analyst-54434
11/26/2018, 5:39 PMenough-analyst-54434
11/26/2018, 5:39 PMbrief-engineer-67497
11/26/2018, 5:40 PMenough-analyst-54434
11/26/2018, 5:40 PMResourcesbrief-engineer-67497
11/26/2018, 5:40 PMenough-analyst-54434
11/26/2018, 5:40 PMbrief-engineer-67497
11/26/2018, 5:40 PMbrief-engineer-67497
11/26/2018, 5:41 PMbrief-engineer-67497
11/26/2018, 5:41 PMenough-analyst-54434
11/26/2018, 5:41 PMenough-analyst-54434
11/26/2018, 5:41 PMbrief-engineer-67497
11/26/2018, 5:43 PMand inject those targets in the graphthat seems like what I'm trying to do
enough-analyst-54434
11/26/2018, 5:43 PMyaml_template target that would own the templated yaml in use BUILD files. Your YamlTemplateApply would operate only on those targets and it would emit yaml targets as a result. The ControllersGen task would then only operate on yaml targets.brief-engineer-67497
11/26/2018, 5:44 PMenough-analyst-54434
11/26/2018, 5:44 PMroute_templates and routes if the yamls are special routing yamls and not general yaml files.brief-engineer-67497
11/26/2018, 5:45 PMbrief-engineer-67497
11/26/2018, 5:45 PMbrief-engineer-67497
11/26/2018, 5:45 PMenough-analyst-54434
11/26/2018, 5:46 PMControllersGen generic to any yaml file or should it only work on specific yaml files?brief-engineer-67497
11/26/2018, 5:46 PMbrief-engineer-67497
11/26/2018, 5:47 PMbrief-engineer-67497
11/26/2018, 5:48 PMbrief-engineer-67497
11/26/2018, 6:01 PMOther impls don't pass data through products, they generate synthetic targets to own the generated files and inject those targets in the graphyet the documentation speaks of
Products: How one Task consumes the output of another .
But I can see that some people want to remove them 😛
# TODO(John Sirois): Kill products and simply have users register ProductMapping subtypes
# as data products. Will require a class factory, like `ProductMapping.named(typename)`.enough-analyst-54434
11/26/2018, 6:07 PMprotobuf) and synthesizes to a 'normal' target type (java-library) instead of using products. It's also true that products currently has a split between products that are just string keys vs products that are full blown custom types (the comment you reference).brief-engineer-67497
11/26/2018, 6:10 PMenough-analyst-54434
11/26/2018, 6:12 PMenough-analyst-54434
11/26/2018, 6:12 PMControllersGen which looks broken in the gist. Presumably if you hand it random yaml it dies?brief-engineer-67497
11/26/2018, 6:12 PMbrief-engineer-67497
11/26/2018, 6:13 PMenough-analyst-54434
11/26/2018, 6:13 PMenough-analyst-54434
11/26/2018, 6:14 PMbrief-engineer-67497
11/26/2018, 6:15 PMenough-analyst-54434
11/26/2018, 6:15 PMenough-analyst-54434
11/26/2018, 6:16 PMbrief-engineer-67497
11/26/2018, 6:17 PMbrief-engineer-67497
11/26/2018, 6:18 PMbrief-engineer-67497
11/26/2018, 6:18 PMenough-analyst-54434
11/26/2018, 6:20 PM.tyml.
2. The generic YamlTemplateApply task could operate on any target with .tyml sources and produce matching .yaml output sources.
3. The ControllersGen task could operate on MicsSpec targets only, retrieving the mapped .yaml sources.enough-analyst-54434
11/26/2018, 6:21 PMbrief-engineer-67497
11/26/2018, 6:23 PMenough-analyst-54434
11/26/2018, 6:24 PMbrief-engineer-67497
11/26/2018, 6:25 PMbrief-engineer-67497
11/26/2018, 6:27 PMresponses: $tref:DataResponse[<mics-type://myResource>] and in my output file it would be
responses:
'400':
$ref: '#/components/responses/error'
'401':
$ref: '#/components/responses/error'
'404':
$ref: '#/components/responses/error'
'403':
$ref: '#/components/responses/error'
'500':
$ref: '#/components/responses/error'
'200':
description: Success !
content:
application/json:
schema:
type: object
required:
- status
- data
properties:
status:
type: string
enum:
- ok
data:
$ref: <mics-type://MyResource>
'503':
$ref: '#/components/responses/error'enough-analyst-54434
11/26/2018, 6:28 PMYamlTemplateApply synthetic_target_type would return whatever the input target type was - basically it can't know or care where the .tyml is coming from or going to.
2. That's it actually!enough-analyst-54434
11/26/2018, 6:28 PMYamlTemplateApply to remain generic and operate on MicsSpec, for example, without knowing it.enough-analyst-54434
11/26/2018, 6:28 PMenough-analyst-54434
11/26/2018, 6:29 PMControllersGen just operates on MicsSpec targets that own yaml files (the synthetic generated ones or otherwise hand-written ones that never ran through YamlTemplateApply).enough-analyst-54434
11/26/2018, 6:30 PMenough-analyst-54434
11/26/2018, 6:30 PMbrief-engineer-67497
11/26/2018, 6:32 PMenough-analyst-54434
11/26/2018, 6:33 PMbrief-engineer-67497
11/26/2018, 6:33 PMbrief-engineer-67497
11/26/2018, 6:35 PM1. Inhmm actually not sure what you mean by "return whatever the input target type was "YamlTemplateApplywould return whatever the input target type was - basically it can't know or care where thesynthetic_target_typeis coming from or going to..tyml
brief-engineer-67497
11/26/2018, 6:36 PMenough-analyst-54434
11/26/2018, 6:36 PMreturn type(target) for https://github.com/pantsbuild/pants/blob/14bfee29bb2f44c3b10e4144c67a118805522c45/src/python/pants/task/simple_codegen_task.py#L142-L151brief-engineer-67497
11/26/2018, 6:37 PMbrief-engineer-67497
11/26/2018, 6:37 PMenough-analyst-54434
11/26/2018, 6:38 PMis_gentarget would simply look to see if the target has sources matching .tyml.enough-analyst-54434
11/26/2018, 6:38 PMbrief-engineer-67497
11/26/2018, 6:41 PMYamlTemplateApply part but then what about the communication with ControllersGen ? it would operates only on MiscSpec targets but how do I operate on the one synthetized by YamlTemplateApply rather than the original one listed in the dependencies ?enough-analyst-54434
11/26/2018, 6:41 PMa -> mics in the graph you'll get a a -> (mics, mics') after the YamlTemplateApply task runs. So ControllersGen will need to be smart enough to scan both mics and skip it since it owns no yaml files, and mics' and use it since it owns generated yaml files.enough-analyst-54434
11/26/2018, 6:43 PMControllersGen now has two target selection criteria: 1. type(target) == MicsSpec 2. any(s.endswith('.yaml') for s in target.sources)brief-engineer-67497
11/26/2018, 6:44 PMfor eachhow do I add node/target to the graph ? I'm reading ProtobufGen but not sure I'm finding itin the graph you'll get aa -> micsa -> (mics, mics')
enough-analyst-54434
11/26/2018, 6:44 PMbrief-engineer-67497
11/26/2018, 6:45 PMbrief-engineer-67497
11/26/2018, 6:45 PMbrief-engineer-67497
11/26/2018, 6:45 PMenough-analyst-54434
11/26/2018, 6:45 PMmics' has Target.derived_from == micsenough-analyst-54434
11/26/2018, 6:46 PMbrief-engineer-67497
11/26/2018, 6:46 PMbrief-engineer-67497
11/26/2018, 6:47 PMbrief-engineer-67497
11/26/2018, 6:48 PMbrief-engineer-67497
11/26/2018, 6:48 PMenough-analyst-54434
11/26/2018, 6:51 PMbrief-engineer-67497
11/26/2018, 8:20 PMbrief-engineer-67497
11/26/2018, 8:21 PMTemplatedYamlLibrary and my task def YamlTemplateApplybrief-engineer-67497
11/26/2018, 8:21 PMenough-analyst-54434
11/26/2018, 8:21 PMTemplatedYamlLibrary?brief-engineer-67497
11/26/2018, 8:22 PMControllersLibrary and my task ControllersGenenough-analyst-54434
11/26/2018, 8:22 PMbrief-engineer-67497
11/26/2018, 8:22 PMbrief-engineer-67497
11/26/2018, 8:22 PMenough-analyst-54434
11/26/2018, 8:24 PMit actually is but I still need to declare a targetYou don't. You can implement
is_gentarget(target) and test the given target for .tyml sources.brief-engineer-67497
11/26/2018, 8:25 PMenough-analyst-54434
11/26/2018, 8:25 PMbrief-engineer-67497
11/26/2018, 8:25 PMenough-analyst-54434
11/26/2018, 8:25 PMbrief-engineer-67497
11/26/2018, 8:26 PMenough-analyst-54434
11/26/2018, 8:26 PMgentarget_type once or else implement is_gentarget which gets to say yes or no per active target in the current pants run.brief-engineer-67497
11/26/2018, 8:26 PMis_gentargetenough-analyst-54434
11/26/2018, 8:27 PMbrief-engineer-67497
11/26/2018, 8:27 PMenough-analyst-54434
11/26/2018, 8:27 PMenough-analyst-54434
11/26/2018, 8:27 PMenough-analyst-54434
11/26/2018, 8:27 PMenough-analyst-54434
11/26/2018, 8:27 PMbrief-engineer-67497
11/26/2018, 8:27 PMbrief-engineer-67497
11/26/2018, 8:27 PMenough-analyst-54434
11/26/2018, 8:27 PMbrief-engineer-67497
11/26/2018, 8:28 PMspecbrief-engineer-67497
11/26/2018, 8:28 PMcontrollersenough-analyst-54434
11/26/2018, 8:29 PMis_gentarget disagrees with your execute_codegen assertion.brief-engineer-67497
11/26/2018, 8:30 PMbrief-engineer-67497
11/26/2018, 8:30 PMbrief-engineer-67497
11/26/2018, 8:30 PMspecbrief-engineer-67497
11/26/2018, 8:31 PMcontrollers declare spec as a dependenciebrief-engineer-67497
11/26/2018, 8:33 PMTemplatedYamlLibrary I can output two artefacts a controller lib and route files. So I though that I needed 3 targetsbrief-engineer-67497
11/26/2018, 8:33 PMenough-analyst-54434
11/26/2018, 8:34 PMbrief-engineer-67497
11/26/2018, 8:34 PMenough-analyst-54434
11/26/2018, 8:34 PMenough-analyst-54434
11/26/2018, 8:35 PMbrief-engineer-67497
11/26/2018, 8:35 PMenough-analyst-54434
11/26/2018, 8:35 PMenough-analyst-54434
11/26/2018, 8:36 PMenough-analyst-54434
11/26/2018, 8:36 PMenough-analyst-54434
11/26/2018, 8:37 PMbrief-engineer-67497
11/26/2018, 8:37 PMbrief-engineer-67497
11/26/2018, 8:37 PMbrief-engineer-67497
11/26/2018, 8:39 PMbrief-engineer-67497
11/26/2018, 8:39 PMbrief-engineer-67497
11/26/2018, 8:39 PMbrief-engineer-67497
11/26/2018, 8:40 PMenough-analyst-54434
11/26/2018, 8:41 PMbrief-engineer-67497
11/26/2018, 8:41 PMControllersGen task I have on one hand my TemplatedYamlLibrary which contain the sources but on the other hand it's ControllersLibrary that contains all the other args for the CLIenough-analyst-54434
11/26/2018, 8:43 PMYamlTemplateApply can work on any target with .tyaml sources, why can't it operate directly on the target with the target.payload.dictionary ControllersGen needs?brief-engineer-67497
11/26/2018, 8:44 PMbrief-engineer-67497
11/26/2018, 8:44 PMenough-analyst-54434
11/26/2018, 8:45 PMcontroller. It has sources that can be .yaml or .tyaml as wells as a dictionary. The YamlTemplateApply operates on these targets when they own .tyaml sources, the ControllersGen task always operates on these targets.brief-engineer-67497
11/26/2018, 8:46 PMtyaml sources and I want to setup my controllers_library target next to my server code in another diroctorybrief-engineer-67497
11/26/2018, 8:46 PMbrief-engineer-67497
11/26/2018, 8:46 PMenough-analyst-54434
11/26/2018, 8:47 PMenough-analyst-54434
11/26/2018, 8:47 PMbrief-engineer-67497
11/26/2018, 8:47 PMenough-analyst-54434
11/26/2018, 8:47 PMbrief-engineer-67497
11/26/2018, 8:48 PMenough-analyst-54434
11/26/2018, 8:49 PMcontroller target with 2 required fields: dictionary and spec, where spec is a target adress that must point to a yaml (or templated yaml)?brief-engineer-67497
11/26/2018, 8:52 PMbrief-engineer-67497
11/26/2018, 8:52 PMenough-analyst-54434
11/26/2018, 8:53 PMenough-analyst-54434
11/26/2018, 8:53 PMbrief-engineer-67497
11/26/2018, 8:55 PMbrief-engineer-67497
11/26/2018, 8:55 PMenough-analyst-54434
11/26/2018, 8:55 PMbrief-engineer-67497
11/26/2018, 8:56 PMenough-analyst-54434
11/26/2018, 8:56 PMbrief-engineer-67497
11/26/2018, 9:03 PMmono-repo/
specs/
service1/
service1-api.tyaml
service2/
service2-api.tyaml
dictionary.yaml
api/
service1-models/
service2-models/
service1/
service2/brief-engineer-67497
11/26/2018, 9:04 PMbrief-engineer-67497
11/26/2018, 9:06 PMresponses: $tref:DataResponse[<mics-type://myResource>] ,
dictionary.yaml contains
Data[ResourceSchema]:
schema:
type: object
required:
- status
- data
properties:
status:
type: string
enum:
- ok
data: ResourceSchema
DataResponse[Resource]:
200:
description: Success !
content:
'application/json': $tref:Data[| {"$ref":"Resource"} |]
400:
$ref: '#/components/responses/error'
401:
$ref: '#/components/responses/error'
403:
$ref: '#/components/responses/error'
404:
$ref: '#/components/responses/error'
500:
$ref: '#/components/responses/error'
503:
$ref: '#/components/responses/error'
and in my output file will be
responses:
'400':
$ref: '#/components/responses/error'
'401':
$ref: '#/components/responses/error'
'404':
$ref: '#/components/responses/error'
'403':
$ref: '#/components/responses/error'
'500':
$ref: '#/components/responses/error'
'200':
description: Success !
content:
application/json:
schema:
type: object
required:
- status
- data
properties:
status:
type: string
enum:
- ok
data:
$ref: <mics-type://MyResource>
'503':
$ref: '#/components/responses/error'enough-analyst-54434
11/26/2018, 9:06 PMbrief-engineer-67497
11/26/2018, 9:09 PMbrief-engineer-67497
11/26/2018, 9:09 PMbrief-engineer-67497
11/26/2018, 9:11 PMenough-analyst-54434
11/26/2018, 9:12 PMbrief-engineer-67497
11/26/2018, 9:12 PMbrief-engineer-67497
11/26/2018, 9:12 PMenough-analyst-54434
11/26/2018, 9:12 PMbrief-engineer-67497
11/26/2018, 9:13 PMbrief-engineer-67497
11/26/2018, 9:14 PMenough-analyst-54434
11/26/2018, 9:15 PMenough-analyst-54434
11/26/2018, 9:15 PMenough-analyst-54434
11/26/2018, 9:16 PMbrief-engineer-67497
11/26/2018, 9:17 PMenough-analyst-54434
11/26/2018, 9:18 PMbrief-engineer-67497
11/26/2018, 9:18 PMbrief-engineer-67497
11/26/2018, 9:20 PMenough-analyst-54434
11/26/2018, 9:21 PMenough-analyst-54434
11/26/2018, 9:30 PMTemplatedYamlLibrary needs to remain as the target type YamlTemplateApply operates on since YamlTemplateApply needs more than just .yaml files - it needs the dictionary too. I think, in full, TemplatedYamlLibrary needs 3 fields:
+ dictionary (required)
+ sources - 0 or more .tyaml files
+ target_type - the type of target to generate - defaulting to Resources
This will allow you to write the generic YamlTemplateApply task but yet still have it emit a specific Spec target that both ControllerGen and ClientGen can look for and use. That Spec target can be hand-written in a BUILD file and point to a fully formed yanml file hand-written by a user, or be generated.enough-analyst-54434
11/26/2018, 9:30 PMbrief-engineer-67497
11/26/2018, 9:32 PMbrief-engineer-67497
11/26/2018, 9:36 PMbrief-engineer-67497
11/26/2018, 9:37 PMbrief-engineer-67497
11/26/2018, 9:39 PMtarget_type is actually type(self) so to speakbrief-engineer-67497
11/26/2018, 9:42 PMControllerLibrary and ClientLibrary that will have two differents output but the same first step (YamlTemplateApply) won't be shared.
Or is a kind of hash used that make the two targets able to share this first step ?enough-analyst-54434
11/26/2018, 9:43 PMenough-analyst-54434
11/26/2018, 9:45 PMok the only drawback I see here is that for a given spec, I will have for exemple two targetsI don't understand: YamlTemplateApply(TemplatedYamlLibrary) -> Spec ControllerLibrary(Spec) -> Contoller ClientLibrary(Spec) -> ClientandControllerLibrarythat will have two differents output but the same first step (ClientLibrary) won't be shared.YamlTemplateApply
enough-analyst-54434
11/26/2018, 9:45 PMbrief-engineer-67497
11/26/2018, 9:46 PMenough-analyst-54434
11/26/2018, 9:46 PMTemplatedYamlLibrary(dictionary, sources, output_target_type)brief-engineer-67497
11/26/2018, 9:46 PMenough-analyst-54434
11/26/2018, 9:48 PMtemplated_yaml_library(
dictionary='dictionary.yaml',
sources=['service.tyaml'],
target_type=spec
)enough-analyst-54434
11/26/2018, 9:49 PMbrief-engineer-67497
11/26/2018, 9:50 PMenough-analyst-54434
11/26/2018, 9:51 PMYamlTemplateApply should respond to https://github.com/pantsbuild/pants/blob/14bfee29bb2f44c3b10e4144c67a118805522c45/src/python/pants/task/simple_codegen_task.py#L142-L151 withbrief-engineer-67497
11/26/2018, 9:51 PMenough-analyst-54434
11/26/2018, 9:51 PMbrief-engineer-67497
11/26/2018, 9:52 PMenough-analyst-54434
11/26/2018, 9:52 PMenough-analyst-54434
11/26/2018, 9:52 PMspec and both controller and client tasks operate only on spec targetsbrief-engineer-67497
11/26/2018, 9:53 PMenough-analyst-54434
11/26/2018, 9:53 PMbrief-engineer-67497
11/26/2018, 9:53 PMenough-analyst-54434
11/26/2018, 9:53 PMtemplated_yaml_library(
dictionary='dictionary.yaml',
sources=['service.tyaml'],
target_type=spec
)enough-analyst-54434
11/26/2018, 9:53 PMenough-analyst-54434
11/26/2018, 9:53 PMenough-analyst-54434
11/26/2018, 9:54 PMtemplated_yaml_library(
dictionary='dictionary.yaml',
sources=['service.tyaml'],
target_type=spec
)enough-analyst-54434
11/26/2018, 9:54 PMenough-analyst-54434
11/26/2018, 9:55 PMbrief-engineer-67497
11/26/2018, 9:55 PMbrief-engineer-67497
11/26/2018, 9:56 PMtemplated_yaml_library(
dictionary='dictionary.yaml',
sources=['service.tyaml'],
target_type=spec
)brief-engineer-67497
11/26/2018, 9:56 PMcontrollers_library(
dependencies = ['spec/service1']
)enough-analyst-54434
11/26/2018, 9:59 PMenough-analyst-54434
11/26/2018, 9:59 PMbrief-engineer-67497
11/26/2018, 9:59 PMenough-analyst-54434
11/26/2018, 10:00 PM.tyaml, just yaml will do.brief-engineer-67497
11/26/2018, 10:00 PMenough-analyst-54434
11/26/2018, 10:00 PMt is now embedded in templated_yaml_library.brief-engineer-67497
11/26/2018, 10:00 PMControllerGen taskenough-analyst-54434
11/26/2018, 10:01 PMtarget_type is the only way to make the YamlTemplateApply as far as I can tell.enough-analyst-54434
11/26/2018, 10:01 PMSpec targetsenough-analyst-54434
11/26/2018, 10:01 PMYamlTemplateApply.enough-analyst-54434
11/26/2018, 10:01 PMbrief-engineer-67497
11/26/2018, 10:02 PMSpec and on the other hand I have my CLI args in ControllersLibrary how do I unite both ?enough-analyst-54434
11/26/2018, 10:03 PMspec argument that expects an address.enough-analyst-54434
11/26/2018, 10:03 PMenough-analyst-54434
11/26/2018, 10:03 PMbrief-engineer-67497
11/26/2018, 10:03 PMexecute_codegen is called, I operate on one targetenough-analyst-54434
11/26/2018, 10:05 PMControllersLibrary target?brief-engineer-67497
11/26/2018, 10:06 PMargs = [
'--controllers_package', target.payload.controllers_package,
'--effect', target.payload.effect,
'--base_route', sources_root,
'--output', target_workdir
]brief-engineer-67497
11/26/2018, 10:07 PMoutput is given by execute_codegen, sources_root by Spec and I have two other argumentsenough-analyst-54434
11/26/2018, 10:09 PMbrief-engineer-67497
11/26/2018, 10:11 PMenough-analyst-54434
11/26/2018, 10:11 PMcontrollers_library(
dependencies = ['spec/service1']
)brief-engineer-67497
11/26/2018, 10:12 PMcontrollers_library(
package='controllers',
effect='future',
dependencies = ['spec/service1']
)enough-analyst-54434
11/26/2018, 10:12 PMYamlTemplateApply is alreadu expanding dependencies = ['spec/service1'] to dependencies = ['spec/service1', sopec.service1.prime]brief-engineer-67497
11/26/2018, 10:13 PMenough-analyst-54434
11/26/2018, 10:13 PMenough-analyst-54434
11/26/2018, 10:13 PMbrief-engineer-67497
11/26/2018, 10:14 PMenough-analyst-54434
11/26/2018, 10:14 PMSpecenough-analyst-54434
11/26/2018, 10:15 PMbrief-engineer-67497
11/26/2018, 10:16 PMenough-analyst-54434
11/26/2018, 10:16 PMbrief-engineer-67497
11/26/2018, 10:16 PMbrief-engineer-67497
11/26/2018, 10:16 PMbrief-engineer-67497
11/26/2018, 10:16 PM