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

Improve handling of Kotlin versioning #78875

Open
stuartmorgan opened this issue Mar 23, 2021 · 2 comments
Open

Improve handling of Kotlin versioning #78875

stuartmorgan opened this issue Mar 23, 2021 · 2 comments
Labels
c: proposal A detailed proposal for a change to Flutter P3 Issues that are less important to the Flutter project platform-android Android applications specifically team-android Owned by Android platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-android Triaged by Android platform team

Comments

@stuartmorgan
Copy link
Contributor

(See #78792 for background, with bluefireteam/audioplayers#714 (comment) as an example of the pain point)

Our create template is apparently using a fairly old version of Kotlin, and it appears that there are issues if plugin developers attempt to use a newer version. Some things we should consider:

  • Updating the templates to a newer version (only fixes new apps)
  • Warning (or migrating, if that's backwards compatible; I'm not familiar with the specifics of Kotlin versioning behaviors) for apps with old Kotlin versions.

However, we'll still have this a general problem going forward, so we should figure out how we're going to handle that. /cc @blasten as #59037 (comment) sounds like a potential solution here. If each plugin can choose its version of Kotlin without conflicting with other plugins and/or the app, that would be ideal. Failing that we'll likely need an ongoing communication and migration strategy so that plugin developers a) know what version is safe to use, and b) can regularly get that version moved forward if possible.

@stuartmorgan stuartmorgan added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 23, 2021
@larssn
Copy link

larssn commented Mar 31, 2021

@stuartmorgan But luanpotter commented that the fix was to upgrade to 1.4, as it has trailing commas. If Flutter defaulted to the newest version of kotlin, users wouldn't be having these issues in the first place. So as I see it, the pain point is you guys NOT upgrading to kotlin 1.4.

Also, upgrading the kotlin version is super easy, and something most people should be able to figure out. Another option is to update the tooling, to automatically update kotlin on behalf of the user.

@stuartmorgan
Copy link
Contributor Author

If Flutter defaulted to the newest version of kotlin, users wouldn't be having these issues in the first place.

Please refer to the last paragraph in the issue description. This is a general problem; 1.4 is not going to be the last time something is added to Kotlin.

Also, upgrading the kotlin version is super easy, and something most people should be able to figure out.

The existence of issues like the one linked above is evidence that just leaving it up to everyone to manage their own Kotlin version without tooling assistance isn't a great approach. If it were trivial for everyone to just do this themselves, it wouldn't really matter what version the template used.

Another option is to update the tooling, to automatically update kotlin on behalf of the user.

That's mentioned above. There are potential issues with code that is broken by updates however; backwards compatibility is not guaranteed.

@darshankawar darshankawar added platform-android Android applications specifically c: proposal A detailed proposal for a change to Flutter labels Aug 16, 2022
@GaryQian GaryQian added the P3 Issues that are less important to the Flutter project label Aug 16, 2022
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-android Owned by Android platform team triaged-android Triaged by Android platform team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: proposal A detailed proposal for a change to Flutter P3 Issues that are less important to the Flutter project platform-android Android applications specifically team-android Owned by Android platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-android Triaged by Android platform team
Projects
None yet
Development

No branches or pull requests

5 participants