Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Update room to support M1s with arm64 JDKs #11626

Closed
wants to merge 1 commit into from
Closed

Update room to support M1s with arm64 JDKs #11626

wants to merge 1 commit into from

Conversation

skhamis
Copy link
Contributor

@skhamis skhamis commented Jan 27, 2022

When M1 users start using the "more correct" arm64 JDKs after application-services PR lands mozilla/application-services#4792 android components fails to build because room doesn't have a M1-compatible fix until 2.4. The fix was found from:

https://stackoverflow.com/questions/68922875/room-database-is-not-working-in-mac-book-pro-m1

Note: This shouldn't land until mozilla/application-services#4792 lands

Pull Request checklist

  • Quality: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry or does not need one
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features

After merge

  • Milestone: Make sure issues closed by this pull request are added to the milestone of the version currently in development.
  • Breaking Changes: If this is a breaking change, please push a draft PR on Reference Browser to address the breaking issues.

@skhamis skhamis requested a review from a team as a code owner January 27, 2022 01:26
@skhamis
Copy link
Contributor Author

skhamis commented Jan 27, 2022

pinging @MatthewTighe to help confirm this with the other fix in application-services

@@ -54,7 +54,7 @@ object Versions {
const val test = "1.3.0"
const val test_ext = "1.1.2"
const val espresso = "3.3.0"
const val room = "2.3.0"
const val room = "2.4.0-alpha03"
Copy link
Member

Choose a reason for hiding this comment

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

I see there's already a stable 2.4.1 version on https://developer.android.com/jetpack/androidx/releases/room. We probably don't want to use an alpha version of 2.4.0 since there's also a stable 2.4.0 version as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see there's already a stable 2.4.1 version on https://developer.android.com/jetpack/androidx/releases/room. We probably don't want to use an alpha version of 2.4.0 since there's also a stable 2.4.0 version as well.

Thanks for the quick review! I actually tried that at first but unfortunately it fails with this error:

> Task :feature-addons:kaptGenerateStubsDebugKotlin FAILED
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
    /Users/skhamis/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.5.31/ff5d99aecd328872494e8921b72bf6e3af97af3e/kotlin-stdlib-jdk8-1.5.31.jar (version 1.5)
    /Users/skhamis/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.31/77e0f2568912e45d26c31fd417a332458508acdf/kotlin-stdlib-jdk7-1.5.31.jar (version 1.5)
    /Users/skhamis/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.10/b8af3fe6f1ca88526914929add63cf5e7c5049af/kotlin-stdlib-1.6.10.jar (version 1.6)
    /Users/skhamis/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.10/c118700e3a33c8a0d9adc920e9dec0831171925/kotlin-stdlib-common-1.6.10.jar (version 1.6)
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
e: warnings found and -Werror specified

> Task :compose-tabstray:compileDebugKotlin

My guess is because 2.4.1 upgraded to using kotlin 1.6 based on the commits in the 2.4.1 release
https://android.googlesource.com/platform/frameworks/support/+log/11c93b38ca49928eecf09ce48d7e6909a7264e05..3dda6c958a641fad4196ebc9b2e58a6f381ffdb4/room

which is a bit unfortunate but didn't want to make this a bigger change until a-c was ready to move to that version!

@jonalmeida
Copy link
Contributor

Duplicate of #11516?

@skhamis
Copy link
Contributor Author

skhamis commented Jan 27, 2022

Duplicate of #11516?

Only slightly, though it looks like that one is more in progress for the whole Kotlin 1.6 where this is mainly a bump in version to ensure M1's using the native arm64 JDK doesn't break when mozilla/application-services#4792 lands to fix M1 issues on a-s side of things.

@jonalmeida
Copy link
Contributor

We don't usually use pre-release versions of dependencies which is why we were waiting for a stable version (and those stable versions also include Kotlin 1.6).

@skhamis
Copy link
Contributor Author

skhamis commented Feb 3, 2022

We don't usually use pre-release versions of dependencies which is why we were waiting for a stable version (and those stable versions also include Kotlin 1.6).

I'll close this PR to avoid breaking process here and let a-c update this as part of the kotlin 1.6 upgrade!

@skhamis skhamis closed this Feb 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants