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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Weird circular dependency between firebase_ui_auth and firebase_ui_oauth #266

Open
1 task done
tapizquent opened this issue Jan 29, 2024 · 3 comments
Open
1 task done

Comments

@tapizquent
Copy link

tapizquent commented Jan 29, 2024

Is there an existing issue for this?

  • I have searched the existing issues and found no duplicates.

What plugin is this bug for?

Firebase UI Auth, Firebase UI OAuth

What platform(s) does this bug affect?

Android, iOS, Web, macOS, Linux, Windows

List of dependencies used.

flutter pub deps -s list
  

Steps to reproduce

I was trying to make a change to the firebase_ui_auth package to change some colors (that are not configurable and look hideous on dark mode btw, please view #18) , but when I made the change, I noticed that it kept failing on me with

Because firebase_ui_oauth 1.4.17 depends on firebase_ui_auth ^1.12.1 and no versions of firebase_ui_oauth match >1.4.17 <2.0.0, firebase_ui_oauth ^1.4.17 requires firebase_ui_auth from hosted.
So, because award_ace depends on firebase_ui_auth from git which depends on firebase_ui_oauth ^1.4.17, version solving failed.
exit code 1

Upon closer inspection, I noticed that firebase_ui_auth depends on firebase_ui_oauth: ^1.4.17 and firebase_ui_oauth depends on firebase_ui_auth: ^1.12.1. This seems like a weird circular dependency and anti-pattern. To me, having a package depend on one but it depend on the other doesn't seem like a great approach, and causes issue when trying to do what I am trying to do.

Could someone please explain why this is?? Which definitely seems like a bug

Expected Behavior

No circular dependency here. Both should potentially depend on firebase_ui_shared which they already do.

Actual Behavior

Circular dependency

Additional Information

No response

@danagbemava-nc
Copy link
Contributor

Hi @tapizquent, can you provide the steps to reproduce the issue? Pub usually is able to resolve the dependencies by itself. When I added both plugins into a new project it worked without any issue

@danagbemava-nc danagbemava-nc added the blocked: customer response Waiting for customer response, e.g. more information was requested. label Jan 29, 2024
@tapizquent
Copy link
Author

Hey @danagbemava-nc

It is good to know that I am not publishing the package through Pub because I am accessing just my fork from my git url.

Steps are:

  • Fork repository
  • Clone the repo from the fork into your machine
  • Make changes to firebase_ui_auth or don't, doesn't really matter.
  • Push changes to forked repo
  • In any Flutter app, import the package from the forked repo with
firebase_ui_auth:
    git:
      url: https://github.com/<YOUR_USERNAME>/FirebaseUI-Flutter.git
      path: packages/firebase_ui_auth
      ref: main
  • Save

You will see the error complaining that the package depends on firebase_ui_oauth and thus must be imported from hosted

Anyway, my concern still applies. Why are these packages depending on each other? Doesn't seem very intuitive

@danagbemava-nc
Copy link
Contributor

I can't say for sure why they depend on each other but I can reproduce the issue.

Labeling for further investigation

cc @lesnitsky

@danagbemava-nc danagbemava-nc added auth oauth and removed blocked: customer response Waiting for customer response, e.g. more information was requested. in triage labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants