front_end 0.1.29

Front end for Dart #

This package provides a low-level API for use by compiler back ends that wish to implement the Dart language. It is intended for eventual use by dev_compiler, dart2js, and the Dart VM. In addition, it will share implementation details with the analyzer package--this will be accomplished by having the analyzer package import (and re-export) parts of this package's private implementation.

End-users should use the [dartanalyzer][analyzercli] command-line tool to analyze their Dart code.

Integrators that want to write tools that analyze Dart code should use the [analyzer] package.

Note: The APIs in this package are in an early state; developers should be careful about depending on this package. In particular, there is no semver contract for release versions of this package. Please depend directly on individual versions.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  front_end: ^0.1.29

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

Popularity:
Describes how popular the package is relative to other packages. [more]
95
Health:
Code health derived from static analysis. [more]
75
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
20
Overall:
Weighted score of the above. [more]
74
Learn more about scoring.

We analyzed this package on Mar 30, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/src/fasta/builder/class_builder.dart. (-25 points)

Analysis of lib/src/fasta/builder/class_builder.dart reported 60 hints, including:

line 169 col 3: Avoid return types on setters.

line 338 col 21: Use = to separate a named parameter from its default value.

line 338 col 42: Use = to separate a named parameter from its default value.

line 344 col 57: Use = to separate a named parameter from its default value.

line 391 col 35: Unnecessary new keyword.

Fix lib/src/fasta/fasta_codes_cfe_generated.dart. (-25 points)

Analysis of lib/src/fasta/fasta_codes_cfe_generated.dart reported 236 hints, including:

line 16 col 35: Avoid const keyword.

line 25 col 5: Avoid const keyword.

line 34 col 25: Unnecessary new keyword.

line 39 col 10: Unnecessary new keyword.

line 50 col 58: Avoid const keyword.

Fix lib/src/fasta/fasta_codes_generated.dart. (-25 points)

Analysis of lib/src/fasta/fasta_codes_generated.dart reported 901 hints, including:

line 17 col 5: Avoid const keyword.

line 24 col 5: Avoid const keyword.

line 32 col 10: Unnecessary new keyword.

line 41 col 48: Avoid const keyword.

line 52 col 44: Avoid const keyword.

Fix additional 162 files with analysis or formatting issues. (-1049.08 points)

Additional issues in the following files:

  • lib/src/fasta/kernel/body_builder.dart (207 hints)
  • lib/src/fasta/kernel/constant_evaluator.dart (100 hints)
  • lib/src/fasta/kernel/expression_generator.dart (325 hints)
  • lib/src/fasta/kernel/forest.dart (83 hints)
  • lib/src/fasta/kernel/inference_visitor.dart (266 hints)
  • lib/src/fasta/kernel/transform_collections.dart (143 hints)
  • lib/src/fasta/scanner/abstract_scanner.dart (67 hints)
  • lib/src/fasta/source/source_library_builder.dart (87 hints)
  • lib/src/fasta/type_inference/type_inferrer.dart (95 hints)
  • lib/src/scanner/token.dart (317 hints)
  • lib/src/fasta/incremental_compiler.dart (57 hints)
  • lib/src/fasta/parser/parser.dart (56 hints)
  • lib/src/fasta/kernel/class_hierarchy_builder.dart (53 hints)
  • lib/src/fasta/parser/identifier_context.dart (50 hints)
  • lib/src/fasta/source/source_loader.dart (49 hints)
  • lib/src/fasta/kernel/kernel_target.dart (45 hints)
  • lib/src/base/processed_options.dart (38 hints)
  • lib/src/fasta/kernel/constant_int_folder.dart (37 hints)
  • lib/src/testing/id_testing_utils.dart (36 hints)
  • lib/src/fasta/source/value_kinds.dart (35 hints)
  • lib/src/fasta/builder/enum_builder.dart (32 hints)
  • lib/src/fasta/scanner/token.dart (32 hints)
  • lib/src/fasta/names.dart (30 hints)
  • lib/src/fasta/kernel/kernel_shadow_ast.dart (29 hints)
  • lib/src/fasta/source/outline_builder.dart (29 hints)
  • lib/src/fasta/builder/procedure_builder.dart (27 hints)
  • lib/src/fasta/scope.dart (27 hints)
  • lib/src/fasta/kernel/types.dart (26 hints)
  • lib/src/fasta/util/link.dart (25 hints)
  • lib/src/api_unstable/modular_incremental_compilation.dart (24 hints)
  • lib/src/fasta/kernel/constant_collection_builders.dart (23 hints)
  • lib/src/fasta/kernel/collections.dart (22 hints)
  • lib/src/fasta/kernel/type_algorithms.dart (22 hints)
  • lib/src/scanner/errors.dart (21 hints)
  • lib/src/testing/id.dart (21 hints)
  • lib/src/fasta/incremental_serializer.dart (20 hints)
  • lib/src/testing/id_testing.dart (20 hints)
  • lib/src/fasta/kernel/type_builder_computer.dart (19 hints)
  • lib/src/fasta/kernel/utils.dart (19 hints)
  • lib/src/fasta/dill/dill_library_builder.dart (18 hints)
  • lib/src/fasta/scanner/utf8_bytes_scanner.dart (18 hints)
  • lib/src/kernel_generator_impl.dart (18 hints)
  • lib/src/scanner/reader.dart (18 hints)
  • lib/src/fasta/builder/library_builder.dart (17 hints)
  • lib/src/fasta/kernel/forwarding_node.dart (17 hints)
  • lib/src/testing/compiler_common.dart (16 hints)
  • lib/src/testing/id_testing_helper.dart (16 hints)
  • lib/src/fasta/builder/function_builder.dart (15 hints)
  • lib/src/fasta/parser/type_info.dart (15 hints)
  • lib/src/fasta/parser/type_info_impl.dart (15 hints)
  • lib/src/fasta/parser/util.dart (15 hints)
  • lib/src/testing/id_extractor.dart (14 hints)
  • lib/src/fasta/fasta_codes_shared.dart (13 hints)
  • lib/src/base/library_info.dart (12 hints)
  • lib/src/fasta/kernel/transform_set_literals.dart (12 hints)
  • lib/src/fasta/quote.dart (12 hints)
  • lib/src/fasta/source/diet_listener.dart (12 hints)
  • lib/src/fasta/source/stack_listener.dart (12 hints)
  • lib/src/fasta/type_inference/standard_bounds.dart (12 hints)
  • lib/src/fasta/builder/type_variable_builder.dart (11 hints)
  • lib/src/fasta/kernel/redirecting_factory_body.dart (11 hints)
  • lib/src/fasta/parser/block_kind.dart (11 hints)
  • lib/src/fasta/parser/literal_entry_info_impl.dart (11 hints)
  • lib/src/fasta/util/link_implementation.dart (11 hints)
  • lib/src/fasta/dill/dill_class_builder.dart (10 hints)
  • lib/src/fasta/parser/token_stream_rewriter.dart (10 hints)
  • lib/src/fasta/scanner/keyword_state.dart (10 hints)
  • lib/src/fasta/scanner/string_scanner.dart (10 hints)
  • lib/src/fasta/type_inference/type_schema_elimination.dart (10 hints)
  • lib/src/testing/annotated_code_helper.dart (10 hints)
  • lib/src/api_prototype/standard_file_system.dart (9 hints)
  • lib/src/fasta/builder/extension_builder.dart (9 hints)
  • lib/src/fasta/compiler_context.dart (9 hints)
  • lib/src/fasta/loader.dart (9 hints)
  • lib/src/fasta/type_inference/type_inference_engine.dart (9 hints)
  • lib/src/fasta/type_inference/type_promotion.dart (9 hints)
  • lib/src/fasta/type_inference/type_schema_environment.dart (9 hints)
  • lib/src/api_prototype/memory_file_system.dart (8 hints)
  • lib/src/fasta/modifier.dart (8 hints)
  • lib/src/fasta/type_inference/type_constraint_gatherer.dart (8 hints)
  • lib/src/api_unstable/bazel_worker.dart (7 hints)
  • lib/src/base/libraries_specification.dart (7 hints)
  • lib/src/fasta/builder/field_builder.dart (7 hints)
  • lib/src/fasta/parser/identifier_context_impl.dart (7 hints)
  • lib/src/fasta/source/source_extension_builder.dart (7 hints)
  • lib/src/api_prototype/incremental_kernel_generator.dart (6 hints)
  • lib/src/fasta/builder/declaration_builder.dart (6 hints)
  • lib/src/fasta/builder/function_type_builder.dart (6 hints)
  • lib/src/fasta/builder/named_type_builder.dart (6 hints)
  • lib/src/fasta/get_dependencies.dart (6 hints)
  • lib/src/fasta/resolve_input_uri.dart (6 hints)
  • lib/src/fasta/scanner.dart (6 hints)
  • lib/src/fasta/scanner/error_token.dart (6 hints)
  • lib/src/fasta/scanner/string_canonicalizer.dart (6 hints)
  • lib/src/testing/features.dart (6 hints)
  • lib/src/api_unstable/ddc.dart (5 hints)
  • lib/src/compute_platform_binaries_location.dart (5 hints)
  • lib/src/fasta/builder/constructor_builder.dart (5 hints)
  • lib/src/fasta/builder/type_alias_builder.dart (5 hints)
  • lib/src/fasta/crash.dart (5 hints)
  • lib/src/fasta/kernel/load_library_builder.dart (5 hints)
  • lib/src/fasta/scanner/io.dart (5 hints)
  • lib/src/fasta/source/directive_listener.dart (5 hints)
  • lib/src/fasta/source/type_promotion_look_ahead_listener.dart (5 hints)
  • lib/src/api_prototype/kernel_generator.dart (4 hints)
  • lib/src/api_unstable/dart2js.dart (4 hints)
  • lib/src/base/syntactic_entity.dart (4 hints)
  • lib/src/fasta/dill/dill_extension_builder.dart (4 hints)
  • lib/src/fasta/identifiers.dart (4 hints)
  • lib/src/fasta/kernel/type_labeler.dart (4 hints)
  • lib/src/fasta/scanner/scanner_main.dart (4 hints)
  • lib/src/fasta/severity.dart (4 hints)
  • lib/src/fasta/source/source_class_builder.dart (4 hints)
  • lib/src/fasta/type_inference/type_schema.dart (4 hints)
  • lib/src/fasta/builder/formal_parameter_builder.dart (3 hints)
  • lib/src/fasta/builder/member_builder.dart (3 hints)
  • lib/src/fasta/command_line_reporting.dart (3 hints)
  • lib/src/fasta/dill/dill_target.dart (3 hints)
  • lib/src/fasta/import.dart (3 hints)
  • lib/src/fasta/kernel/kernel_api.dart (3 hints)
  • lib/src/fasta/kernel/kernel_builder.dart (3 hints)
  • lib/src/fasta/kernel/verifier.dart (3 hints)
  • lib/src/fasta/parser.dart (3 hints)
  • lib/src/fasta/parser/parser_main.dart (3 hints)
  • lib/src/fasta/uri_translator.dart (3 hints)
  • lib/src/scanner/interner.dart (3 hints)
  • lib/src/api_prototype/summary_generator.dart (2 hints)
  • lib/src/base/instrumentation.dart (2 hints)
  • lib/src/base/resolve_relative_uri.dart (2 hints)
  • lib/src/external_state_snapshot.dart (2 hints)
  • lib/src/fasta/builder/mixin_application_builder.dart (2 hints)
  • lib/src/fasta/builder/prefix_builder.dart (2 hints)
  • lib/src/fasta/builder/type_builder.dart (2 hints)
  • lib/src/fasta/combinator.dart (2 hints)
  • lib/src/fasta/dill/dill_loader.dart (2 hints)
  • lib/src/fasta/dill/dill_type_alias_builder.dart (2 hints)
  • lib/src/fasta/parser/class_member_parser.dart (2 hints)
  • lib/src/fasta/parser/listener.dart (2 hints)
  • lib/src/fasta/parser/literal_entry_info.dart (2 hints)
  • lib/src/fasta/scanner/recover.dart (2 hints)
  • lib/src/fasta/ticker.dart (2 hints)
  • lib/src/fasta/util/error_reporter_file_copier.dart (2 hints)
  • lib/src/api_prototype/compiler_options.dart (1 hint)
  • lib/src/api_prototype/file_system.dart (1 hint)
  • lib/src/api_prototype/terminal_color_support.dart (1 hint)
  • lib/src/fasta/builder/fixed_type_builder.dart (1 hint)
  • lib/src/fasta/builder/invalid_type_declaration_builder.dart (1 hint)
  • lib/src/fasta/builder/modifier_builder.dart (1 hint)
  • lib/src/fasta/builder/nullability_builder.dart (1 hint)
  • lib/src/fasta/builder/type_declaration_builder.dart (1 hint)
  • lib/src/fasta/hybrid_file_system.dart (1 hint)
  • lib/src/fasta/kernel/expression_generator_helper.dart (1 hint)
  • lib/src/fasta/kernel/unlinked_scope.dart (1 hint)
  • lib/src/fasta/library_graph.dart (1 hint)
  • lib/src/fasta/messages.dart (1 hint)
  • lib/src/fasta/parser/assert.dart (1 hint)
  • lib/src/fasta/source/scope_listener.dart (1 hint)
  • lib/src/fasta/target_implementation.dart (1 hint)
  • lib/src/fasta/util/bytes_sink.dart (1 hint)
  • lib/src/fasta/util/relativize.dart (1 hint)
  • lib/src/scanner/string_utilities.dart (1 hint)
  • lib/src/scheme_based_file_system.dart (1 hint)

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: 255 stdout: parsing /dart-sdk/lib/async/async.dart... parsing /dart-sdk/lib/collection/collection.dart... parsing /dart-sdk/lib/internal/internal.dart... parsing /dart-sdk/lib/convert/convert.dart... parsing /dart-sdk/lib/typed_data/typed_data.dart... parsing /dart-sdk/lib/core/core.dart... parsing /dart-sdk/lib/math/math.dart... parsing /dart-sdk/lib/developer/developer.dart... parsing /dart-sdk/lib/isolate/isolate.dart... parsing /dart-sdk/lib/ffi/ffi.dart... parsing /dart-sdk/lib/html/dart2js/html_dart2js.dart... parsing /dart-sdk/lib/html/html_common/html_common_dart2js.dart... parsing /dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_names.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/rti.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/recipe_syntax.dart... parsing /dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart... parsing /dart-sdk/lib/html/html_common/metadata.dart... parsing /dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart... parsing /dart-sdk/lib/svg/dart2js/svg_dart2js.dart... parsing /dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart... parsing /dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart... parsing /dart-sdk/lib/_http/http.dart... parsing /dart-sdk/lib/io/io.dart... parsing /dart-sdk/lib/js/dart2js/js_dart2js.dart... parsing /dart-sdk/lib/js/_js.dart... parsing /dart-sdk/lib/mirrors/mirrors.dart... parsing /dart-sdk/lib/html/dartium/nativewrappers.dart... parsing /dart-sdk/lib/cli/cli.dart... parsing /dart-sdk/lib/wasm/wasm.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart... Initialized dartdoc with 37 libraries in 31.0 seconds documenting front_end Validating docs... no issues found Documented 0 public libraries in 1.4 seconds stderr: Documenting front_end... Unhandled exception: dartdoc could not find any libraries to document #0 Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:196:7)

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (_fe_analyzer_shared).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
_fe_analyzer_shared 1.0.0 1.0.0 1.0.3
kernel 0.3.29 0.3.29
meta ^1.0.2 1.1.8
package_config ^1.1.0 1.9.3
Transitive dependencies
charcode 1.1.3
Dev dependencies
analyzer 0.39.1
args >=0.13.0 <2.0.0 1.6.0
build_integration
dart_style ^1.0.7
json_rpc_2 ^2.0.9
path ^1.3.9 1.6.4
test ^1.3.4
test_reflective_loader ^0.1.0
web_socket_channel ^1.0.4
yaml ^2.1.12