Always use relative paths to import from within the front end

The style guide says to "PREFER relative paths when importing
libraries within your own package’s lib directory".  Mixing them with
package: imports doesn't work.  Before: we had a mix.  Now: we don't.

Change-Id: Iadcf1dda7bae51121e325f5d4b8c6add8759da95
Reviewed-on: https://dart-review.googlesource.com/68082
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
Kevin Millikin 2018-08-08 11:29:12 +00:00 committed by commit-bot@chromium.org
parent 84d8887d3f
commit 35d26c9b14
26 changed files with 99 additions and 97 deletions

View file

@ -4,7 +4,7 @@
library front_end.byte_store;
export 'package:front_end/src/byte_store/byte_store.dart'
export '../byte_store/byte_store.dart'
show ByteStore, MemoryByteStore, MemoryCachingByteStore, NullByteStore;
export 'package:front_end/src/byte_store/file_byte_store.dart'
export '../byte_store/file_byte_store.dart'
show EvictingFileByteStore, FileByteStore;

View file

@ -8,8 +8,8 @@ library front_end.compilation_message;
import 'package:source_span/source_span.dart' show SourceSpan;
import 'package:front_end/src/fasta/severity.dart' show Severity;
export 'package:front_end/src/fasta/severity.dart' show Severity;
import '../fasta/severity.dart' show Severity;
export '../fasta/severity.dart' show Severity;
/// A single message, typically an error, reported during compilation, and
/// information about where it occurred and suggestions on how to fix it.

View file

@ -4,10 +4,11 @@
library front_end.compiler_options;
import 'package:front_end/src/api_prototype/byte_store.dart';
import 'package:front_end/src/base/performance_logger.dart';
import 'package:kernel/target/targets.dart' show Target;
import 'byte_store.dart';
import '../base/performance_logger.dart';
import '../fasta/fasta_codes.dart' show FormattedMessage;
import '../fasta/severity.dart' show Severity;

View file

@ -7,11 +7,12 @@
import 'dart:async' show Future;
import 'package:front_end/src/api_prototype/file_system.dart';
import 'package:front_end/src/base/processed_options.dart';
import 'package:front_end/src/kernel_generator_impl.dart';
import 'package:kernel/target/targets.dart' show Target;
import '../api_prototype/file_system.dart';
import '../base/processed_options.dart';
import '../kernel_generator_impl.dart';
import '../api_prototype/compiler_options.dart';
import 'compiler_state.dart';

View file

@ -4,13 +4,14 @@
import 'dart:async' show Future;
import 'package:front_end/src/api_prototype/file_system.dart';
import 'package:front_end/src/api_prototype/standard_file_system.dart';
import 'package:front_end/src/base/processed_options.dart';
import 'package:front_end/src/kernel_generator_impl.dart';
import 'package:kernel/kernel.dart' show Component;
import 'package:kernel/target/targets.dart' show Target;
import '../api_prototype/file_system.dart';
import '../api_prototype/standard_file_system.dart';
import '../base/processed_options.dart';
import '../kernel_generator_impl.dart';
import '../api_prototype/compiler_options.dart';
import 'compiler_state.dart';

View file

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/base/source.dart';
import 'source.dart';
/**
* An object with which an analysis result can be associated.

View file

@ -2,9 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/fasta/problems.dart';
import 'package:kernel/ast.dart';
import '../fasta/problems.dart';
/// Convert '' to '->' because '' doesn't show up in some terminals.
/// Remove prefixes that are used very often in tests.
String _shortenInstrumentationString(String s) => s

View file

@ -2,11 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/base/analysis_target.dart';
import 'package:front_end/src/base/timestamped_data.dart';
import 'package:front_end/src/base/uri_kind.dart';
import 'package:path/path.dart' as pathos;
import 'analysis_target.dart';
import 'timestamped_data.dart';
import 'uri_kind.dart';
/// Base class providing implementations for the methods in [Source] that don't
/// require filesystem access.
abstract class BasicSource extends Source {

View file

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/byte_store/cache.dart';
import 'cache.dart';
/**
* Store of bytes associated with string keys.

View file

@ -7,10 +7,11 @@ import 'dart:io';
import 'dart:isolate';
import 'dart:typed_data';
import 'package:front_end/src/byte_store/byte_store.dart';
import 'package:front_end/src/byte_store/fletcher16.dart';
import 'package:path/path.dart';
import 'byte_store.dart';
import 'fletcher16.dart';
/**
* The request that is sent from the main isolate to the clean-up isolate.
*/

View file

@ -5,12 +5,13 @@
import 'dart:convert';
import 'dart:io';
import 'package:front_end/src/byte_store/byte_store.dart';
import 'package:front_end/src/byte_store/cache.dart';
import 'package:front_end/src/byte_store/file_byte_store.dart';
import 'package:meta/meta.dart';
import 'package:path/path.dart';
import 'byte_store.dart';
import 'cache.dart';
import 'file_byte_store.dart';
/// The function that returns current time in milliseconds.
typedef int GetCurrentTime();

View file

@ -4,9 +4,6 @@
library fasta.kernel_enum_builder;
import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'
show ShadowClass;
import 'package:kernel/ast.dart'
show
Arguments,
@ -29,6 +26,8 @@ import 'package:kernel/ast.dart'
TreeNode,
VariableGet;
import 'kernel_shadow_ast.dart' show ShadowClass;
import '../fasta_codes.dart'
show
messageNoUnnamedConstructorInObject,

View file

@ -4,8 +4,7 @@
library fasta.kernel_formal_parameter_builder;
import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'
show VariableDeclarationJudgment;
import 'kernel_shadow_ast.dart' show VariableDeclarationJudgment;
import '../modifier.dart' show finalMask;
@ -16,8 +15,7 @@ import 'kernel_builder.dart'
KernelTypeBuilder,
MetadataBuilder;
import 'package:front_end/src/fasta/source/source_library_builder.dart'
show SourceLibraryBuilder;
import '../source/source_library_builder.dart' show SourceLibraryBuilder;
class KernelFormalParameterBuilder
extends FormalParameterBuilder<KernelTypeBuilder> {

View file

@ -4,12 +4,6 @@
library fasta.kernel_procedure_builder;
import 'package:front_end/src/base/instrumentation.dart'
show Instrumentation, InstrumentationValueForType;
import 'package:front_end/src/fasta/type_inference/type_inferrer.dart'
show TypeInferrer;
import 'package:kernel/ast.dart'
show
Arguments,
@ -42,6 +36,11 @@ import 'package:kernel/ast.dart'
import 'package:kernel/type_algebra.dart' show containsTypeVariable, substitute;
import '../../base/instrumentation.dart'
show Instrumentation, InstrumentationValueForType;
import '../type_inference/type_inferrer.dart' show TypeInferrer;
import '../loader.dart' show Loader;
import '../messages.dart'

View file

@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/fasta/fasta_codes.dart';
import 'package:front_end/src/fasta/parser/parser.dart';
import 'package:front_end/src/scanner/token.dart';
import '../fasta_codes.dart';
import 'parser.dart';
import '../../scanner/token.dart';
class DirectiveContext {
DirectiveState state = DirectiveState.Unknown;

View file

@ -2,8 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/fasta/scanner/error_token.dart'
show UnmatchedToken;
import '../scanner/error_token.dart' show UnmatchedToken;
import '../../scanner/token.dart'
show

View file

@ -33,12 +33,11 @@ import 'package:kernel/text/ast_to_text.dart' show Printer;
import 'package:testing/testing.dart'
show ChainContext, Result, StdioProcess, Step, TestDescription;
import 'package:front_end/src/api_prototype/front_end.dart';
import '../../api_prototype/front_end.dart';
import 'package:front_end/src/base/processed_options.dart'
show ProcessedOptions;
import '../../base/processed_options.dart' show ProcessedOptions;
import 'package:front_end/src/compute_platform_binaries_location.dart'
import '../../compute_platform_binaries_location.dart'
show computePlatformBinariesLocation;
import '../compiler_context.dart';

View file

@ -4,14 +4,14 @@
library fasta.uri_translator_impl;
import 'package:front_end/src/base/libraries_specification.dart'
show TargetLibrariesSpecification;
import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext;
import 'package:front_end/src/fasta/fasta_codes.dart';
import 'package:front_end/src/fasta/severity.dart' show Severity;
import 'package:front_end/src/fasta/uri_translator.dart';
import 'package:package_config/packages.dart' show Packages;
import '../base/libraries_specification.dart' show TargetLibrariesSpecification;
import 'compiler_context.dart' show CompilerContext;
import 'fasta_codes.dart';
import 'severity.dart' show Severity;
import 'uri_translator.dart';
/// Implementation of [UriTranslator] for absolute `dart` and `package` URIs.
class UriTranslatorImpl implements UriTranslator {
/// Library information for platform libraries.

View file

@ -8,16 +8,17 @@ import 'dart:typed_data';
import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';
import 'package:front_end/src/api_prototype/byte_store.dart';
import 'package:front_end/src/api_prototype/file_system.dart';
import 'package:front_end/src/base/api_signature.dart';
import 'package:front_end/src/base/resolve_relative_uri.dart';
import 'package:front_end/src/dependency_walker.dart' as graph;
import 'package:front_end/src/fasta/uri_translator.dart';
import 'package:front_end/src/incremental/format.dart';
import 'package:front_end/src/incremental/unlinked_unit.dart';
import 'package:kernel/target/targets.dart';
import '../api_prototype/byte_store.dart';
import '../api_prototype/file_system.dart';
import '../base/api_signature.dart';
import '../base/resolve_relative_uri.dart';
import '../dependency_walker.dart' as graph;
import '../fasta/uri_translator.dart';
import 'format.dart';
import 'unlinked_unit.dart';
/// This function is called for each newly discovered file, and the returned
/// [Future] is awaited before reading the file content.
typedef Future<Null> NewFileFn(Uri uri);

View file

@ -4,7 +4,7 @@
import 'dart:typed_data' show Uint8List;
import 'package:front_end/src/base/flat_buffers.dart' as fb;
import '../base/flat_buffers.dart' as fb;
/// Unlinked information about a `show` or `hide` combinator in an import or
/// export directive.

View file

@ -4,20 +4,6 @@
import 'dart:async';
import 'package:front_end/src/api_prototype/byte_store.dart';
import 'package:front_end/src/api_prototype/compilation_message.dart';
import 'package:front_end/src/api_prototype/file_system.dart';
import 'package:front_end/src/base/api_signature.dart';
import 'package:front_end/src/base/performance_logger.dart';
import 'package:front_end/src/base/processed_options.dart';
import 'package:front_end/src/fasta/compiler_context.dart';
import 'package:front_end/src/fasta/dill/dill_target.dart';
import 'package:front_end/src/fasta/kernel/kernel_target.dart';
import 'package:front_end/src/fasta/kernel/metadata_collector.dart';
import 'package:front_end/src/fasta/kernel/utils.dart';
import 'package:front_end/src/fasta/ticker.dart';
import 'package:front_end/src/fasta/uri_translator.dart';
import 'package:front_end/src/incremental/file_state.dart';
import 'package:kernel/binary/ast_from_binary.dart';
import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/core_types.dart';
@ -25,6 +11,21 @@ import 'package:kernel/kernel.dart';
import 'package:kernel/type_environment.dart';
import 'package:meta/meta.dart';
import '../api_prototype/byte_store.dart';
import '../api_prototype/compilation_message.dart';
import '../api_prototype/file_system.dart';
import '../base/api_signature.dart';
import '../base/performance_logger.dart';
import '../base/processed_options.dart';
import '../fasta/compiler_context.dart';
import '../fasta/dill/dill_target.dart';
import '../fasta/kernel/kernel_target.dart';
import '../fasta/kernel/metadata_collector.dart';
import '../fasta/kernel/utils.dart';
import '../fasta/ticker.dart';
import '../fasta/uri_translator.dart';
import 'file_state.dart';
/// This function is invoked for each newly discovered file, and the returned
/// [Future] is awaited before reading the file content.
typedef Future<Null> KernelDriverFileAddedFn(Uri uri);

View file

@ -4,15 +4,13 @@
import 'dart:typed_data';
import 'package:front_end/src/base/api_signature.dart';
import 'package:front_end/src/fasta/parser.dart'
show Listener, Parser, optional;
import 'package:front_end/src/fasta/parser/top_level_parser.dart';
import 'package:front_end/src/fasta/scanner.dart';
import 'package:front_end/src/fasta/scanner/token_constants.dart'
show STRING_TOKEN;
import 'package:front_end/src/fasta/source/directive_listener.dart';
import 'package:front_end/src/incremental/format.dart';
import '../base/api_signature.dart';
import '../fasta/parser.dart' show Listener, Parser, optional;
import '../fasta/parser/top_level_parser.dart';
import '../fasta/scanner.dart';
import '../fasta/scanner/token_constants.dart' show STRING_TOKEN;
import '../fasta/source/directive_listener.dart';
import 'format.dart';
/// Compute the [UnlinkedUnitBuilder] for the [content].
UnlinkedUnitBuilder computeUnlinkedUnit(List<int> salt, List<int> content) {

View file

@ -2,11 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/base/errors.dart';
import 'package:front_end/src/fasta/fasta_codes.dart';
import 'package:front_end/src/fasta/scanner/error_token.dart';
import 'package:front_end/src/scanner/token.dart' show Token, TokenType;
import 'package:front_end/src/fasta/scanner/token_constants.dart';
import '../base/errors.dart';
import '../fasta/fasta_codes.dart';
import '../fasta/scanner/error_token.dart';
import 'token.dart' show Token, TokenType;
import '../fasta/scanner/token_constants.dart';
/**
* The error codes used for errors detected by the scanner.

View file

@ -3,10 +3,11 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:charcode/ascii.dart';
import 'package:front_end/src/scanner/errors.dart';
import 'package:front_end/src/scanner/reader.dart';
import 'package:front_end/src/scanner/string_utilities.dart';
import 'package:front_end/src/scanner/token.dart';
import 'errors.dart';
import 'reader.dart';
import 'string_utilities.dart';
import 'token.dart';
/**
* A state in a state machine used to scan keywords.

View file

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/scanner/interner.dart';
import 'interner.dart';
class StringUtilities {
static Interner INTERNER = new NullInterner();

View file

@ -8,9 +8,9 @@
*/
import 'dart:collection';
import 'package:front_end/src/base/syntactic_entity.dart';
import 'package:front_end/src/fasta/scanner/token_constants.dart';
import 'package:front_end/src/scanner/string_utilities.dart';
import '../base/syntactic_entity.dart';
import '../fasta/scanner/token_constants.dart';
import 'string_utilities.dart';
const int NO_PRECEDENCE = 0;
const int ASSIGNMENT_PRECEDENCE = 1;