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

Google.Apis.Games.v1 NuGet package outdated #682

Closed
NKnusperer opened this issue Feb 18, 2016 · 6 comments
Closed

Google.Apis.Games.v1 NuGet package outdated #682

NKnusperer opened this issue Feb 18, 2016 · 6 comments
Assignees

Comments

@NKnusperer
Copy link

The NuGet version is outdated, it is v1.9.0.1030 while all other packages are v1.10.0.
This not only makes it unusable with other API packages but also missing Google.Apis.Games.v1.ApplicationsResource.VerifyRequest which I need.
Please update the package.

@chrsmith
Copy link
Contributor

@NKnusperer The NuGet package was published the last time the Games API was able to be built and work correctly with the C# libraries. I'll follow up with the internal team at Google responsible for the API and see what they need to do so that it can work correctly with C# again.

@chrisdunelm chrisdunelm assigned chrisdunelm and unassigned chrsmith Sep 16, 2016
@chrisdunelm
Copy link
Contributor

The reason this doesn't currently build is the enum definition here, in which "played_with" and "playedWith" both map to the same "PlayedWith" name in C#, causing a compile failure.

I've confirmed with the Games team that this enum is never persisted server-side, and is only used as a client-to-server parameter, so we can simply remove the deprecated value from the games_v1.json file. Then this library will build correctly again, and we can release a new version.
We hope to do this in the next week or two.

@mmdriley
Copy link
Contributor

The build machinery downloads the API definitions anew each time. What's your plan to pin a modified version of the games API?

What if the games API changes again later? Would we need to notice and manually unpin and repin?

One option I considered here was a "patch step", where after downloading the API definitions, but before generating code for them, we could apply some targeted patches. In this case, we'd remove one enum element.

@mmdriley
Copy link
Contributor

The patch step could live pretty naturally in get_discovery_documents.py.

One subtle point: the easiest way to cause build problems is to write the same file twice. In cases where we patch the discovery document, we should either do it before writing it out, or write the patched version to a separate file.

If we patch before writing, we should probably write the unmodified version somewhere for comparison. (But we shouldn't bother doing this for unpatched APIs.)

If we write the patch to a new file, we need to change the downstream machinery to consume that file instead of the original. I can imagine MSBuild trickery that would make this work, but it seems unnecessarily complicated.

I'd suggest we go the former route: write the patched JSON to games_v1.json and the original JSON to games_v1.pristine or similar.

If we ever extend this patching to other APIs -- specifically, APIs that are currently building -- we'll need to worry about bumping the revision to ensure that we build and publish new libraries. That's not a concern here since we haven't produces a library for Games.v1 in a while.

When you're testing this, don't forget to remove Games.v1 from the exclusion list in GeneratedLibraries.proj.

@chrisdunelm
Copy link
Contributor

@mmdriley Yes, we're almost certainly going to do a patch step; I haven't yet planned all the exact filenames to use, but may well do it pretty much as you suggest.

chrisdunelm added a commit to chrisdunelm/google-api-dotnet-client that referenced this issue Oct 14, 2016
chrisdunelm added a commit that referenced this issue Oct 17, 2016
chrisdunelm added a commit that referenced this issue Oct 24, 2016
Update supported platform list (#852)
Patch directory and games discovery-docs (#851)
Fixes #757 and #682.
Tidy up nuspec files (#857)
Conform nuspec descriptions to agree exactly with the README file
Update version 1.17.0 -> 1.18.0 (#858)
@chrisdunelm
Copy link
Contributor

This was fixed in release v1.18.0. Closing.

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

4 participants