octokit / source-generator

6 stars 3 forks source link

Hack: fix imports in post-processing #18

Closed kfcampbell closed 7 months ago

kfcampbell commented 8 months ago

By default, Kiota uses the package name "kiota" in its generated Go files. We currently use a brief find/replace in post-processing to change this to our desired "github.com/octokit/kiota":

https://github.com/octokit/source-generator/blob/09f2c9794b24e2a28018c87cb2c19ed94b5697b3/post-processors/go/main.go#L116-L121

First, we need to audit whether "github.com/octokit/kiota" is the correct package to use, since it refers to a repo that doesn't exist. Second, we should investigate whether we can remove this post-processing step. Perhaps the kiota generate flag --class-name can do this correctly from the generation step.

baywet commented 8 months ago

Like #20 you should use the -n option for that instead.

kfcampbell commented 8 months ago

You're correct. We need to decide on a permanent package name and repository (related to #26) and use that package name with the -n option instead of the package name kiota that we're currently using.