Skip to content

Commit

Permalink
Update versions and constraints for Dart 3.6 (#6268)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Dec 11, 2024
1 parent 7c2bb6c commit adf6e71
Show file tree
Hide file tree
Showing 35 changed files with 63 additions and 76 deletions.
2 changes: 1 addition & 1 deletion examples/analysis/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: dart.dev example code.

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
examples_util: {path: ../util}
2 changes: 1 addition & 1 deletion examples/analysis_alt/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description: dart.dev example code.

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0
1 change: 1 addition & 0 deletions examples/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ linter:
- unnecessary_library_directive
- unnecessary_null_aware_operator_on_extension_on_nullable
- use_enums
- use_truncating_division
2 changes: 1 addition & 1 deletion examples/async_await/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: dart.dev example code.

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
examples_util: {path: ../util}
Expand Down
4 changes: 2 additions & 2 deletions examples/build_runner_usage/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ description: dart.dev build_runner example code.

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dev_dependencies:
args: ^2.5.0
build_runner: ^2.4.12
build_runner: ^2.4.13
build_test: ^2.2.2
2 changes: 1 addition & 1 deletion examples/cli/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Examples for CLI tutorials on dart.dev

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
args: ^2.5.0
Expand Down
2 changes: 1 addition & 1 deletion examples/concurrency/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish_to: none

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
http: any
Expand Down
2 changes: 1 addition & 1 deletion examples/create_libraries/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.0.0

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dev_dependencies:
test: ^1.25.8
2 changes: 1 addition & 1 deletion examples/extension_methods/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.0.0

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dev_dependencies:
test: ^1.25.8
2 changes: 1 addition & 1 deletion examples/fetch_data/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.0.1

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
http: ^1.2.2
2 changes: 1 addition & 1 deletion examples/futures/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish_to: none

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
examples_util: {path: ../util}
Expand Down
2 changes: 1 addition & 1 deletion examples/html/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.0.1

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dev_dependencies:
test: ^1.25.8
Expand Down
2 changes: 1 addition & 1 deletion examples/iterables/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: dart.dev example code.

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dev_dependencies:
examples_util: {path: ../util}
Expand Down
2 changes: 1 addition & 1 deletion examples/language/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: dart.dev example code.

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
examples_util: { path: ../util }
Expand Down
2 changes: 1 addition & 1 deletion examples/misc/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: dart.dev example code.

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
args: ^2.5.0
Expand Down
2 changes: 1 addition & 1 deletion examples/non_promotion/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.0.1

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
mockito: ^5.4.4
3 changes: 2 additions & 1 deletion examples/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: examples_workspace
publish_to: none

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

workspace:
- analysis
Expand Down
2 changes: 1 addition & 1 deletion examples/type_system/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: dart.dev type system examples.

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
examples_util: {path: ../util}
Expand Down
2 changes: 1 addition & 1 deletion examples/util/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.0.2

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
test: ^1.25.8
2 changes: 1 addition & 1 deletion examples/vector_victor/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 1.0.0

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

# dependencies:
# path: ^1.8.0
Expand Down
4 changes: 3 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ publish_to: none
homepage: https://dart.dev

environment:
sdk: ^3.5.3
sdk: ^3.6.0

workspace:
- tool/dart_site
- examples
- tool/get-dart

dev_dependencies:
dart_site:
Expand Down
2 changes: 1 addition & 1 deletion src/_data/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ show_banner: true
# in the `firebase.json` redirect rule.)
og_image_vers: "?2"

sdkVersion: 3.5.4
sdkVersion: 3.6.0
2 changes: 1 addition & 1 deletion src/content/effective-dart/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ up.

### PREFER writing doc comments for public APIs

{% render 'linter-rule-mention.md', rules:'package_api_docs, public_member_api_docs' %}
{% render 'linter-rule-mention.md', rules:'public_member_api_docs' %}

You don't have to document every single library, top-level variable, type, and
member, but you should document most of them.
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/build_runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ to your app's pubspec:
```yaml
dev_dependencies:
# ···
build_runner: ^2.4.12
build_runner: ^2.4.13
build_test: ^2.2.2
```
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/pub/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ resemble the following:

```yaml
dev_dependencies:
build_runner: ^2.4.12
build_runner: ^2.4.13
lints: ^2.1.1
test: ^1.25.8
```
Expand Down
6 changes: 3 additions & 3 deletions src/content/tools/pub/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ name: my_app
```
Here is an example of a pubspec that declares dependencies on
two packages (`js` and `intl`) that are hosted on the pub.dev site:
two packages (`intl` and `path`) that are hosted on the pub.dev site:

```yaml
name: my_app
dependencies:
js: ^0.6.0
intl: ^0.17.0
intl: ^0.20.0
path: ^1.9.1
```

To update the `pubspec.yaml` file, without manual editing,
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/webdev.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ your app's `pubspec.yaml` file:
```yaml
dev_dependencies:
# ···
build_runner: ^2.4.12
build_runner: ^2.4.13
build_test: ^2.2.2
build_web_compilers: ^4.0.11
```
Expand Down
4 changes: 2 additions & 2 deletions src/content/tutorials/server/cmdline.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ $ dart run bin/dcat.dart -n pubspec.yaml
4 # repository: https://github.com/my_org/my_repo
5
6 environment:
7 sdk: ^3.5.4
7 sdk: ^3.6.0
8
9 # Add regular dependencies here.
10 dependencies:
11 args: ^2.5.0
12 # path: ^1.8.0
13
14 dev_dependencies:
15 lints: ^4.0.0
15 lints: ^5.0.0
16 test: ^1.24.0
```

Expand Down
3 changes: 2 additions & 1 deletion tool/config/site_variable_scanner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ yaml_variable_scanner:
- ^site\.url$
- ^site\.branch$
- ^site\.show_banner$
- ^site\.sdkVersion$
- ^site\.og_image_vers$

# File path for check file contents
#
# (Glob Syntax)
Expand Down
47 changes: 14 additions & 33 deletions tool/dart_site/lib/src/commands/analyze_dart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import 'dart:io';

import 'package:args/command_runner.dart';
import 'package:path/path.dart' as path;

import '../utils.dart';

Expand Down Expand Up @@ -35,44 +34,26 @@ final class AnalyzeDartCommand extends Command<int> {
int analyzeDart({
bool verboseLogging = false,
}) {
final directoriesToAnalyze = [
path.join('tool', 'dart_site'),
path.join('examples'),
path.join('tool', 'get-dart'),
];

if (!verboseLogging) {
print('Analyzing code...');
}

for (final directory in directoriesToAnalyze) {
if (verboseLogging) {
print("Analyzing code in '$directory' directory...");
}

if (runPubGetIfNecessary(directory) case final pubGetResult
when pubGetResult != 0) {
return pubGetResult;
}

final dartAnalyzeOutput = Process.runSync(
Platform.executable,
const ['analyze', '.'],
workingDirectory: directory,
);
final dartAnalyzeOutput = Process.runSync(
Platform.executable,
const ['analyze'],
);

if (dartAnalyzeOutput.exitCode != 0) {
final normalOutput = dartAnalyzeOutput.stdout.toString();
final errorOutput = dartAnalyzeOutput.stderr.toString();
if (dartAnalyzeOutput.exitCode != 0) {
final normalOutput = dartAnalyzeOutput.stdout.toString();
final errorOutput = dartAnalyzeOutput.stderr.toString();

stderr.write(normalOutput);
stderr.write(errorOutput);
stderr.writeln("Error: Analysis on '$directory' directory failed.");
return 1;
} else {
if (verboseLogging) {
print("Successfully analyzed code in '$directory' directory!");
}
stderr.write(normalOutput);
stderr.write(errorOutput);
stderr.writeln('Error: Analysis failed.');
return 1;
} else {
if (verboseLogging) {
print('Successfully analyzed Dart code!');
}
}

Expand Down
6 changes: 3 additions & 3 deletions tool/dart_site/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ publish_to: none

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
args: ^2.5.0
excerpter:
path: ../../site-shared/pkgs/excerpter
fbh_front_matter: ^0.0.1
html_unescape: ^2.0.0
intl: ^0.19.0
io: ^1.0.4
intl: ^0.20.0
io: ^1.0.5
linkcheck: ^3.0.0
markdown: ^7.2.2
path: ^1.9.0
Expand Down
4 changes: 2 additions & 2 deletions tool/get-dart/archive/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ publish_to: none

resolution: workspace
environment:
sdk: ^3.5.3
sdk: ^3.6.0

dependencies:
dart_sdk_archive:
path: ../dart_sdk_archive

dev_dependencies:
build_runner: ^2.4.12
build_runner: ^2.4.13
build_web_compilers: ^4.0.11
Loading

0 comments on commit adf6e71

Please sign in to comment.