Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Bug 1862794 - Use function calls instead of const val for version and channel fields in Gecko object. #4346

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

kycn
Copy link
Contributor

@kycn kycn commented Nov 2, 2023

Gradle sometimes does not fetch the GeckoView version stated in Gecko.kt file. This may be due to the combination of Gradle's compile avoidence feature and our use of ComponentsDependencies object. As the changes for GeckoView versions occur in Gecko.kt file and there's no change in DependenciesPlugin.kt file, Gradle sometimes does not recognize the changes in Gecko.kt file while parsing gradle files for fetching the changed library versions. To overcome this problem and make sure Gecko.kt file is always evaluated/parsed while Gradle sync operation is executed, the version and channel are no longer const val (i.e. static) but rather a function call that will have to be executed everytime.

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

  • Breaking Changes: If this is a breaking Android Components change, please push a draft PR on Reference Browser to address the breaking issues.

To download an APK when reviewing a PR (after all CI tasks finished running):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-apk-{fenix,focus,klar}-debug task you're interested in.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

https://bugzilla.mozilla.org/show_bug.cgi?id=1862794

Copy link
Collaborator

@jonalmeida jonalmeida left a comment

Choose a reason for hiding this comment

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

Your change looks pretty harmless, let's merge it asap so we can test out your theory! 🤞

Copy link
Contributor

mergify bot commented Nov 3, 2023

This pull request has conflicts when rebasing. Could you fix it @kycn? 🙏

@github-actions github-actions bot added approved PR that has been approved and removed 🕵️‍♀️ needs review PRs that need to be reviewed labels Nov 3, 2023
@kycn kycn added 🛬 needs landing PRs that are ready to land and removed approved PR that has been approved labels Nov 3, 2023
Copy link
Contributor

mergify bot commented Nov 3, 2023

This pull request has conflicts when rebasing. Could you fix it @kycn? 🙏

@github-actions github-actions bot added the approved PR that has been approved label Nov 3, 2023
@kycn kycn added 🛬 needs landing PRs that are ready to land and removed 🛬 needs landing PRs that are ready to land approved PR that has been approved labels Nov 3, 2023
@gabrielluong gabrielluong added approved PR that has been approved and removed 🛬 needs landing PRs that are ready to land labels Nov 3, 2023
@gabrielluong
Copy link
Member

gabrielluong commented Nov 3, 2023

We will need a parallel changes to https://github.com/mozilla-mobile/relbot/blob/master/src/util.py#L77 and https://github.com/mozilla-mobile/relbot/blob/master/src/util.py#L93. The best way to test this would be to use a local fork of firefox-android and replace the github workflow with your fork relbot changes and force the github action to run with an older version of GV in Gecko.kt.

Copy link
Contributor

mergify bot commented Nov 4, 2023

This pull request has conflicts when rebasing. Could you fix it @kycn? 🙏

Copy link
Contributor

mergify bot commented Nov 15, 2023

This pull request has conflicts when rebasing. Could you fix it @kycn? 🙏

… channel fields in Gecko object.

Gradle sometimes does not fetch the GeckoView version stated in Gecko.kt file. This may be due to the combination of Gradle's compile avoidence feature and our use of ComponentsDependencies object. As the changes for GeckoView versions occur in Gecko.kt file and there's no change in DependenciesPlugin.kt file, Gradle sometimes does not recognize the changes in Gecko.kt file while parsing gradle files for fetching the changed library versions. To overcome this problem and make sure Gecko.kt file is always evaluated/parsed while Gradle sync operation is executed, the version and channel are no longer const val (i.e. static) but rather a function call that will have to be executed everytime.
@kycn kycn added 🛬 needs landing PRs that are ready to land and removed approved PR that has been approved labels Nov 16, 2023
@github-actions github-actions bot added the approved PR that has been approved label Nov 16, 2023
@mergify mergify bot merged commit 234249b into mozilla-mobile:main Nov 16, 2023
298 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved PR that has been approved 🛬 needs landing PRs that are ready to land
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants