Skip to content

Commit

Permalink
Bump tachyon version to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
spideythewebhead committed Nov 1, 2023
1 parent cc5b746 commit a81360e
Show file tree
Hide file tree
Showing 29 changed files with 35 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'copy_with.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'default_value.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'custom_json_converter.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'json_key.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'simple.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'generics.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'hash_and_equality.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'inheritance.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'simple.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'custom_json_converter.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'json_key.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'simple.dart';
Expand Down
1 change: 1 addition & 0 deletions examples/file_generation_mode/lib/union/copy_with.gen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'copy_with.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'default_value.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'json_key.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'simple.dart';
Expand Down
1 change: 1 addition & 0 deletions examples/file_generation_mode/lib/union/generics.gen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'generics.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'hash_and_equality.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'shared_fields.dart';
Expand Down
1 change: 1 addition & 0 deletions examples/file_generation_mode/lib/union/simple.gen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'simple.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'json_key.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO GENERATED - DO NOT MODIFY
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package
// coverage:ignore-file

part of 'simple.dart';
Expand Down
4 changes: 2 additions & 2 deletions examples/file_generation_mode/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,10 @@ packages:
dependency: "direct dev"
description:
name: tachyon
sha256: "8dcad48b24f25513993f9bdd144af9b0cf2abad3bed38fcb2fa0cd8c1adf406f"
sha256: b8c50f87745d9d223ecda4df1080897a9cca98db3cc68ae3b9d557328440d9f5
url: "https://pub.dev"
source: hosted
version: "0.1.0"
version: "0.2.0"
term_glyph:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion examples/file_generation_mode/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ dependencies:

dev_dependencies:
lints: ^2.1.1
tachyon: ^0.1.0
tachyon: ^0.2.0
test: ^1.24.7
2 changes: 1 addition & 1 deletion package/lib/src/backend/code_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class DataClassPluginGenerator extends TachyonPluginCodeGenerator {
// as it would not make sense to have copyWith for super class and not a subclass
if (classDeclaration.extendsClause?.superclass != null) {
final String superClassName = classDeclaration.extendsClause!.superclass.name2.lexeme;
final ClassOrEnumDeclarationMatch? superClassMatch =
final FinderDeclarationMatch<NamedCompilationUnitMember>? superClassMatch =
await declarationFinder.findClassOrEnum(superClassName);
final NamedCompilationUnitMember? superClassDeclaration = superClassMatch?.node;

Expand Down
6 changes: 4 additions & 2 deletions package/lib/src/backend/core/generators/copy_with.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class CopyWithGenerator implements Generator {
!dartType.isUri &&
!dartType.isDateTime &&
!dartType.isDuration) {
final ClassOrEnumDeclarationMatch? match = await _classDeclarationFinder(dartType.name);
final FinderDeclarationMatch<NamedCompilationUnitMember>? match =
await _classDeclarationFinder(dartType.name);

final NamedCompilationUnitMember? node = match?.node;
if (match != null && node is ClassDeclaration && node.hasDataClassAnnotation) {
Expand Down Expand Up @@ -125,7 +126,8 @@ class CopyWithGenerator implements Generator {
!dartType.isUri &&
!dartType.isDateTime &&
!dartType.isDuration) {
final ClassOrEnumDeclarationMatch? match = await _classDeclarationFinder(dartType.name);
final FinderDeclarationMatch<NamedCompilationUnitMember>? match =
await _classDeclarationFinder(dartType.name);

final NamedCompilationUnitMember? node = match?.node;
if (match != null && node is ClassDeclaration && node.hasDataClassAnnotation) {
Expand Down
4 changes: 2 additions & 2 deletions package/lib/src/backend/core/generators/from_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FromJsonGenerator implements Generator {

final String className = annotation.name.name;
final NamedCompilationUnitMember? node = await _classOrEnumDeclarationFinder(className)
.then((ClassOrEnumDeclarationMatch? match) => match?.node);
.then((FinderDeclarationMatch<NamedCompilationUnitMember>? match) => match?.node);

// handle JsonConverter interface implementer
if (node is ClassDeclaration) {
Expand Down Expand Up @@ -199,7 +199,7 @@ class FromJsonGenerator implements Generator {

final NamedCompilationUnitMember? typeDeclarationNode =
await _classOrEnumDeclarationFinder(dartType.name)
.then((ClassOrEnumDeclarationMatch? match) => match?.node);
.then((FinderDeclarationMatch<NamedCompilationUnitMember>? match) => match?.node);

if (typeDeclarationNode is ClassDeclaration && typeDeclarationNode.hasFactory('fromJson') ||
typeDeclarationNode is EnumDeclaration && typeDeclarationNode.hasFactory('fromJson')) {
Expand Down
4 changes: 2 additions & 2 deletions package/lib/src/backend/core/generators/to_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ToJsonGenerator implements Generator {

final String className = annotation.name.name;
final NamedCompilationUnitMember? node = await _classDeclarationFinder(className)
.then((ClassOrEnumDeclarationMatch? match) => match?.node);
.then((FinderDeclarationMatch<NamedCompilationUnitMember>? match) => match?.node);

// handle JsonConverter interface implementer
if (node is ClassDeclaration) {
Expand Down Expand Up @@ -166,7 +166,7 @@ class ToJsonGenerator implements Generator {

final NamedCompilationUnitMember? typeDeclarationNode =
await _classDeclarationFinder(dartType.name)
.then((ClassOrEnumDeclarationMatch? match) => match?.node);
.then((FinderDeclarationMatch<NamedCompilationUnitMember>? match) => match?.node);

if (typeDeclarationNode is ClassDeclaration && typeDeclarationNode.hasMethod('toJson') ||
typeDeclarationNode is EnumDeclaration && typeDeclarationNode.hasMethod('toJson')) {
Expand Down
2 changes: 1 addition & 1 deletion package/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
glob: ^2.1.2
path: ^1.8.3
file: ">=6.0.0 <8.0.0"
tachyon: ^0.1.0
tachyon: ^0.2.0

dev_dependencies:
lints: ^2.1.1
Expand Down

0 comments on commit a81360e

Please sign in to comment.