Skip to content

Commit 0fc4807

Browse files
authored
Extend validation for cycles to other packages than dartpad_ui (#3344)
* - * Update CONTRIBUTING.md
1 parent 1a2059f commit 0fc4807

File tree

7 files changed

+51
-1
lines changed

7 files changed

+51
-1
lines changed

.github/workflows/dart_services.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ jobs:
5050

5151
- name: Run tests
5252
run: dart test test/presubmit
53+
54+
- run: sh ./tool/check_cycles.sh

.github/workflows/dartpad_shared.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ jobs:
3636

3737
- name: Analyze project source
3838
run: dart analyze --fatal-infos
39+
40+
- run: sh ./tool/check_cycles.sh

.github/workflows/samples.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ jobs:
3030
- run: dart format --set-exit-if-changed .
3131
- run: dart tool/samples.dart --verify
3232
- run: flutter build web
33+
- run: sh ./tool/check_cycles.sh

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dependencies because of other reasons, this is how you can
5757
generate dependency diagrams:
5858

5959
```
60-
cd pkgs/dartpad_ui
60+
cd pkgs/<the package>
6161
dart pub global activate layerlens
6262
layerlens
6363
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Copyright 2025 The Chromium Authors. All rights reserved.
4+
# Use of this source code is governed by a BSD-style license that can be
5+
# found in the LICENSE file.
6+
7+
8+
# Fast fail the script on failures.
9+
set -ex
10+
11+
# The directory that this script is located in.
12+
TOOL_DIR=`dirname "$0"`
13+
14+
dart pub global activate layerlens
15+
layerlens --path $TOOL_DIR/.. --fail-on-cycles
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Copyright 2025 The Chromium Authors. All rights reserved.
4+
# Use of this source code is governed by a BSD-style license that can be
5+
# found in the LICENSE file.
6+
7+
8+
# Fast fail the script on failures.
9+
set -ex
10+
11+
# The directory that this script is located in.
12+
TOOL_DIR=`dirname "$0"`
13+
14+
dart pub global activate layerlens
15+
layerlens --path $TOOL_DIR/.. --fail-on-cycles

pkgs/samples/tool/check_cycles.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Copyright 2025 The Chromium Authors. All rights reserved.
4+
# Use of this source code is governed by a BSD-style license that can be
5+
# found in the LICENSE file.
6+
7+
8+
# Fast fail the script on failures.
9+
set -ex
10+
11+
# The directory that this script is located in.
12+
TOOL_DIR=`dirname "$0"`
13+
14+
dart pub global activate layerlens
15+
layerlens --path $TOOL_DIR/.. --fail-on-cycles

0 commit comments

Comments
 (0)