-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
WIP: Change all applicable IDs in the project from int --> long #2352
Conversation
I worry about updating to 1.0 but am happy to do a big breaking changes note for this release. |
@shiftkey actually I think given the weight of 1.0 release and the current availability of maintainers, I'd keep it as the next 0.x and publicize the changes. We can make sure there's a good write-up in the release notes. |
An update here -- it's clear at this point from the many "oops" commits that I misunderstood that many IDs in the API level are indeed intended to be So, my next steps to get through this are:
At that point we should be back on the right track. |
Sigh....this is on me. @shiftkey, the more I look at it, the more these IDs are correctly We have a few options:
I'm fine to proceed either way, including if I should close this out and start over to get rid of the mess. Let me know and I'll get it all wrapped up the way we want. 👍 |
@shiftkey what do you think?
Happy to see this through, but realized I should probably get that clarification first. |
Migrates all integer types from `int` (32-bit) to `long` (64-bit). Could I be a bit more directed with these changes? Probably. But the it's simpler and easier to migrate all `int`s to `long`s rather than debate how large a specific ID is going to be. Closes #30 References: - #30 - octokit/octokit.net#2351 - octokit/octokit.net#2352 - https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types
👋 Hey Friends, this pull request has been automatically marked as |
It's been a long time coming. 😆
Resolves #2351.
⚠I assume this would mandate a breaking/major release.
My Approach
If I'm going to be honest, it's a little bit "search and destroy". I'm going for wholesale change in the project and ensuring that all IDs can be
long
s going forward. So I'm searching with a regex ofint [^=]*Id
andint\? [^=]*Id
and going from there.Work
int [^=]*Id
searchint\? [^=]*Id
int [^=]*number
just in caseint\? [^=]*number
just in caseint
IDs I accidentally captured aslong
have been changed back.Items To Confirm / Change based on feedback
PullRequestReview.Number
Seems like it should remain int, given it's the display value and I don't think we're in danger of running out there)leaving alone for now per comments.Account.DiskUsage
should this remain an int? Need to double-check on how it's used.leaving alone per commentsGpgKey.PrimaryKeyId
this is anTreating like an ID but ensuring it handles null. (Update: leaving this alone as API defines it a an int.)int?
. Not sure enough of the usage to change it right away