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.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
I have tasks like
:buildfor my specific language, liketypescript.I am also exploring some code generation from specifications like openapi spec. I didn't consider the
moon generatebecause 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
:codegena dependency of typescript:buildAttempts so far
implicitDeps
I have tried
implicitDeps: ['^:codegen']in thetasks/typescript.ymlbut I don't see anything in theaction-graph --dependents.adding :build to the codegen tasks
I considered adding a
:buildtask 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-typescriptwhich makes me think I am missing some composition feature of tasks since the idea oftypescriptalready exists.Beta Was this translation helpful? Give feedback.
All reactions