Conversation
7cc9fae to
3054997
Compare
mislav
left a comment
There was a problem hiding this comment.
This is great!
I do feel, however, that embedding files inline in Go code makes the overall implementation hard to scan, even when heredocs are used, so I've proposed using a Go 1.16 feature of file embedding as an alternative.
For Go extensions:
- Should we generate a
go.modso that extensions are immediately buildable? We could generate the name of the module asgithub.com/<owner>/gh-<extension-name> - Will the users know how to build and test the extension in development? Should we include instructions on how to build it, or a Makefile even to make rebuilding easier locally?
|
@mislav Thanks for the feedback! Agreed on all the points but wanted to discuss:
I worried that this was assuming too much on behalf of the users, but I am definitely intrigued by doing it. Thinking about the context of all this more this actually seems pretty low risk, so yeah, let's do it. Should we hardcode
I'm worried about this too. I included a hint about As for make, it's an interesting idea but I'd rather punt. It isn't on Windows by default and I don't think it's worth the complexity -- especially when |
You could read the
We can assume that Go developers will in general know how to use |
|
Sounds good re: host.
This is precisely what |
|
This is ready for re-review. Here's the current state of the user output: cc @mislav |
mislav
left a comment
There was a problem hiding this comment.
Looks good! Just polish-level suggestions remain
a406a83 to
37ec881
Compare
|
I've:
Not going to merge immediately until we confirm whether we are ok with it quietly shipping this week or if we want to wait to merge until next week's loud ship |
- add a wizard to gh extension create - add --precompiled-go - add --precompiled-other - build out scaffolding for both types of binary extensions
a083d60 to
6950c6e
Compare

It's entirely possible I have overdone this and please tell me if so.
This PR adds a small wizard to
gh extension createthat collects a name and "type" of extension to create: script-based, go-based, or other compiled.It also supposed
--precompiled=goand--precompiled=otherto avoid interactivity.For Go extensions, it lays out a
main.gowith some helper functions pre-seeded as well as a workflow file that uses https://github.com/cli/gh-extension-precompile with default arguments.For non-Go binary extensions, it lays out a stubbed
script/build.shscript as well as a workflow file that uses https://github.com/cli/gh-extension-precompile withbuild_override: script/build.shpassed.Part of #4194