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

Nullable anotation Part2 (+1 small "bux" fix) #252

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

AoshiW
Copy link

@AoshiW AoshiW commented Oct 23, 2023

  1. Nullable annotation Part 2 for TwitchLib.Client
  2. fixed bug with false positive OnFailureToReceiveJoinConfirmation when Capabilities.Tags is set to false

Copy link
Member

@swiftyspiffy swiftyspiffy left a comment

Choose a reason for hiding this comment

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

lgtm, though this is going to be a breaking change for a lot of people right? given that if something is nullable it needs to be handled as such?

@swiftyspiffy swiftyspiffy merged commit 70dead0 into TwitchLib:dev Oct 30, 2023
1 check passed
@Syzuna
Copy link
Member

Syzuna commented Oct 30, 2023

well the whole of v4 with the rewrite of the underlying communications package is full of breaking changes. so add it to the list :D

@AoshiW AoshiW deleted the nullable-anotation branch October 30, 2023 07:49
@AoshiW
Copy link
Author

AoshiW commented Oct 30, 2023

though this is going to be a breaking change for a lot of people right?

it depends, some people most people will get some warnings (or errors- depending on the project settings, the default is warnings) after upgrading to V4 but in the end it's not a bad thing. It's better if the IDE tells you "This may be null and you should check it." than to get a NullReferenceException.

given that if something is nullable it needs to be handled as such?

in most cases YES, (but you had to do the same check in V3, but there you didn't get a warning on null values)
but there will be cases when you know something is not null (for example you have 3 nullable properties and you know that if one of them is not null then the other 2 are not null either) and in such cases you can ignore it with !.

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.

3 participants