mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 06:21:52 +00:00
1c86b2f5f6
Prior to this fix, if the user's package had a relative import from outside `lib` to inside `lib` (e.g. from `test` to `lib`), the migration tool would regard the imported file as being reached via a `file:` URI. This caused it to get confused and complain that the user had a dependency on unmigrated code (this happened because the check for dependency on unmigrated code excluded the user's files via their canonical URIs, and files inside `lib` use `package:` for their canonical URIs). To fix the problem, we modify the check for dependency on unmigrated code so that it excludes the user's files via their path rather than their URI. Note that relative imports into the `lib` directory are discouraged by the style guide*, but it still seems worth fixing this bug since they do crop up in the wild. *https://dart.dev/guides/language/effective-dart/usage#dont-allow-an-import-path-to-reach-into-or-out-of-lib Fixes #45780. Bug: https://github.com/dart-lang/sdk/issues/45780 Change-Id: Iff41ca0059d78bbb812dd6f421be6458e7049895 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196344 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Paul Berry <paulberry@google.com> |
||
---|---|---|
.. | ||
front_end | ||
preview | ||
utilities | ||
abstract_context.dart | ||
abstract_single_unit.dart | ||
already_migrated_code_decorator_test.dart | ||
api_test.dart | ||
api_test_base.dart | ||
decorated_class_hierarchy_test.dart | ||
decorated_type_test.dart | ||
edge_builder_flow_analysis_test.dart | ||
edge_builder_test.dart | ||
edit_plan_test.dart | ||
edit_planner_pass_through_merging_test.dart | ||
fix_aggregator_test.dart | ||
fix_builder_test.dart | ||
fix_reason_target_test.dart | ||
instrumentation_test.dart | ||
migration_cli_test.dart | ||
migration_visitor_test_base.dart | ||
node_builder_test.dart | ||
nullability_node_test.dart | ||
test_all.dart | ||
variables_test.dart | ||
verify_tests_test.dart |