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

Examples: refactor and documentation #243

Open
mrcook opened this issue Mar 11, 2023 · 3 comments
Open

Examples: refactor and documentation #243

mrcook opened this issue Mar 11, 2023 · 3 comments

Comments

@mrcook
Copy link

mrcook commented Mar 11, 2023

When looking over the examples I was struggling to understand it all, so I pulled the examples out into a separate project and started refactoring them to help me better understand. I also started adding a bunch of notes.

I thought maybe other people would find this useful so I decided to turn it into a proper effort and make it available for others.

https://github.com/mrcook/go-plugin-examples

The main changes are:

  • Expand README and add Makefile for easier execution
  • Make each example completely standalone
  • Renamed many things, including shared package to sdk, binary names, etc.
  • Standardise naming and across all examples
  • Replace ENVs with CLI args
  • Document a fair chunk of the code

If you'd like me to create a PR from this I'd be more than happy to do so. If not, please go ahead and close this issue.

Cheers,
Michael

@2rs2ts
Copy link

2rs2ts commented Apr 10, 2023

@mrcook Thanks for making that repo! I took a look at it before filing #249 because I thought perhaps you had cracked the code on why the protoc generation command doesn't work, but you seemed to be using the same exact command as this repo does. Does your example repo not suffer from the same problem that I had in #249? If not, then could you explain how you fixed it? That'd be a huge help for me, if not for the hashicorp devs too.

@mrcook
Copy link
Author

mrcook commented Apr 12, 2023

Hi @2rs2ts, as perhaps you guessed already, this was also broken for me...I just hadn't got around to updating that part. I see from your PR that you figured things out, still, you motivated me into fixing my repo, which has now been updated. Cheers!

P.S. I'm not sure if the python plugin actually works, and at the moment I have no desire to learn enough python to check that.

@2rs2ts
Copy link

2rs2ts commented Apr 13, 2023

@mrcook It worked IME but it requires installing a bunch of pip deps that just weren't stated at all in the docs. I can't even remember anymore which things I had to install, and which things we installed uselessly, but I only documented it in part in #250 because I felt like maybe there was something about not saying what deps needed to be installed that was considered normal. Like maybe people who are used to gRPC development with Python and Golang both just don't need to be told something like that, and it would come across as unnecessary fluff... but I did at least document the main stuff we needed to get it to work, so please feel free to check out my fork's branch to see if you can make any use of it.

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

2 participants