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

parseIsWeb doesn't work on WASM #1018

Open
sgehrman opened this issue Oct 24, 2024 · 15 comments
Open

parseIsWeb doesn't work on WASM #1018

sgehrman opened this issue Oct 24, 2024 · 15 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@sgehrman
Copy link

sgehrman commented Oct 24, 2024

const bool parseIsWeb = identical(0, 0.0);

fails on wasm.

Why not do the normal thing?

I see this code is dart and not flutter. Flutter does it this way which I assume works.

const bool parseIsWeb = bool.fromEnvironment('dart.library.js_util');

Copy link

Thanks for opening this issue!

@mtrezza
Copy link
Member

mtrezza commented Oct 25, 2024

@mbfakourii do you understand what is meant here?

@mbfakourii
Copy link
Member

mbfakourii commented Oct 27, 2024

@mbfakourii do you understand what is meant here?

What they mean is the new wasm option, which is used to increase the output of Flutter Web.

This feature is currently at the beginning of the work and many packages still do not support this feature, including the dependencies that are in the Parse Flutter project.

@mbfakourii mbfakourii added the type:feature New feature or improvement of existing feature label Oct 27, 2024
@mtrezza
Copy link
Member

mtrezza commented Oct 27, 2024

Got it. So we'd need to wait until all the dependencies support the option before the Parse SDK can support it?

@mbfakourii
Copy link
Member

Got it. So we'd need to wait until all the dependencies support the option before the Parse SDK can support it?

Yes, we should wait

@mtrezza
Copy link
Member

mtrezza commented Oct 29, 2024

Do we have to wait until all Parse SDK dependencies support the wasm option? Or is the issue only related to that one single code line that has been mentioned above, and is the solution to change

const bool parseIsWeb = identical(0, 0.0);

to

const bool parseIsWeb = bool.fromEnvironment('dart.library.js_util');

?

@mtrezza mtrezza changed the title parseIsWeb hack doesn't work on WASM. Why do you do these weird hacks? parseIsWeb doesn't work on WASM Oct 29, 2024
@mbfakourii
Copy link
Member

Do we have to wait until all Parse SDK dependencies support the wasm option?

No, all dependencies need to be supported

@mtrezza
Copy link
Member

mtrezza commented Oct 30, 2024

I don't understand your response. Do you mean "Yes we need to wait for all dependency maintainers to support WASM, before we can support WASM?", or "No, we can make changes in our SDK to support WASM without waiting for the dependencies"?

@2shrestha22
Copy link

Do we have a list of packages that does not support WASM and is a dependency?

@mbfakourii
Copy link
Member

Do we have a list of packages that does not support WASM and is a dependency?

Based on the reviews, we have a change in the parse_websocket_html.dart class.
Also, the following packages need to be updated

package_info_plus: ^5.0.1 => package_info_plus: ^6.0.0

parse_server_sdk: ^6.4.0 in parse_server_sdk_flutter => last version

Dio must use dio_web_adapter: ^2.0.0 in last version

Note that package_info_plus must be updated according to our versioning policy.

@2shrestha22
Copy link

I would be happy to help to make it wasm compatible. May be I need know where to start from.

@mbfakourii
Copy link
Member

I would be happy to help to make it wasm compatible. May be I need know where to start from.

Most likely in Feb 2025 we will support Wasm.

@2shrestha22
Copy link

2shrestha22 commented Dec 9, 2024

Why in Feb 2025? Is there anything blocking this done before that?

@mbfakourii
Copy link
Member

Why in Feb 2025? Is there anything blocking this done before that?

For our versioning policy.

@mtrezza
Copy link
Member

mtrezza commented Dec 10, 2024

To clarify, you can submit a PR at any time, but when it can be merged depends on its implications on our compatibility policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

4 participants