Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thorrsson opened this issue Apr 3, 2024 · 1 comment

Comments

@thorrsson
Copy link

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
Copy link
Author

FWIW it looks like this hits in the post-processor here

err = os.Remove(filepath.Join(dirPath, "go.mod"))
if err != nil {
return fmt.Errorf("could not remove go.mod file: %v", err)
}
err = os.Remove(filepath.Join(dirPath, "go.sum"))
if err != nil {
return fmt.Errorf("could not remove go.sum file: %v", err)
}

Should this be a recoverable situation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant