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

Enable workspaces from dart 3.5 #4226

Merged
merged 1 commit into from
Apr 17, 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
3 changes: 1 addition & 2 deletions lib/src/language_version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ class LanguageVersion implements Comparable<LanguageVersion> {
static const defaultLanguageVersion = LanguageVersion(2, 7);
static const firstVersionWithNullSafety = LanguageVersion(2, 12);
static const firstVersionWithShorterHostedSyntax = LanguageVersion(2, 15);
// TODO(https://github.com/dart-lang/pub/issues/4127) update when we know actual version.
static const firstVersionWithWorkspaces = LanguageVersion(3, 7);
static const firstVersionWithWorkspaces = LanguageVersion(3, 5);

/// Transform language version to string that can be parsed with
/// [LanguageVersion.parse].
Expand Down
2 changes: 1 addition & 1 deletion test/descriptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ FileDescriptor libPubspec(
}) {
var map = packageMap(name, version, deps, devDeps);
if (resolutionWorkspace && sdk == null) {
sdk = '3.7.0';
sdk = '3.5.0';
}
if (sdk != null) {
map['environment'] = {'sdk': sdk};
Expand Down
10 changes: 5 additions & 5 deletions test/pubspec_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ dependencies:
Pubspec.parse(
'''
environment:
sdk: ^3.7.0
sdk: ^3.5.0
workspace: ['a', 'b', 'c']
''',
sources,
Expand All @@ -366,7 +366,7 @@ workspace: ['a', 'b', 'c']
Pubspec.parse(
'''
environment:
sdk: ^3.7.0
sdk: ^3.5.0
resolution: workspace
''',
sources,
Expand Down Expand Up @@ -416,7 +416,7 @@ resolution: local
expectPubspecException(
'''
environment:
sdk: ^3.7.0
sdk: ^3.5.0
workspace: 'a string'
''',
(pubspec) => pubspec.workspace,
Expand All @@ -427,7 +427,7 @@ workspace: 'a string'
expectPubspecException(
'''
environment:
sdk: ^3.7.0
sdk: ^3.5.0
workspace: ['a string', 24]
''',
(pubspec) => pubspec.workspace,
Expand All @@ -438,7 +438,7 @@ workspace: ['a string', 24]
expectPubspecException(
'''
environment:
sdk: ^3.7.0
sdk: ^3.5.0
resolution: "sometimes"''',
(pubspec) => pubspec.resolution,
);
Expand Down
Loading