-
Notifications
You must be signed in to change notification settings - Fork 136
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
Change 'methods' in definitions to be more generic #24
Comments
This is a very difficult. |
I was stressing a bit about this last night but then I reminded myself of something: we are already doing code generation based off of a DSL. That's exactly what our generated ruby definitions are today! This is just making it repeatable instead of allowing for raw ruby. If you think about it that way it is a little less intimidating (for myself, at least). 😄 |
Okay, I think I have officially given up. I banged my head against this for a few days and I just...can't figure out a way to come up with a simple DSL that covers the existing custom methods we have. Things just got ridiculously complicated when I started trying. I was basically coming up with some kind of source parser/tokenizer. I kept feeling like I was missing something obvious (I still do) but...I just can't see the simple solution. I kept thinking "This is crazy complex, what am I doing". So the solution I came up with is specifying "ruby" source in the definitions. This means that when I start adding a golang client I will need to add custom go code for each existing method. It also means that new custom methods will require someone to write custom code for each custom method for each language we eventually have. That sucks. I recognize this. But it's a problem for the future. I think I'm effectively punting and hoping that someone way smarter than me comes along to solve my problem before I need to worry about it. 😬 The solution I have will let me make minimal changes to the ruby project AND start writing the golang project I've been dreaming about for a while now. It also frees me up to figure out a way for people to test their definition changes against downstream repos (i.e. ruby) before submitting a PR, which I feel is a bigger problem now. |
Addressed by #79! Closing this issue. |
This one is gonna be tough. In order to complete the transition to completely generic YAML in our definitions (thereby allowing the definitions to be used in other languages) we will need to come up with a DSL for removing the current ruby code that makes up the definitions. I don't have solid ideas yet for what we will do but I will use this issue as a way to propose ideas going forward.
Example:
This could be done as follows:
There are a few immediate concerns:
The text was updated successfully, but these errors were encountered: