Skip to content

Commit 1e415e0

Browse files
committed
Merge upstream/master into fix-logging-newline-split
2 parents 4a5b354 + 51c16c6 commit 1e415e0

39 files changed

Lines changed: 563 additions & 67 deletions
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: preparing-pr
3+
description: Prepare a pull request by running presubmit with fixes. Use when preparing to commit or send a PR.
4+
---
5+
6+
# Preparing a Pull Request
7+
8+
Follow these steps to prepare a pull request for DevTools:
9+
10+
1. **Verify `dt` configuration**:
11+
- Ensure `dt` is available on the path by running `dt --help` or verifying its alias.
12+
- If not available, refer to the [CONTRIBUTING guide](../../../CONTRIBUTING.md#L64-L80) for instructions on how to set up the `dt` executable on your path.
13+
2. **Update Flutter SDK**:
14+
- Run `dt update-flutter-sdk` to ensure the SDK is up to date.
15+
3. **Run Presubmit with Fixes**:
16+
- Run `dt presubmit --fix` to address automated fixes.
17+
- If any issues remain or if the command fails, fix the issues manually and run `dt presubmit --fix` again to verify the fix.
18+
4. **Run Tests for Affected Code**:
19+
- Use `git status` or `git diff upstream/master` to find changed files.
20+
- Run tests that are associated with the changed code. For example, if you edited `packages/devtools_app/lib/src/screens/logging/logging_screen.dart`, run the logging tests under `packages/devtools_app/test/screens/logging/`.
21+
22+
## Verification
23+
24+
If any step fails, stop and address the issue, and then verify the issue is fixed before proceeding.
25+
26+
> [!IMPORTANT]
27+
> Do NOT commit or push changes without getting explicit user approval first.

.cursor/rules/ai_rules.mdc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
description: Apply rules from AI_RULES.md to all interactions.
3+
globs: "*"
4+
alwaysApply: true
5+
---
6+
# AI Rules
7+
8+
Follow the rules defined in [AI_RULES.md](../../AI_RULES.md).

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg
7575
echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
7676
sudo apt-get update
77-
sudo apt-get install dcm=1.30.0-1 # To avoid errors add `-1` (build number) to the version
77+
sudo apt-get install dcm=1.36.0-1 # To avoid errors add `-1` (build number) to the version
7878
sudo chmod +x /usr/bin/dcm
7979
echo "$(dcm --version)"
8080
- name: Setup Dart SDK

AI_RULES.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# DevTools Repo Guidelines for AI Assistants
2+
3+
Follow these rules when working in this repository.
4+
5+
## Repository Rules
6+
7+
### Dependencies
8+
- **`packages/devtools_shared`**: Never introduce a Flutter dependency or a dependency on web-only Dart libraries.
9+
- **Imports**: Never import `packages/devtools_app/lib/devtools_app.dart` in code under `packages/devtools_app/lib/src/`. It is acceptable in test code.
10+
11+
### Code Style
12+
- **Style Guide**: Follow the DevTools style guide in [STYLE.md](STYLE.md).
13+
- **Formatting & Analysis**: Always ensure code is formatted properly and has no analysis errors or warnings before completing a task.
14+
15+
## Running Tests
16+
17+
- **Standard Packages**: Run unit and widget tests with `flutter test`.
18+
- **`packages/devtools_shared`**: Run tests with `dart test`.
19+
- **Integration Tests**: Refer to the [Integration Test README](packages/devtools_app/integration_test/README.md) for instructions on running integration tests.
20+
21+
## Tooling Best Practices
22+
23+
- **MCP Tools**: Prefer using MCP server tools over shell commands whenever possible.
24+
25+
## UI Development Guidelines
26+
27+
### Constants and Magic Values
28+
- **Avoid Raw Values**: Avoid using raw strings or numbers in UI code. Use named constants instead.
29+
30+
### Themes and Styles
31+
- **Use Existing Themes**: Use existing theme values and text styles from `packages/devtools_app_shared/lib/src/ui/theme/theme.dart` (e.g., `Theme.of(context).regularTextStyle`).
32+
- **Reuse Patterns**: Reuse common patterns and styles used in other UI code in the repository.
33+
34+
### Code Reuse
35+
- **Use Shared Components & Utils**: Prefer using reusable components from `shared/ui/` (such as `packages/devtools_app/lib/src/shared/ui/common_widgets.dart`), primitives from `shared/primitives/`, and utilities from `shared/utils/` rather than creating things from scratch.
36+

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Claude Code Guidelines
2+
3+
Refer to the shared [AI Rules](AI_RULES.md) for guidelines when working in this repository.

GEMINI.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
# Repository rules
2-
3-
When making changes to this code base, follow these rules, which are listed
4-
in no particular order:
5-
- `packages/devtools_shared` should never introduce a Flutter dependency or a
6-
dependency on web-only Dart libraries.
7-
- never import the `packages/devtools_app/lib/devtools_app.dart` file in code
8-
that lives under `packages/devtools_app/lib/src/`. This file is okay to import
9-
in code that lives under `packages/devtools_app/test/`.
10-
11-
# Running tests
12-
13-
Unit test and widget tests are all contained under a package's `test/`
14-
directory. These tests should be run with `flutter test` in all packages except
15-
for `packages/devtools_shared`, whose tests should be run with `dart test`.
16-
171
# Gemini Guidelines
182

19-
- Prefer to use MCP server tools over shell commands whenever possible.
20-
- When you are done making code changes, ensure the code does not have analysis
21-
errors or warnings. Also ensure it is formatted properly. You should have MCP
22-
server tools available to you to perform these tasks. If not, you can get
23-
analysis errors and warnings by running the `dart analyze` shell command, and
24-
you can perform Dart formatting with the `dart format` shell command.
3+
Refer to the shared [AI Rules](AI_RULES.md) for guidelines when working in this repository.

flutter-candidate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c6cec79f1f5d4ea1242936c7574af02bd39207c4
1+
49233d08009d7e3313da0bfbd859960d14d9c90c

packages/devtools_app/benchmark/web_bundle_size_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'package:path/path.dart' as path;
1111
import 'package:test/test.dart';
1212

1313
// Benchmark size in kB.
14-
const bundleSizeBenchmark = 5550;
14+
const bundleSizeBenchmark = 5600;
1515
const gzipBundleSizeBenchmark = 1650;
1616

1717
void main() {

packages/devtools_app/lib/devtools.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
/// Note: a regexp in the `dt update-version' command logic matches the constant
1111
/// declaration `const version =`. If you change the declaration you must also
1212
/// modify the regex in the `dt update-version' command logic.
13-
const version = '2.57.0-dev.0';
13+
const version = '2.58.0-dev.0';

packages/devtools_app/lib/src/shared/console/eval/auto_complete.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ Future<List<String>> autoCompleteResultsFor(
9494
}
9595
} catch (_) {}
9696
}
97-
return result.nonNulls
98-
.where((name) => name.startsWith(parts.activeWord))
99-
.toList();
97+
return result.where((name) => name.startsWith(parts.activeWord)).toList();
10098
}
10199

102100
// Due to https://github.com/dart-lang/sdk/issues/46221
@@ -197,7 +195,7 @@ Future<Set<String>> _libraryMemberAutocompletes(
197195
final members = functions.map(
198196
(funcRef) => funcRef.name!.replaceAll('=', ''),
199197
);
200-
result.addAll(members.nonNulls);
198+
result.addAll(members);
201199
}
202200
final classes = library.classes;
203201
if (classes != null) {

0 commit comments

Comments
 (0)