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

Bump to latest analyzer #3774

Merged
merged 12 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/dart.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _test/pkgs/provides_builder/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: provides_builder
resolution: workspace
environment:
sdk: ^3.6.0-165.0.dev
sdk: ^3.6.0
publish_to: none

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion _test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish_to: none
#resolution: workspace

environment:
sdk: ^3.6.0-228.0.dev
sdk: ^3.6.0

dependencies:
web: ^1.0.0
Expand Down
1 change: 1 addition & 0 deletions _test/test/goldens/generated_build_script.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @dart=3.6
// ignore_for_file: directives_ordering
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:build_runner_core/build_runner_core.dart' as _i1;
Expand Down
2 changes: 1 addition & 1 deletion build/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- Bump the min sdk to 3.6.0-228.0.dev.
- Remove some unnecessary casts and non-null assertions now that we have private
field promotion.
- Require analyzer ^6.9.0.
- Require analyzer ^6.9.0, allow <8.0.0.
- Fix analyzer deprecations.

## 2.4.1
Expand Down
6 changes: 5 additions & 1 deletion build/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ environment:
sdk: ^3.6.0-228.0.dev

dependencies:
analyzer: ^6.9.0
analyzer: '>=6.9.0 <8.0.0'
async: ^2.5.0
convert: ^3.0.0
crypto: ^3.0.0
Expand All @@ -27,6 +27,10 @@ dev_dependencies:
dart_flutter_team_lints: ^3.1.0
test: ^1.16.0

dependency_overrides:
build_resolvers:
path: ../build_resolvers

topics:
- build-runner
- codegen
Expand Down
2 changes: 1 addition & 1 deletion build_daemon/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
web_socket_channel: ">=2.0.0 <4.0.0"

dev_dependencies:
analyzer: '>=3.4.0 <7.0.0'
analyzer: '>=3.4.0 <8.0.0'
build_runner: ^2.0.0
# TODO: untangle analyzer dependency
built_value_generator: ^8.1.0
Expand Down
4 changes: 4 additions & 0 deletions build_modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.0.10-wip

- Support analyzer version 7.x.

## 5.0.10-beta.0

- Bump the min sdk to 3.5.0.
Expand Down
4 changes: 2 additions & 2 deletions build_modules/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: build_modules
version: 5.0.10-beta.0
version: 5.0.10-wip
description: >-
Builders to analyze and split Dart code into individually compilable modules
based on imports.
Expand All @@ -10,7 +10,7 @@ environment:
sdk: '>=3.5.0 <3.7.0-z'

dependencies:
analyzer: '>=5.1.0 <7.0.0'
analyzer: '>=5.1.0 <8.0.0'
async: ^2.5.0
bazel_worker: ^1.0.0
build: ^2.0.0
Expand Down
3 changes: 2 additions & 1 deletion build_resolvers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

- Require the latest analyzer, and stop passing the `withNullability`
parameter which was previously required and is now deprecated.
- Bump the min sdk to 3.6.0-228.0.dev.
- Bump the min sdk to 3.6.0.
- Fix SDK summary reads when multiple isolates are using build resolvers (not
recommended).
- Fix analyzer deprecations.
- Support analyzer version 7.x.

## 2.4.2

Expand Down
4 changes: 2 additions & 2 deletions build_resolvers/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ repository: https://github.com/dart-lang/build/tree/master/build_resolvers
#resolution: workspace

environment:
sdk: ^3.6.0-228.0.dev
sdk: ^3.6.0

dependencies:
analyzer: ^6.9.0
analyzer: '>=6.9.0 <8.0.0'
async: ^2.5.0
build: ^2.0.0
collection: ^1.17.0
Expand Down
4 changes: 4 additions & 0 deletions build_runner/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Write generated assets at the end of a build to avoid invalidating other
tools with a file watcher multiple times.
- Bump the min sdk to 3.6.0.
- Allow analyzer version 7.x.
- Hard code the generated build script to language version 3.6.
- Allow dart_style version 4.0.0, require at least 2.3.7.

## 2.4.13

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:dart_style/dart_style.dart';
import 'package:graphs/graphs.dart';
import 'package:logging/logging.dart';
import 'package:path/path.dart' as p;
import 'package:pub_semver/pub_semver.dart';

import '../package_graph/build_config_overrides.dart';
import 'builder_ordering.dart';
Expand All @@ -25,6 +26,8 @@ const scriptKernelCachedSuffix = '.cached';

final _log = Logger('Entrypoint');

final _lastShortFormatDartVersion = Version(3, 6, 0);

Future<String> generateBuildScript() =>
logTimedAsync(_log, 'Generating build script', _generateBuildScript);

Expand All @@ -43,11 +46,12 @@ Future<String> _generateBuildScript() async {
final emitter = DartEmitter(
allocator: Allocator.simplePrefixing(), useNullSafetySyntax: true);
try {
final content = StringBuffer()
..writeln('// ignore_for_file: directives_ordering')
..writeln(library.accept(emitter));

return DartFormatter().format(content.toString());
return DartFormatter(languageVersion: _lastShortFormatDartVersion)
.format('''
// @dart=${_lastShortFormatDartVersion.major}.${_lastShortFormatDartVersion.minor}
// ignore_for_file: directives_ordering
${library.accept(emitter)}
''');
} on FormatterException {
_log.severe('Generated build script could not be parsed.\n'
'This is likely caused by a misconfigured builder definition.');
Expand Down
14 changes: 11 additions & 3 deletions build_runner/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ repository: https://github.com/dart-lang/build/tree/master/build_runner
#resolution: workspace

environment:
sdk: ^3.5.0
sdk: ^3.6.0

platforms:
linux:
windows:
macos:

dependencies:
analyzer: '>=4.4.0 <7.0.0'
analyzer: '>=4.4.0 <8.0.0'
args: ^2.0.0
async: ^2.5.0
build: ">=2.1.0 <2.5.0"
Expand All @@ -24,7 +24,7 @@ dependencies:
code_builder: ^4.2.0
collection: ^1.15.0
crypto: ^3.0.0
dart_style: ^2.0.0
dart_style: '>=2.3.7 <4.0.0'
frontend_server_client: ">=3.0.0 <5.0.0"
glob: ^2.0.0
graphs: ^2.2.0
Expand Down Expand Up @@ -60,8 +60,16 @@ dev_dependencies:
test_process: ^2.0.0

dependency_overrides:
build:
path: ../build
build_modules:
path: ../build_modules
build_resolvers:
path: ../build_resolvers
build_runner_core:
path: ../build_runner_core
build_web_compilers:
path: ../build_web_compilers

topics:
- build-runner
2 changes: 1 addition & 1 deletion build_runner_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- Add `wrapInBatch` to obtain a reader/writer pair that will batch writes
before flushing them at the end of a build.
- Bump the min sdk to 3.6.0-dev.228.
- Require analyzer ^6.9.0.
- Require analyzer ^6.9.0, allow version 7.x.
- Fix analyzer deprecations.

## 7.3.2
Expand Down
4 changes: 2 additions & 2 deletions build_runner_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository: https://github.com/dart-lang/build/tree/master/build_runner_core
#resolution: workspace

environment:
sdk: ^3.6.0-228.0.dev
sdk: ^3.6.0

platforms:
linux:
Expand Down Expand Up @@ -38,7 +38,7 @@ dependencies:
dev_dependencies:
_test_common:
path: ../_test_common
analyzer: ^6.9.0
analyzer: '>=6.9.0 <8.0.0'
build_runner: ^2.0.0
build_test: ^2.0.0
dart_flutter_team_lints: ^3.1.0
Expand Down
1 change: 1 addition & 0 deletions build_test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 2.2.3-wip

- Bump the min sdk to 3.5.0.
- Allow analyzer version 7.x.

## 2.2.2

Expand Down
2 changes: 1 addition & 1 deletion build_test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:
watcher: ^1.0.0

dev_dependencies:
analyzer: '>=5.2.0 <7.0.0'
analyzer: '>=5.2.0 <8.0.0'
collection: ^1.15.0

topics:
Expand Down
1 change: 1 addition & 0 deletions build_web_compilers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 4.1.0-wip

- Support package:archive version 4.x.
- Allow analyzer version 7.x.

## 4.1.0-beta.3

Expand Down
4 changes: 2 additions & 2 deletions build_web_compilers/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ repository: https://github.com/dart-lang/build/tree/master/build_web_compilers
#resolution: workspace

environment:
sdk: '>=3.6.0-165.0.dev <3.7.0-z'
sdk: '>=3.6.0 <3.7.0-z'

dependencies:
analyzer: '>=5.1.0 <7.0.0'
analyzer: '>=5.1.0 <8.0.0'
archive: '>=3.0.0 <5.0.0'
bazel_worker: ^1.0.0
build: ^2.0.0
Expand Down
2 changes: 1 addition & 1 deletion build_web_compilers/test/fixtures/c/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: c
resolution: workspace

environment:
sdk: ^3.6.0-165.0.dev
sdk: ^3.6.0

dependencies:
d:
Expand Down
Loading
Loading