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

metaproviders: use new* methods #1216

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Luna712
Copy link
Contributor

@Luna712 Luna712 commented Jul 26, 2024

No description provided.

Copy link
Collaborator

@fire-light42 fire-light42 left a comment

Choose a reason for hiding this comment

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

I will leave this to be merged before stable as it changes MainAPI. You can also change some other vals to vars like LiveSearchResponse::lang to reduce the number of times of breaking MainAPI changes.

@Luna712
Copy link
Contributor Author

Luna712 commented Aug 8, 2024

I will leave this to be merged before stable as it changes MainAPI. You can also change some other vals to vars like LiveSearchResponse::lang to reduce the number of times of breaking MainAPI changes.

Would changing a val to a var really break MainAPI at all though? I thought that was kinda interchangeable when using val to var just not var to val?

@fire-light42
Copy link
Collaborator

I will leave this to be merged before stable as it changes MainAPI. You can also change some other vals to vars like LiveSearchResponse::lang to reduce the number of times of breaking MainAPI changes.

Would changing a val to a var really break MainAPI at all though? I thought that was kinda interchangeable when using val to var just not var to val?

It will break extentions on stable that are using prerelease jar as target. To explain why, look at how var generates a set and get function, while val only generates a getter. Any prerelease code running on stable will call the setter and generate an NoSuchMethodError. Look at https://godbolt.org/z/8r5oW98n6

@Luna712
Copy link
Contributor Author

Luna712 commented Aug 9, 2024

I will leave this to be merged before stable as it changes MainAPI. You can also change some other vals to vars like LiveSearchResponse::lang to reduce the number of times of breaking MainAPI changes.

Would changing a val to a var really break MainAPI at all though? I thought that was kinda interchangeable when using val to var just not var to val?

It will break extentions on stable that are using prerelease jar as target. To explain why, look at how var generates a set and get function, while val only generates a getter. Any prerelease code running on stable will call the setter and generate an NoSuchMethodError. Look at https://godbolt.org/z/8r5oW98n6

Thank you that is very good to know.

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.

2 participants