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

Issue #8319: Update to Kotlin 1.4 and Coroutines 1.3.9. #8359

Closed
wants to merge 1 commit into from

Conversation

pocmo
Copy link
Contributor

@pocmo pocmo commented Sep 9, 2020

Let's see what taskcluster says. I am able to build sample browser locally with those changes.

@pocmo pocmo added the 🕵️‍♀️ needs review PRs that need to be reviewed label Sep 9, 2020
@pocmo
Copy link
Contributor Author

pocmo commented Sep 9, 2020

[task 2020-09-09T13:30:12.377Z] Exception: task post-signing/post-signing-nightly has too many dependencies (100 > 99)

RelEng is currently trying to fix this.

@@ -1,47 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
Copy link
Contributor

Choose a reason for hiding this comment

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

We're removing these tests for the Kotlin update?

Copy link
Contributor Author

@pocmo pocmo Sep 14, 2020

Choose a reason for hiding this comment

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

At first I wanted to fix them since using a null value for a non-null variable in Kotlin now throws NullPointerException instead of IllegalStateException as before, ... then I noticed that they do not actually test anything:

What happens is that GeckoViewWebNotification is mocked (so everything returns null). Once we pass it into onShowNotification() the code will call toWebNotification() on the mock. This will throw since tag is not nullable (in WebNotification), but that's what the mock returns for tag. Then back in the test we catch that exception and do an assert on the message. So we do not really test our code at all. What we are testing is that the Kotlin compiler adds a null check with a specific message, a good test, but now for us? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds quite reasonable, thanks!

@@ -235,6 +234,8 @@ internal class RustPushConnection(
)

return DecryptedMessage(scope, data)
} else {
return null
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting that the previous compiler didn't catch this! I wonder if it did some implicit return null.

@jonalmeida jonalmeida self-assigned this Sep 14, 2020
@jonalmeida jonalmeida added 🛬 needs landing PRs that are ready to land and removed 🕵️‍♀️ needs review PRs that need to be reviewed labels Sep 14, 2020
@pocmo pocmo added ✏️ needs changes PRs that need some changes/fixes before they can land and removed 🛬 needs landing PRs that are ready to land labels Sep 14, 2020
@pocmo
Copy link
Contributor Author

pocmo commented Sep 14, 2020

Not ready yet. :)

@jonalmeida
Copy link
Contributor

Oops!

@pocmo
Copy link
Contributor Author

pocmo commented Sep 15, 2020

Looks like the last things left are some issues with Glean. The team currently has a work week. End of the week we want to look at getting the Gradle plugin working with Glean, maybe that will also fix issues here: #8360.

@pocmo
Copy link
Contributor Author

pocmo commented Sep 28, 2020

Added that change to #8360.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✏️ needs changes PRs that need some changes/fixes before they can land
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants