-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add plugin scaffold generator #74
Conversation
@mhmd-azeez if you wanted to set up similar "templates" for c-sharp and f-sharp (or any other languages!), take a look at the pdk-templates.json for the expected repo URL to host them :) |
@@ -2,7 +2,7 @@ module github.com/extism/cli/extism | |||
|
|||
go 1.20 | |||
|
|||
// replace github.com/extism/cli => ../ | |||
replace github.com/extism/cli => ../ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to figure out why I changed this a while back (we shouldn't use the published version in our own module, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can't remember why either, but this would be very helpful! we should uncomment this line for extism-dev too if we decide it's okay to keep it
Nice! |
…read by disabling help by default
I've set up most of the repos, everything seems to be working - having the templates available like this is super convenient! @mhmd-azeez C#/F# are the only templates left, would you be able to set those up when you get the chance? @nilslice the only task left is to fetch the repo list from the network instead of embedding it - did you have plans for that? should we just fetch the file from the repo? |
@zshipko yes, I have some time this week |
@zshipko ya I was thinking we'd just GET the file at some resolved path in the |
Sweet! F# and C# are now also available P.S: currently the csproj/fsproj is always called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Is there a note or some call-out in these project README/code somewhere that indicates what needs to be changed, or does this just still work out of the box, and a user will likely know to change whatever they need to in order to fit their own needs? |
@nilslice it works out of the box and people can easily change it. It just provides a nicer experience as people are most likely going to change it anyway |
Awesome, thanks @mhmd-azeez!
This is an issue with almost all the repos - next step would probably be to list out what needs to be changed in the READMEs like @nilslice mentioned, or adding some way to do search and replace with a standardized interpolation key for the project name. |
Ok, I can't approve this since I opened it, but it LGTM and I'm fine w/ the embedded fallback. Thanks for the great work on this! |
you can also pass
-l
or-lang
with one of the pdk languages listed in pdk-templates.json to choose non-interactivelyThere is only one template implemented (and template is generous.. there's no interpolation etc, just clone) at https://github.com/extism/rust-pdk-template
(Update, now also JS https://github.com/extism/js-pdk-template, will update more down below in TODO list)
TODO:
ctrl-c
closing of the menu errors with fatal: repository '' does not exist Error: exit status 128//go:embed
the pdk-template.json, but rather fetch it via network once we merge it (so its dynamic based on our live repo list, since templates are too)--tag
param to pin the clone to a git tag of any of the template repos