Skip to content

Commit e6f647a

Browse files
committed
Merge branch 'main' into fix/runzoneguarded
2 parents f6fa1ac + 404f5a9 commit e6f647a

File tree

465 files changed

+24464
-9488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

465 files changed

+24464
-9488
lines changed

.craft.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
minVersion: 0.29.2
1+
minVersion: 1.21.0
22
changelogPolicy: auto
33
artifactProvider:
44
name: none
55
targets:
66
- name: pub-dev
7+
# This is temporarily needed because we keep the package:web dependency implicit
8+
# See https://github.com/getsentry/sentry-dart/pull/2113 for more context
9+
skipValidation: true
710
packages:
811
dart:
912
flutter:

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @krystofwoldrich @stefanosiano @buenaflor
1+
* @krystofwoldrich @stefanosiano @buenaflor @martinhaintz

.github/actions/dart-test/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
working-directory: ${{ inputs.directory }}
2424

2525
- name: Test VM
26-
run: dart test -p vm --coverage=coverage --test-randomize-ordering-seed=random --chain-stack-traces
26+
run: dart test -p vm ${{ (runner.os == 'Linux' && matrix.sdk == 'stable' && '--coverage=coverage') || '' }} --test-randomize-ordering-seed=random --chain-stack-traces
2727
shell: bash
2828
working-directory: ${{ inputs.directory }}
2929

@@ -32,3 +32,9 @@ runs:
3232
run: dart test -p chrome --test-randomize-ordering-seed=random --chain-stack-traces
3333
shell: bash
3434
working-directory: ${{ inputs.directory }}
35+
36+
- name: Test dart2wasm
37+
if: ${{ inputs.web == 'true' && (matrix.sdk == 'stable' || matrix.sdk == 'beta') && runner.os != 'Windows' }}
38+
run: dart test -p chrome --compiler dart2wasm --test-randomize-ordering-seed=random --chain-stack-traces
39+
shell: bash
40+
working-directory: ${{ inputs.directory }}

.github/file-filters.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This is used by the action https://github.com/dorny/paths-filter
2+
3+
high_risk_code: &high_risk_code
4+
- "flutter/lib/src/span_frame_metrics_collector.dart"
5+
- "flutter/lib/src/integrations/native_app_start_integration.dart"
6+
- "flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt"
7+
- "flutter/ios/Classes/SentryFlutterPluginApple.swift"
8+

.github/workflows/analyze.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232
working-directory: ${{ inputs.package }}
3333
steps:
3434
- uses: actions/checkout@v4
35-
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 # pin@v1
35+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # pin@v1
3636
if: ${{ inputs.sdk == 'dart' }}
3737
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # [email protected]
3838
if: ${{ inputs.sdk == 'flutter' }}
3939

4040
- run: ${{ inputs.sdk }} pub get
4141
- run: dart format --set-exit-if-changed ./
42-
42+
4343
- name: dart analyze
4444
uses: invertase/github-action-dart-analyzer@e981b01a458d0bab71ee5da182e5b26687b7101b # [email protected]
4545
with:
@@ -51,6 +51,11 @@ jobs:
5151

5252
- run: dart doc --dry-run
5353

54+
- name: Run publish validation
55+
run: |
56+
dart pub get --directory ../scripts/publish_validation
57+
dart run ../scripts/publish_validation/bin/publish_validation.dart --executable ${{ inputs.sdk }}
58+
5459
package-analysis:
5560
# `axel-op/dart-package-analyzer` is using `flutter pub upgrade` instead of `get`,
5661
# which ignores pubspec.yaml `dependency_overrides`. Because of that, all `release/*` branches are failing,
@@ -78,6 +83,6 @@ jobs:
7883
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
7984
if (( $PERCENTAGE < ${{ inputs.panaThreshold }} ))
8085
then
81-
echo Score too low!
86+
echo "Score too low ($PERCENTAGE % is less than the expected ${{ inputs.panaThreshold }} %)!"
8287
exit 1
8388
fi
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Changes In High Risk Code
2+
on:
3+
pull_request:
4+
5+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
files-changed:
12+
name: Detect changed files
13+
runs-on: ubuntu-latest
14+
# Map a step output to a job output
15+
outputs:
16+
high_risk_code: ${{ steps.changes.outputs.high_risk_code }}
17+
high_risk_code_files: ${{ steps.changes.outputs.high_risk_code_files }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Get changed files
21+
id: changes
22+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
23+
with:
24+
token: ${{ github.token }}
25+
filters: .github/file-filters.yml
26+
27+
# Enable listing of files matching each filter.
28+
# Paths to files will be available in `${FILTER_NAME}_files` output variable.
29+
list-files: csv
30+
31+
validate-high-risk-code:
32+
if: needs.files-changed.outputs.high_risk_code == 'true'
33+
needs: files-changed
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Comment on PR to notify of changes in high risk files
37+
uses: actions/github-script@v7
38+
env:
39+
high_risk_code: ${{ needs.files-changed.outputs.high_risk_code_files }}
40+
with:
41+
script: |
42+
const highRiskFiles = process.env.high_risk_code;
43+
const fileList = highRiskFiles.split(',').map(file => `- [ ] ${file}`).join('\n');
44+
45+
// Get existing comments
46+
const comments = await github.rest.issues.listComments({
47+
issue_number: context.issue.number,
48+
owner: context.repo.owner,
49+
repo: context.repo.repo
50+
});
51+
52+
// Check if we already have a high risk code comment
53+
const hasExistingComment = comments.data.some(comment =>
54+
comment.body.includes('🚨 Detected changes in high risk code 🚨')
55+
);
56+
57+
// Only create comment if we don't already have one
58+
if (!hasExistingComment) {
59+
await github.rest.issues.createComment({
60+
issue_number: context.issue.number,
61+
owner: context.repo.owner,
62+
repo: context.repo.repo,
63+
body: `### 🚨 Detected changes in high risk code 🚨 \n High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:\n ${fileList}`
64+
});
65+
}

.github/workflows/dart.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,28 @@ jobs:
2121
access_token: ${{ github.token }}
2222

2323
build:
24-
name: Build ${{matrix.sdk}} on ${{matrix.os}}
25-
runs-on: ${{ matrix.os }}
24+
name: Dart ${{matrix.sdk}} on ${{matrix.os}}
25+
runs-on: ${{ matrix.os }}-latest
2626
timeout-minutes: 30
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
os: [ubuntu-latest, windows-latest, macos-latest]
31-
sdk: [stable, beta]
32-
exclude:
33-
- os: windows-latest
34-
sdk: beta
35-
- os: macos-latest
36-
sdk: beta
30+
os: [ubuntu]
31+
sdk:
32+
- '2.18'
33+
- '2.19'
34+
- '3.0'
35+
- '3.1'
36+
- '3.2'
37+
- '3.3'
38+
- '3.4'
39+
- stable
40+
- beta
41+
include:
42+
- os: windows
43+
sdk: stable
44+
- os: macos
45+
sdk: stable
3746
steps:
3847
- uses: actions/checkout@v4
3948

@@ -49,24 +58,14 @@ jobs:
4958
coverage: sentry
5059
min-coverage: 85
5160

52-
- name: Install webdev
53-
if: runner.os != 'Windows'
54-
run: dart pub global activate webdev
55-
5661
- name: Build example
5762
working-directory: dart/example
5863
run: |
5964
dart pub get
6065
dart compile aot-snapshot bin/example.dart
6166
62-
- name: Build Web example
63-
if: runner.os != 'Windows'
64-
working-directory: dart/example_web
65-
run: |
66-
dart pub get
67-
webdev build
68-
6967
analyze:
7068
uses: ./.github/workflows/analyze.yml
7169
with:
7270
package: dart
71+
panaThreshold: 87

.github/workflows/diagrams.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
name: "Create class diagrams of all packages"
99
steps:
10-
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 # pin@v1
10+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # pin@v1
1111
with:
1212
sdk: stable
1313

.github/workflows/drift.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
cd drift
9797
flutter test --coverage --test-randomize-ordering-seed=random
9898
99-
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v3
99+
- uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # pin@v3
100100
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
101101
with:
102102
name: sentry_drift

.github/workflows/e2e_dart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
matrix:
3838
sdk: [stable, beta]
3939
steps:
40-
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 # pin@v1
40+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # pin@v1
4141
with:
4242
sdk: ${{ matrix.sdk }}
4343
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)