-
Notifications
You must be signed in to change notification settings - Fork 401
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
Error out if the language version of the target package is too low #1474
Conversation
Much be at least 3.0 since we generate code with case statements Fixes #1462
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
final proc = await TestProcess.start( | ||
'dart', | ||
Platform.resolvedExecutable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests should run on windows now!
final output = lines.toString(); | ||
final expectedWarningCount = message == null ? 0 : 1; | ||
final warningCount = '[WARNING]'.allMatches(output).length; | ||
expect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure there are only the warnings we are expecting and no more!
@@ -37,21 +41,36 @@ Future<void> _validatePubspec(bool production, BuildStep buildStep) async { | |||
return; | |||
} | |||
|
|||
Future<Pubspec> readPubspec(AssetId asset) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No clue why I had an inline function called once. Ditched it.
final string = await buildStep.readAsString(pubspecAssetId); | ||
final pubspec = Pubspec.parse(string, sourceUrl: pubspecAssetId.uri); | ||
|
||
if (_checkAnnotationConstraint(pubspec, !production) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seemed the cleanest way to call the function and "do the thing" if the result is not null
.
Co-authored-by: Nate Bosch <[email protected]>
Must be at least 3.0 since we generate code with case statements
Fixes #1462