octokit / source-generator

6 stars 3 forks source link

bug: Running scripts/generate-go.sh on a fresh repo clone results in a go.mod error #59

Open thorrsson opened 3 months ago

thorrsson commented 3 months ago

On a fresh clone of the repo in codespaces, running scripts/generate-go.sh throws this error at the end of the generation

Generation completed successfully
dbug: Kiota.Builder.KiotaBuilder[0]
      Api manifest path: /workspaces/source-generator/apimanifest.json

Hint: use the info command to get the list of dependencies you need to add to your project.
Example: kiota info -d "/workspaces/source-generator/schemas/downloaded.json" -l Go

Hint: use the --include-path and --exclude-path options with glob patterns to filter the paths generated.
Example: kiota generate --include-path "**/foo" -d "/workspaces/source-generator/schemas/downloaded.json"
+ go build -o post-processors/go/post-processor post-processors/go/main.go
+ pwd
+ cd /workspaces/source-generator/../go-sdk
+ pwd
+ pwd
+ /workspaces/go-sdk/../source-generator/post-processors/go/post-processor /workspaces/go-sdk
2024/04/03 00:03:50 running post processing for Go SDK on directory /workspaces/go-sdk
2024/04/03 00:03:51 could not remove go.mod file: remove /workspaces/go-sdk/go.mod: no such file or directory
thorrsson commented 3 months ago

FWIW it looks like this hits in the post-processor here https://github.com/octokit/source-generator/blob/4bdfbc83efeb98e38ea5b7bb3d7b94cd415f3fcf/post-processors/go/main.go#L52-L61

Should this be a recoverable situation?