Replies: 2 comments 19 replies
-
@nhomble For From your post, it kind of sounds like there is no |
Beta Was this translation helpful? Give feedback.
-
Hey @milesj, since implementing this solution, we've had some additional dependency issues with other pipeline steps. Tasks on our applications that depend on the generated library for this optional codegen step, don't have the codegen step. So we have to explicitly invoke I tried to come up with a representative example here: https://github.com/nhomble/example-moon-typescript-codegen. If you'd prefer a separate discussion, I'd be happy to repost somewhere else too. |
Beta Was this translation helpful? Give feedback.
-
Background
I have tasks like
:build
for my specific language, liketypescript
.I am also exploring some code generation from specifications like openapi spec. I didn't consider the
moon generate
because this seems more for project scaffolding and not prebuild generation (but please point me to separate docs if that's incorrect). To structure this, I have certain moon projects that are basically stubs with just the openapi specification with a tag:codegen
.The output of the task is going to be typescript project.
NOTE the output is not always typescript. Sometimes we are also generating other configuration files out of the openapi spec. So from the same openapi spec, but different moon project stub, we won't always create a typescript project post generation.
Problem
I am unable to make
:codegen
a dependency of typescript:build
Attempts so far
implicitDeps
I have tried
implicitDeps: ['^:codegen']
in thetasks/typescript.yml
but I don't see anything in theaction-graph --dependents
.adding :build to the codegen tasks
I considered adding a
:build
task in thetasks/tag-codegen.yml
, but this also fails because not all codegen tasks create a typescript project. You could wonder, why not create a separate tag? But the tag would be something likecodegen-typescript
which makes me think I am missing some composition feature of tasks since the idea oftypescript
already exists.Beta Was this translation helpful? Give feedback.
All reactions