Skip to content

Conversation

@kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented Jan 11, 2025

Must be at least 3.0 since we generate code with case statements

Fixes #1462

Much be at least 3.0 since we generate code with case statements

Fixes #1462
@kevmoo kevmoo requested review from jakemac53 and natebosch January 11, 2025 23:48
@github-actions
Copy link

Package publishing

Package Version Status Publish tag (post-merge)
package:json_serializable 6.9.3 ready to publish json_serializable-v6.9.3
package:checked_yaml 2.0.4-wip WIP (no publish necessary)
package:json_annotation 4.9.1-wip WIP (no publish necessary)

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.


final proc = await TestProcess.start(
'dart',
Platform.resolvedExecutable,
Copy link
Collaborator Author

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(
Copy link
Collaborator Author

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!

return;
}

Future<Pubspec> readPubspec(AssetId asset) async {
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

@kevmoo kevmoo Jan 11, 2025

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 <nbosch@google.com>
@kevmoo kevmoo merged commit 3dd6767 into master Jan 13, 2025
18 checks passed
@kevmoo kevmoo deleted the i1462_no_old_dart branch January 13, 2025 19:50
vkorencik pushed a commit to TypeSoft-Ltd/json_serializable.dart that referenced this pull request Sep 11, 2025
…oogle#1474)

Much be at least 3.0 since we generate code with case statements

Fixes google#1462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error out of the language version of the target package is <3.0.0

2 participants