Skip to content

Update SDK constraint everywhere #1816

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

Closed
wants to merge 7 commits into from
Closed
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
2 changes: 1 addition & 1 deletion dwds/debug_extension/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >-
A chrome extension for Dart debugging.

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'

dependencies:
async: ^2.3.0
Expand Down
2 changes: 1 addition & 1 deletion dwds/debug_extension_mv3/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >-
A Chrome extension for Dart debugging.

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=2.18.0 <4.0.0'

dependencies:
built_value: ^8.3.0
Expand Down
2 changes: 1 addition & 1 deletion dwds/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-
repository: https://github.com/dart-lang/webdev/tree/master/dwds

environment:
sdk: ">=2.18.0 <3.0.0"
sdk: ">=2.18.0 <4.0.0"

dependencies:
async: ^2.9.0
Expand Down
4 changes: 2 additions & 2 deletions dwds/test/build/min_sdk_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ void main() {
var sdkVersion = Version.parse(Platform.version.split(' ')[0]);
sdkVersion = Version(sdkVersion.major, sdkVersion.minor, 0);

final sdkConstraint = VersionConstraint.compatibleWith(sdkVersion);
final sdkConstraint = VersionConstraint.parse('>=$sdkVersion <4.0.0');
final pubspecSdkConstraint = pubspec.environment?['sdk'];
expect(pubspecSdkConstraint, isNotNull);
expect(sdkConstraint.allowsAll(pubspecSdkConstraint!), true,
reason:
'Min sdk constraint is outdated. Please update SDK constraint in '
'pubspec to allow latest stable and backwards compatible versions.'
'\n Current stable: $sdkVersion,'
'\n Expected version constraint: $sdkConstraint,'
'\n Dwds pubspec constraint: $pubspecSdkConstraint');
});
}
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A web app example for webdev CLI.
publish_to: none

environment:
sdk: ">=2.18.0 <3.0.0"
sdk: ">=2.18.0 <4.0.0"

dev_dependencies:
build_runner: ^2.0.0
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: >-
publish_to: none

environment:
sdk: ">=2.5.0 <3.0.0"
sdk: ">=2.5.0 <4.0.0"

dependencies:
intl: ^0.16.0
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_testCircular1/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: >-
publish_to: none

environment:
sdk: ">=2.5.0 <3.0.0"
sdk: ">=2.5.0 <4.0.0"

dependencies:
intl: ^0.16.0
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_testCircular1Sound/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
publish_to: none

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'

dependencies:
intl: ^0.16.0
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_testCircular2/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: >-
publish_to: none

environment:
sdk: ">=2.10.0 <3.0.0"
sdk: ">=2.10.0 <4.0.0"

dependencies:
_test_circular1:
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_testCircular2Sound/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
publish_to: none

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'

dependencies:
_test_circular1_sound:
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_testPackage/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: >-
publish_to: none

environment:
sdk: ">=2.10.0 <3.0.0"
sdk: ">=2.10.0 <4.0.0"

dependencies:
_test:
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_testPackageSound/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
publish_to: none

environment:
sdk: '>=2.13.0 <3.0.0'
sdk: '>=2.13.0 <4.0.0'

dependencies:
_test_sound:
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_testSound/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
publish_to: none

environment:
sdk: '>=2.13.0 <3.0.0'
sdk: '>=2.13.0 <4.0.0'

dependencies:
intl: ^0.17.0
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_webdevSmoke/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description:
# and build_web_compilers constraint should match those defined
# in pubspec.dart.
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=2.18.0 <4.0.0'

dev_dependencies:
build_runner: '>=1.6.2 <3.0.0'
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_webdevSoundSmoke/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: _webdev_smoke
description: A test fixture for webdev testing with sound support.

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=2.18.0 <4.0.0'

dev_dependencies:
build_runner: '>=1.6.2 <3.0.0'
Expand Down
2 changes: 1 addition & 1 deletion frontend_server_client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >-
repository: https://github.com/dart-lang/webdev/tree/master/frontend_server_client

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"

dependencies:
async: ^2.5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
path: ^1.0.0

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'
'''),
d.dir('bin', [
d.file('main.dart', '''
Expand Down
2 changes: 1 addition & 1 deletion frontend_server_common/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ publish_to: none
description: >-
Frontend server integration code to use for dwds tests. Mimics flutter code.
environment:
sdk: ">=2.18.0 <3.0.0"
sdk: ">=2.18.0 <4.0.0"

dependencies:
dwds:
Expand Down
2 changes: 1 addition & 1 deletion webdev/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: >-
repository: https://github.com/dart-lang/webdev/tree/master/webdev

environment:
sdk: ">=2.18.0 <3.0.0"
sdk: ">=2.18.0 <4.0.0"

dependencies:
args: ^2.3.1
Expand Down
4 changes: 2 additions & 2 deletions webdev/test/build/min_sdk_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ void main() {
var sdkVersion = Version.parse(Platform.version.split(' ')[0]);
sdkVersion = Version(sdkVersion.major, sdkVersion.minor, 0);

var sdkConstraint = VersionConstraint.compatibleWith(sdkVersion);
var sdkConstraint = VersionConstraint.parse('>=$sdkVersion <4.0.0');
var pubspecSdkConstraint = pubspec.environment!['sdk']!;
expect(sdkConstraint.allowsAll(pubspecSdkConstraint), true,
reason:
'Min sdk constraint is outdated. Please update SDK constraint in '
'pubspec to allow latest stable and backwards compatible versions.'
'\n Current stable: $sdkVersion, '
'\n Expected version constraint: $sdkConstraint,'
'\n Webdev pubspec constraint: $pubspecSdkConstraint');
});
}