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

Supporting multiple versions of Socket.IO #385

Open
zsolthathazi opened this issue Jun 21, 2024 · 1 comment
Open

Supporting multiple versions of Socket.IO #385

zsolthathazi opened this issue Jun 21, 2024 · 1 comment

Comments

@zsolthathazi
Copy link

zsolthathazi commented Jun 21, 2024

Hi!

In my application, I have 2 separate packages. One of the packages has to use socket_io_client 1.0.2 to communicate with V2 Socket.IO servers, the other one has to use socket_io_client 2.0.3+1 to communicate with a V3 Socket.IO server.

When I run pub get from the main application's pubspec.yaml, I get the following dependency error:

Because every version of package_which_uses_socket_io_client 2.0.3+1 from path depends on socket_io_client 2.0.3 and every version of package_which_uses_socket_io_client 1.0.2 from path depends on socket_io_client 1.0.2, package_which_uses_socket_io_client 2.0.3+1 from path is incompatible with package_which_uses_socket_io_client 1.0.2 from path.
So, because app_name depends on both package_which_uses_socket_io_client 1.0.2 from path and package_which_uses_socket_io_client 2.0.3+1 from path, version solving failed.

Is there any way to support both V2 & V3 socket communication?

@hamzaalmahdi
Copy link
Contributor

Hello,

I had the same issue, what I did was forking the old version, fixing its errors, and changing the library name so I could use it in parallel with V3.

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

3 participants