diff --git a/packages/pigeon/CONTRIBUTING.md b/packages/pigeon/CONTRIBUTING.md index 698a36769de4..41ead7842651 100644 --- a/packages/pigeon/CONTRIBUTING.md +++ b/packages/pigeon/CONTRIBUTING.md @@ -6,16 +6,6 @@ Pigeon is a code generation tool that adds type safety to Flutter’s Platform Channels. This document serves as an overview of how it functions to help people who would like to contribute to the project. -## State Diagram - -Pigeon generates a temporary file in its _LaunchIsolate_, the isolate that is -spawned to run `main()`, then launches another isolate, _PigeonIsolate_, that -uses `dart:mirrors` to parse the generated file, creating an -[AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree), then running code -generators with that AST. - -![State Diagram](./doc/pigeon_state.png) - ## Source Index * [ast.dart](./lib/src/ast.dart) - The data structure for representing the Abstract Syntax Tree. @@ -37,7 +27,7 @@ generators with that AST. ## Testing Overview -Pigeon has 3 types of tests, you'll find them all in +Pigeon has 3 types of tests; you'll find them all in [test.dart](./tool/test.dart). * Unit tests - These are the fastest tests that are just typical unit tests, @@ -73,11 +63,3 @@ void main(List args, SendPort sendPort) async { ``` This is how `dart:mirrors` gets access to the supplied Pigeon file. - -## Imminent Plans - -* Migrate to Dart Analyzer for AST generation ([issue - 78818](https://github.com/flutter/flutter/issues/78818)) - We might have - reached the limitations of using dart:mirrors for parsing the Dart files. - That package has been deprecated and it doesn't support null-safe annotations. - We should migrate to using the Dart Analyzer as the front-end parser. diff --git a/packages/pigeon/doc/pigeon_state.png b/packages/pigeon/doc/pigeon_state.png deleted file mode 100644 index 79539ad44a8a..000000000000 Binary files a/packages/pigeon/doc/pigeon_state.png and /dev/null differ diff --git a/packages/pigeon/doc/pigeon_state.puml b/packages/pigeon/doc/pigeon_state.puml deleted file mode 100644 index 4027ac4ad8be..000000000000 --- a/packages/pigeon/doc/pigeon_state.puml +++ /dev/null @@ -1,60 +0,0 @@ -@startuml - -[*] -> LaunchIsolate - -state LaunchIsolate { - [*] --> ParseCommandLineArguments - ParseCommandLineArguments --> WriteTemporarySourceCode - WriteTemporarySourceCode --> SpawnPigeonIsolate - SpawnPigeonIsolate --> WaitForPigeonIsolate - WaitForPigeonIsolate --> [*] -} - -LaunchIsolate -> [*] - -state PigeonIsolate { - [*] --> ParseCommandLineArguments2 - ParseCommandLineArguments2 --> PrintUsage - PrintUsage --> [*] - ParseCommandLineArguments2 --> ExecuteConfigurePigeon - ExecuteConfigurePigeon --> GenerateAST - GenerateAST --> RunGenerators - RunGenerators --> PrintErrors - PrintErrors --> ReturnStatusCode - ReturnStatusCode --> [*] - - state GenerateAST { - [*] --> CollectAnnotatedClasses - CollectAnnotatedClasses --> CollectAnnotatedClassesDependencies - CollectAnnotatedClassesDependencies --> BuildAST - BuildAST --> [*] - } - - state RunGenerators { - state DartTestGeneratorFork <> - state DartTestGeneratorJoin <> - [*] --> DartTestGeneratorFork - DartTestGeneratorFork --> DartTestGeneratorJoin - DartTestGeneratorFork --> DartTestGenerator - DartTestGenerator --> DartTestGeneratorJoin - DartTestGeneratorJoin --> [*] - || - state DartGeneratorFork <> - state DartGeneratorJoin <> - [*] --> DartGeneratorFork - DartGeneratorFork --> DartGeneratorJoin - DartGeneratorFork --> DartGenerator - DartGenerator --> DartGeneratorJoin - DartGeneratorJoin --> [*] - || - state JavaGeneratorFork <> - state JavaGeneratorJoin <> - [*] --> JavaGeneratorFork - JavaGeneratorFork --> JavaGeneratorJoin - JavaGeneratorFork --> JavaGenerator - JavaGenerator --> JavaGeneratorJoin - JavaGeneratorJoin --> [*] - } -} - -@enduml \ No newline at end of file