-
Notifications
You must be signed in to change notification settings - Fork 49
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
Bugfix for Flutter Web #34
base: master
Are you sure you want to change the base?
Conversation
|
||
import 'package:phoenix_wings/src/phoenix_connection.dart'; | ||
|
||
/// PhoenixHtmlConnection handles the creation and use | ||
/// of the underlying websocket connection on browser platforms. | ||
class PhoenixHtmlConnection extends PhoenixConnection { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help me understand why this has been renamed?
It's resulting in this error on CI
error • test/phoenix_socket_html_test.dart:11:46 • Undefined name 'PhoenixHtmlConnection'. Try correcting the name to one that is defined, or defining the
name. • undefined_identifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is for help keeping the same name: so if your platform is Web or Non-web you'll have the same class name. otherwise you'll have to somehow import the right file. Then no need to import a specific file pending platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, there are parts of the code expecting to consume these classes with the original names that haven't been updated.
Would it be possible to get things working without changing the class names?
|
||
import 'package:phoenix_wings/src/phoenix_connection.dart'; | ||
|
||
/// PhoenixIoConnection handles the creation and use | ||
/// of the underlying websocket connection on browser platforms. | ||
class PhoenixIoConnection extends PhoenixConnection { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here with renaming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as comment above.
import 'dart:async'; | ||
import 'dart:html'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like some autoformat thing reordering imports? Not a big deal, but generally prefer to avoid mixing 'formatting' changes with code changes to make the changes easier to understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this stuff is usually automatic from the editor. sorry :)
@mfeckie ping :) |
@allenwyma Sorry, I've been on leave. To move forward, we'll need to get the test passing. Can you look at the CI build https://github.com/mfeckie/phoenix_wings/actions/runs/4053099709/jobs/6975286940 and see if you can get that resolved? |
@mfeckie it seems that the link you provided is expired. I've tried to run the tests locally. This is the output from running on master:
I do get a very similar output when running the command on the Plangora's branch:
Is it the same test that was failing on the CI? |
Possible fix for Flutter Web