Generate any engine-related files Note: this is codegen of the 'go generate' variety, not 'dagger develop' +generate
(_ context.Context)
| 375 | // Note: this is codegen of the 'go generate' variety, not 'dagger develop' |
| 376 | // +generate |
| 377 | func (dev *EngineDev) Generate(_ context.Context) (*dagger.Changeset, error) { |
| 378 | base := dev.Source |
| 379 | withGoGenerate := dag.Go(dagger.GoOpts{ |
| 380 | Source: dev.Source, |
| 381 | ExtraPackages: []string{ |
| 382 | "clang", |
| 383 | "lld", |
| 384 | "libbpf-dev", |
| 385 | }, |
| 386 | }).Env(). |
| 387 | WithExec([]string{"go", "install", "google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2"}). |
| 388 | WithExec([]string{"go", "install", "github.com/gogo/protobuf/protoc-gen-gogo@v1.3.2"}). |
| 389 | WithExec([]string{"go", "install", "github.com/gogo/protobuf/protoc-gen-gogoslick@v1.3.2"}). |
| 390 | WithExec([]string{"go", "install", "github.com/gogo/protobuf/protoc-gen-gogofaster@v1.3.2"}). |
| 391 | WithExec([]string{"go", "install", "google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0"}). |
| 392 | WithMountedDirectory("./github.com/gogo/googleapis", dag.Git("https://github.com/gogo/googleapis.git").Tag("v1.4.1").Tree()). |
| 393 | WithMountedDirectory("./github.com/gogo/protobuf", dag.Git("https://github.com/gogo/protobuf.git").Tag("v1.3.2").Tree()). |
| 394 | WithExec([]string{"go", "generate", "-v", "./..."}). |
| 395 | WithExec([]string{"go", "test", "./dagql", "-update"}). |
| 396 | Directory(".") |
| 397 | changes := changes(base, withGoGenerate, []string{"github.com"}) |
| 398 | return changes, nil |
| 399 | } |
| 400 | |
| 401 | // Return the changes between two directory, excluding the specified path patterns from the comparison |
| 402 | // FIXME: had to copy-paste across modules |