-
Notifications
You must be signed in to change notification settings - Fork 106
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
Fix generation #153
Fix generation #153
Conversation
Hi there! So, I wanted to regenerate things to use a new features of the API, and I stumbled on the same problem as you (which I re-fixed, instead of checking your changes first). I also have figured out this last problem, which sadly doesn't have one straightforward solution. The piece of code that is failingOne of job of the generator is to create types for each type in the API, and lenses for each field. Since different type have fields with the same names, it's necessary to disambiguate the lenses. Here, we do this by adding a prefix based on the type. This is what the What went wrong hereSo, gogol makes a api wrapper that works for every single version of the api. Sadly, it looks like google went over-the-top with the versioning for some of these api. For this problematic one, So when we get to How to fix this
|
This avoids possible edge cases where many prefixes are already used and they run out. brendanhay#153 (comment) contains a great indepth analysis of the issue. Thanks @madjar
4319256
to
4742a11
Compare
Thanks @madjar for the awesome analysis on the videointelligence issue! ❤️ Solution for right nowI think your solution is perfect as a quick fix. I'm not sure if it is the right end game solution, but it is better than exploding as it does now and it doesn't introduce any breakage. Longer term solutionAgree this is tricky. Versions do appear to be deprecated officially ie. https://cloud.google.com/video-intelligence/docs/reference/rest , so perhaps such versions can be dropped from support. I believe Perhaps @brendanhay has plans around this for gogol v2. Regardless, I think the short term fix is good and essentially a bug fix to the current design. I would create a separate issue for a redesign and prioritize it against other improvements. Anyway, @brendanhay I think is ready for review. |
Thanks @madjar and @AlistairB! Longer term (v2) I'll probably just supply the Regarding:
I think we'd probably just keep anything stable with no prerelease suffix, such as For example the available versions |
This avoids possible edge cases where many prefixes are already used and they run out. #153 (comment) contains a great indepth analysis of the issue. Thanks @madjar
Awesome! Thanks folks! I was looking quickly generic lenses and optics, and at As a side note, I think |
Hi,
I've fixed a couple of issues in the 2 commits so far. I'm mostly cargo culting the fixes so it could be the wrong solution, but it seems to make it pass.
The next issue I don't know how to fix:
Any ideas?