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

Remove PICSGetProductInfo overloads that takes uint #1009

Merged
merged 4 commits into from
Aug 1, 2021
Merged

Remove PICSGetProductInfo overloads that takes uint #1009

merged 4 commits into from
Aug 1, 2021

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Jul 30, 2021

@JustArchi had a good suggestion to deprecate these overloads, as you really should be requesting app info while providing a token.

I also added an overload that takes one PICSRequest to make migrating easier.

@archi
Copy link

archi commented Jul 30, 2021

I suppose you intended to ping @JustArchi? ;-)
If not: Yes, overload the tokens to migrate the PICSRequest for deprecation of the app info :P

@JustArchi
Copy link
Contributor

What @archi said 😁

@@ -185,6 +185,7 @@ public AsyncJob<PICSChangesCallback> PICSGetChangesSince( uint lastChangeNumber
/// <param name="package">Package id requested.</param>
/// <param name="metaDataOnly">Whether to send only meta data.</param>
/// <returns>The Job ID of the request. This can be used to find the appropriate <see cref="PICSProductInfoCallback"/>.</returns>
[Obsolete( "Use an overload that takes PICSRequest instead of uint. In SteamKit 2.3, this overload had four parameters, but onlyPublic was removed. Audit your code." )]
Copy link
Contributor

@JustArchi JustArchi Jul 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still believe we should just remove this overload entirely right away, so nobody disregards the warning and ends up with broken functionality, but if we really intend to support it then obsoletion mark is still far better than silent breaking change.

@yaakov-h
Copy link
Member

Sample 9 needs to be updated so that it doesn't use deprecated APIs.

There are a few different ways to do this:

  • If we care about source compatibility then we're pretty much screwed unless we keep the old method and have it throw if you set the flag to true.
  • If we care about binary compatibility then we need to keep the old method, but can tag it with [Obsolete] and even [EditorBrowsable(Never)].
  • If we don't care about either - which we largely do not - then we can just dump the old methods. The PICSRequest overloads should be pretty much zero-cost anyway, now that PICSRequest is a struct.

@xPaw xPaw changed the title Make PICSGetProductInfo changes not so silently breaking Remove PICSGetProductInfo overloads that takes uint Jul 31, 2021
@yaakov-h yaakov-h merged commit 5050024 into SteamRE:master Aug 1, 2021
@xPaw xPaw deleted the pics branch August 1, 2021 08:14
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

Successfully merging this pull request may close these issues.

4 participants