-
Notifications
You must be signed in to change notification settings - Fork 40
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
Go implementation #78
Comments
@cwize1 If you'd like a reference implementation, you may be interested in one I've written that I consider complete: https://github.com/200sc/bebop |
You're both awesome! Thanks for your contributions, @200sc seeing someone reimplement the entirety of Bebop is really humbling. @cwize1 if you have any feedback on how we can improve the code generation API don't hesitate to share it. We've knocked back and forth the idea of our own template engine and also just extending it to be script-based so iterating is faster. |
I am not sure a template engine would have helped much. As a language, Go has a lot of strong opinions and unique ways of doings things. So, I am not sure how much its implementation could be shared with other languages. So, I think what you have at the moment is fine. Of possible interest is that I implemented array and map encoding/decoding in a completely different way to what was done in the other languages. Instead of encoding/decoding maps and arrays inline within the struct/message's encode/decode functions, I created separate encode/decode functions for each nameless type used within the schema. This helped reduce the mental gymnastics required to write the encode/decode functions and also avoids duplicating code in the generated code. |
Hey @cwize1 just as a heads up a new type was added in 2.1.0. |
I've completed updating my Go implementation to support unions. |
Sorry for the delay in replying, great work! I’m not fluent in Go but if you want to submit a pull-request will find the right person to review it. |
While I am happy to open a PR, I can't provide any guarantees that I'll always be available to provide support and maintenance. I did this project just for fun and will probably only continue working on it so long as it remains fun and it doesn't interfere with my day job. |
As of writing this, the documentation states it works with Go, as seen here: https://docs.bebop.sh/guide/getting-started/#supported-languages Despite this, the latest version of bebopc states it has no generator with the alias 'go'. Am I doing something wrong here? There is no documentation for actually generating Go code, so I am assuming it is not actually supported, and if that is the case, I am confused why it is stated to be supported in the docs. 200sc's reference implementation does work for me, but the docs imply that it is officially supported, not mentioning the unofficial implementation. |
Go support is handled by a third party where trying to upstream
https://github.com/200sc/bebop
Sent via Superhuman iOS ( ***@***.*** )
…On Fri, Jun 7 2024 at 3:13 PM, therathatter < ***@***.*** > wrote:
As of writing this, the documentation states it works with Go, as seen
here:
https://docs.bebop.sh/guide/getting-started/#supported-languages
image.png (view on web) (
https://github.com/betwixt-labs/bebop/assets/99104347/b197decc-173c-4c70-969b-5ad3249dcd5c
)
Despite this, the latest version of bebopc states it has no generator with
the alias 'go'. Am I doing something wrong here? There is no documentation
for actually generating Go code, so I am assuming it is not actually
supported, and if that is the case, I am confused why it is stated to be
supported in the docs.
—
Reply to this email directly, view it on GitHub (
#78 (comment) ) ,
or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AAJ4VNOC7OBGAZINNRI33VDZGFFQHAVCNFSM6AAAAABI6AYNQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUGE2TENZSGY
).
You are receiving this because you commented. Message ID: <betwixt-labs/bebop/issues/78/2154152726
@ github. com>
|
In case anyone is interested, I am currently working on adding Go support. Though fair warning: I am doing this for fun over my staycation and I currently don't have any plans to use it in any sort of production code.
I am uploading my changes as I go here: cwize1/Go.
It is still a work in progress. But I have made enough progress on it that I feel confident that I'll be able to have it mostly completed by the end of the year.
The text was updated successfully, but these errors were encountered: