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

Migrates to package:web and js_interop #2064

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

josh-burton
Copy link

📜 Description

Migrates to package:web and js_interop

💡 Motivation and Context

Supports compilation via WASM

💚 How did you test it?

Tested on a flutter web app project, ran unit tests

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

Version numbers should be bumped. I think technically this is not a breaking change, but perhaps it should be treated as one.

@buenaflor
Copy link
Contributor

hey, I see that this is for wasm compilation but I don't think we support symbolication for wasm yet

@kevmoo
Copy link

kevmoo commented May 31, 2024

This is blocking some customers. Happy to discuss how we can help!

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.22%. Comparing base (e6b16cd) to head (2bf4b4f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2064      +/-   ##
==========================================
- Coverage   95.25%   89.22%   -6.03%     
==========================================
  Files          54      131      +77     
  Lines        1791     4353    +2562     
==========================================
+ Hits         1706     3884    +2178     
- Misses         85      469     +384     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@denrase denrase left a comment

Choose a reason for hiding this comment

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

Thank you for contributing! I agree that we should migrate to this and also maybe release this in a major version bump.

Some small nitpicks & questions. Also, we need to satisfy CI in order to proceed.

  • We are missing a changelog entry
  • integration tests on macOS are failing apparently
  • min-version tests are failing. Do we need to bump dart/flutter versions?
  • analyze is failing. dart format . needs to be run & changes committed

@@ -101,3 +92,7 @@ class WebEnricherEventProcessor implements EnricherEventProcessor {
);
}
}

extension on web.Navigator {
external double? get deviceMemory;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this used anywhere? If not, we can remove it.

Copy link
Author

Choose a reason for hiding this comment

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

It's currently used in the int? _getMemorySize() method. This API has been added to the web package so in a future update it can be removed.

}

// See https://github.com/flutter/flutter/blob/414d9238720a3cde85475f49ce0ba313f95046f7/packages/flutter/lib/src/foundation/_capabilities_web.dart#L10
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could also add the comment fron the link as decriptions.

// These values are set by the engine. They are used to determine if the
// application is using canvaskit or skwasm.
// 
// See https://github.com/flutter/flutter/blob/414d9238720a3cde85475f49ce0ba313f95046f7/packages/flutter/lib/src/foundation/_capabilities_web.dart#L10

Copy link
Author

Choose a reason for hiding this comment

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

great idea

@buenaflor
Copy link
Contributor

quick fyi: the ci jobsentry-sqflite / analyze / package-analysis currently fails expectedly so no need to try and fix this here

@josh-burton
Copy link
Author

@denrase @buenaflor I've addressed the PR comments and hopefully fixed the build failures.

I needed to bump the min version of Flutter has Dart 3.1.0 is required by package:web.

@buenaflor
Copy link
Contributor

@josh-burton if it's okay with you we'd like to fork your branch and take over from here, it's easier for us to fix the rest of the ci since we don't need to approve runnning them every time (cc @denrase)

@josh-burton
Copy link
Author

@josh-burton if it's okay with you we'd like to fork your branch and take over from here, it's easier for us to fix the rest of the ci since we don't need to approve runnning them every time (cc @denrase)

No problem, go for it.

@kevmoo
Copy link

kevmoo commented Jun 14, 2024

Any help we can get here?

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.

None yet

4 participants