cloudstream icon indicating copy to clipboard operation
cloudstream copied to clipboard

metaproviders: use new* methods

Open Luna712 opened this issue 1 year ago • 3 comments

Luna712 avatar Jul 26 '24 21:07 Luna712

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?

Luna712 avatar Aug 08 '24 22:08 Luna712

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

fire-light42 avatar Aug 09 '24 00:08 fire-light42

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.

Luna712 avatar Aug 09 '24 01:08 Luna712

I have waited for this pr for a long time now.

LagradOst avatar Feb 04 '25 23:02 LagradOst

🙏

LagradOst avatar Feb 04 '25 23:02 LagradOst