* CodeGenerator is an interface that a SDK may implements to generate code for a module. This can include multiple things, such as a generated client to interact with the Dagger Engine but also any changes in the module's code to run it in the Dagger Engine like dependency configuration, package ma
| 94 | (`dagger develop`). |
| 95 | */ |
| 96 | type CodeGenerator interface { |
| 97 | /* |
| 98 | Codegen generates code for the module at the given source directory and |
| 99 | subpath. |
| 100 | |
| 101 | The Code field of the returned GeneratedCode object should be the generated |
| 102 | contents of the module sourceDirSubpath, in the case where that's different |
| 103 | than the root of the sourceDir. |
| 104 | |
| 105 | The provided Module is not fully initialized; the Runtime field will not be |
| 106 | set yet. |
| 107 | |
| 108 | This function prototype is different from the one exposed by the SDK. |
| 109 | SDK must implement the `Codegen` function with the following signature: |
| 110 | |
| 111 | ```gql |
| 112 | codegen( |
| 113 | modSource: ModuleSource! |
| 114 | introspectionJSON: File! |
| 115 | ): GeneratedCode! |
| 116 | ``` |
| 117 | */ |
| 118 | Codegen( |
| 119 | context.Context, |
| 120 | |
| 121 | // Current module dependencies. |
| 122 | *SchemaBuilder, |
| 123 | |
| 124 | // Current instance of the module source. |
| 125 | dagql.ObjectResult[*ModuleSource], |
| 126 | ) (*GeneratedCode, error) |
| 127 | } |
| 128 | |
| 129 | /* |
| 130 | ModuleRuntime is an abstraction over different ways to execute module code. |
no outgoing calls
no test coverage detected