-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable wasm compilation (#2113)
* feat: migrates to package:web and js_interop * fix: enhances comment * chore: Adds changelog * chore: formatting * fix: changes min flutter version to 3.13.0 and dart sdk 3.1.0 to be compatible with package:web 0.5.1 * compat with dart:html & dart:web * fixups * more fixups * analyzer * chore: changelog entry * run dart test for all supported dart version * update web example tests * update ci * update deps so that we can run test with old dart versions * fix ci * fix web enricher test * fix ci * ci fixes * ignore pana error * fix CI * fix ci * remove dart 2.17 build * fixes * fix CI * test dart2wasm * cleanup * disable dart2wasm on windows * fix tests for wasm --------- Co-authored-by: Josh Burton <[email protected]>
- Loading branch information
1 parent
389a4e1
commit 7e7f0b1
Showing
52 changed files
with
716 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ jobs: | |
|
||
- run: ${{ inputs.sdk }} pub get | ||
- run: dart format --set-exit-if-changed ./ | ||
|
||
- name: dart analyze | ||
uses: invertase/github-action-dart-analyzer@e981b01a458d0bab71ee5da182e5b26687b7101b # [email protected] | ||
with: | ||
|
@@ -78,6 +78,6 @@ jobs: | |
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) | ||
if (( $PERCENTAGE < ${{ inputs.panaThreshold }} )) | ||
then | ||
echo Score too low! | ||
echo "Score too low ($PERCENTAGE % is less than the expected ${{ inputs.panaThreshold }} %)!" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,6 +144,7 @@ jobs: | |
with: | ||
package: flutter | ||
sdk: flutter | ||
panaThreshold: 87 | ||
|
||
pod-lint: | ||
runs-on: macos-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Files and directories created by pub | ||
.dart_tool/ | ||
.packages | ||
|
||
# Conventional directory for build outputs | ||
build/ | ||
|
||
# Directory created by dartdoc | ||
doc/api/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Sentry Dart : web example | ||
|
||
```sh | ||
dart pub get | ||
|
||
# run the project ( see https://dart.dev/tools/webdev#serve ) | ||
dart run webdev serve --release | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include: package:lints/recommended.yaml | ||
|
||
analyzer: | ||
errors: | ||
path_does_not_exist: ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: sentry_dart_web_example | ||
description: An absolute bare-bones web app. | ||
|
||
publish_to: 'none' | ||
|
||
environment: | ||
sdk: '>=2.17.0 <4.0.0' | ||
|
||
dependencies: | ||
sentry: | ||
path: ../../dart/ | ||
|
||
dev_dependencies: | ||
build_runner: ^2.3.0 | ||
build_web_compilers: ^3.2.3 | ||
lints: ^2.0.0 | ||
webdev: ^2.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import 'package:sentry/src/protocol.dart'; | ||
|
||
final event = SentryEvent( | ||
logger: 'main', | ||
serverName: 'server.dart', | ||
release: '1.4.0-preview.1', | ||
environment: 'Test', | ||
message: SentryMessage('This is an example Dart event.'), | ||
tags: const <String, String>{'project-id': '7371'}, | ||
// ignore: deprecated_member_use, deprecated_member_use_from_same_package | ||
extra: const <String, String>{'section': '1'}, | ||
// fingerprint: const <String>['example-dart'], | ||
user: SentryUser( | ||
id: '800', | ||
username: 'first-user', | ||
email: '[email protected]', | ||
// ipAddress: '127.0.0.1', | ||
data: <String, String>{'first-sign-in': '2020-01-01'}, | ||
), | ||
breadcrumbs: [ | ||
Breadcrumb( | ||
message: 'UI Lifecycle', | ||
timestamp: DateTime.now().toUtc(), | ||
category: 'ui.lifecycle', | ||
type: 'navigation', | ||
data: {'screen': 'MainActivity', 'state': 'created'}, | ||
level: SentryLevel.info, | ||
) | ||
], | ||
contexts: Contexts( | ||
operatingSystem: const SentryOperatingSystem( | ||
name: 'Android', | ||
version: '5.0.2', | ||
build: 'LRX22G.P900XXS0BPL2', | ||
kernelVersion: | ||
'Linux version 3.4.39-5726670 (dpi@SWHC3807) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Thu Dec 1 19:42:39 KST 2016', | ||
rooted: false, | ||
), | ||
runtimes: [const SentryRuntime(name: 'ART', version: '5')], | ||
app: SentryApp( | ||
name: 'Example Dart App', | ||
version: '1.42.0', | ||
identifier: 'HGT-App-13', | ||
build: '93785', | ||
buildType: 'release', | ||
deviceAppHash: '5afd3a6', | ||
startTime: DateTime.now().toUtc(), | ||
), | ||
browser: const SentryBrowser(name: 'Firefox', version: '42.0.1'), | ||
device: SentryDevice( | ||
name: 'SM-P900', | ||
family: 'SM-P900', | ||
model: 'SM-P900 (LRX22G)', | ||
modelId: 'LRX22G', | ||
arch: 'armeabi-v7a', | ||
batteryLevel: 99, | ||
orientation: SentryOrientation.landscape, | ||
manufacturer: 'samsung', | ||
brand: 'samsung', | ||
screenDensity: 2.1, | ||
screenDpi: 320, | ||
online: true, | ||
charging: true, | ||
lowMemory: true, | ||
simulator: false, | ||
memorySize: 1500, | ||
freeMemory: 200, | ||
usableMemory: 4294967296, | ||
storageSize: 4294967296, | ||
freeStorage: 2147483648, | ||
externalStorageSize: 8589934592, | ||
externalFreeStorage: 2863311530, | ||
bootTime: DateTime.now().toUtc(), | ||
), | ||
), | ||
); |
Binary file not shown.
Oops, something went wrong.