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

Fix #3276: Create Build.bazel file for onboarding #3877

Merged
merged 30 commits into from
Dec 14, 2021
Merged

Fix #3276: Create Build.bazel file for onboarding #3877

merged 30 commits into from
Dec 14, 2021

Conversation

rishidyno
Copy link
Contributor

@rishidyno rishidyno commented Oct 4, 2021

Fix #3276

Explanation

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

@rishidyno rishidyno changed the title create-bazel-file-for-onboarding Fix #3276: create-bazel-file-for-onboarding Oct 4, 2021
@rishidyno
Copy link
Contributor Author

@BenHenning I am getting this error can you please help me out with this. Even after adding dependencies to the app BUILD.bazel file, I am not able to build below are the log files.
Screenshot from 2021-10-04 22-22-43

Screenshot from 2021-10-04 22-22-51

@BenHenning BenHenning self-assigned this Oct 4, 2021
@BenHenning
Copy link
Sponsor Member

Thanks @rishidyno! Apologies, but I'll need to take a look at this tomorrow.

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @rishidyno. Had some follow-up comments. PTAL.

@BenHenning I am getting this error can you please help me out with this. Even after adding dependencies to the app BUILD.bazel file, I am not able to build below are the log files. Screenshot from 2021-10-04 22-22-43

Screenshot from 2021-10-04 22-22-51

This issue is coming because OnboardingSlideFinalViewModel needs AppStartupStateController, but its dependency can't be resolved. You only added AppStartupStateController to "app" library, but OnboardingSlideFinalViewModel is defined as part of "view_models" (which means view_models' deps need to be updated to point to AppStartupStateController's library).

@BenHenning BenHenning assigned rishidyno and unassigned BenHenning Oct 6, 2021
@rishidyno
Copy link
Contributor Author

Thanks @rishidyno. Had some follow-up comments. PTAL.

@BenHenning I am getting this error can you please help me out with this. Even after adding dependencies to the app BUILD.bazel file, I am not able to build below are the log files. Screenshot from 2021-10-04 22-22-43
Screenshot from 2021-10-04 22-22-51

This issue is coming because OnboardingSlideFinalViewModel needs AppStartupStateController, but its dependency can't be resolved. You only added AppStartupStateController to "app" library, but OnboardingSlideFinalViewModel is defined as part of "view_models" (which means view_models' deps need to be updated to point to AppStartupStateController's library).

Actually, I tried doing that but there is no build.bazel file for app/onboarding. For this I will have to create bazel file for app/onboarding as well. should I do that?

@oppiabot oppiabot bot assigned BenHenning and unassigned rishidyno Oct 6, 2021
@oppiabot
Copy link

oppiabot bot commented Oct 6, 2021

Unassigning @rishidyno since a re-review was requested. @rishidyno, please make sure you have addressed all review comments. Thanks!

@rishidyno
Copy link
Contributor Author

Thanks @rishidyno. Had some follow-up comments. PTAL.

@BenHenning I am getting this error can you please help me out with this. Even after adding dependencies to the app BUILD.bazel file, I am not able to build below are the log files. Screenshot from 2021-10-04 22-22-43
Screenshot from 2021-10-04 22-22-51

This issue is coming because OnboardingSlideFinalViewModel needs AppStartupStateController, but its dependency can't be resolved. You only added AppStartupStateController to "app" library, but OnboardingSlideFinalViewModel is defined as part of "view_models" (which means view_models' deps need to be updated to point to AppStartupStateController's library).

Actually, I tried doing that but there is no build.bazel file for app/onboarding. For this I will have to create bazel file for app/onboarding as well. should I do that?

Please, let me know If I have left any changes suggested by you.

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @rishidyno. Had some more follow-up comments--PTAL.

Thanks @rishidyno. Had some follow-up comments. PTAL.

@BenHenning I am getting this error can you please help me out with this. Even after adding dependencies to the app BUILD.bazel file, I am not able to build below are the log files. screenshot
screenshot

This issue is coming because OnboardingSlideFinalViewModel needs AppStartupStateController, but its dependency can't be resolved. You only added AppStartupStateController to "app" library, but OnboardingSlideFinalViewModel is defined as part of "view_models" (which means view_models' deps need to be updated to point to AppStartupStateController's library).

Actually, I tried doing that but there is no build.bazel file for app/onboarding. For this I will have to create bazel file for app/onboarding as well. should I do that?

Please, let me know If I have left any changes suggested by you.

You'll need to change

deps = [
sincce that's the library that contains the view model that needs the new dependency.

@BenHenning BenHenning removed their assignment Oct 7, 2021
@rishidyno
Copy link
Contributor Author

@BenHenning Made all required changes PTAL.

@oppiabot oppiabot bot assigned BenHenning and unassigned rishidyno Oct 7, 2021
@oppiabot
Copy link

oppiabot bot commented Oct 7, 2021

Unassigning @rishidyno since a re-review was requested. @rishidyno, please make sure you have addressed all review comments. Thanks!

@rishidyno
Copy link
Contributor Author

rishidyno commented Nov 19, 2021

@BenHenning I am really sorry for being away.
PTAL
Now, 4 tests are failing.
1.https://github.com/oppia/oppia-android/runs/4261785618?check_suite_focus=true
2.https://github.com/oppia/oppia-android/runs/4261785923?check_suite_focus=true
These are the links to the log.
This test is failing and I can't seem to understand it.
3. Lint test - which I think I have looked for any mistakes I might have made but I could not find any, please take look into this also,
I would like to know if there exists a script for auto-formatting of bazel files.

@BenHenning
Copy link
Sponsor Member

FYI I'm listed as a codeowner for this PR & I'll be unavailable to perform code reviews over the next 2 weeks--thanks for your patience.

@BenHenning
Copy link
Sponsor Member

@BenHenning I am really sorry for being away. PTAL Now, 4 tests are failing. 1.https://github.com/oppia/oppia-android/runs/4261785618?check_suite_focus=true 2.https://github.com/oppia/oppia-android/runs/4261785923?check_suite_focus=true These are the links to the log. This test is failing and I can't seem to understand it. 3. Lint test - which I think I have looked for any mistakes I might have made but I could not find any, please take look into this also, I would like to know if there exists a script for auto-formatting of bazel files.

@rishidyno the Bazel lint check output isn't very helpful, but you're right that there are syntax errors. Buildifier is a tool that can automatically fix most Bazel build file errors: https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md.

Regarding the actual failures, the top error I see is:

2021-11-19T08:25:54.2670669Z WARNING: errors encountered while analyzing target '//domain:src/test/java/org/oppia/android/domain/exploration/lightweightcheckpointing/ExplorationStorageModuleTest': it will not be built

This usually means a syntax or logical build graph issue in the BUILD file the test is defined. Since this is an unmigrated test, that means domain/BUILD.bazel. However, since you didn't change that file then it means one of the build files it depends on has the issue. I suggest going through the build files one-by-one and comment out your changes until you find the culprit line. That should help you then figure out what went wrong.

@BenHenning BenHenning removed their assignment Nov 20, 2021
@oppiabot
Copy link

oppiabot bot commented Nov 27, 2021

Hi @rishidyno, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Nov 27, 2021
@rishidyno rishidyno removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Dec 2, 2021
domain/BUILD.bazel Outdated Show resolved Hide resolved
@rishidyno
Copy link
Contributor Author

@BenHenning all tests have passed PTAL .

@oppiabot oppiabot bot assigned BenHenning and unassigned rishidyno Dec 7, 2021
@oppiabot
Copy link

oppiabot bot commented Dec 7, 2021

Unassigning @rishidyno since a re-review was requested. @rishidyno, please make sure you have addressed all review comments. Thanks!

@rishidyno rishidyno changed the title Fix #3276: create-bazel-file-for-onboarding Fix #3276: Create Build.bazel file for onboarding Dec 7, 2021
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @rishidyno! I think you might have missed one of my past comments--PTAL (in general, please make sure to reply to all reviewer comments before sending the PR back for review just to make sure everything's been acknowledge or addressed). You can quickly find these by going to the 'Conversations' drop down on the 'Files changed' tab.

Beyond that, the PR looks really good. I think just the one change I'm requesting is needed before this PR can be merged.

@BenHenning BenHenning assigned rishidyno and unassigned BenHenning Dec 10, 2021
@rishidyno rishidyno assigned BenHenning and unassigned rishidyno Dec 11, 2021
@rishidyno
Copy link
Contributor Author

@BenHenning All tests have passed PTAL.

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @rishidyno! This LGTM.

@BenHenning BenHenning merged commit fb3072a into oppia:develop Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a BUILD.bazel file for domain/onboarding
3 participants