Open
Description
Problem
We're analyzing all Dart files w.r.t. the toplevel pubspec.yaml
, not w.r.t. the first pubspec.yaml
found when walking folders up.
Actual behavior
The toplevel pubspec.yaml
is used.
Package validation found the following potential issues:
* line 7, column 1 of test/data/native_add_add_source/build.dart: This package does not have native_toolchain_c in the `dependencies` or `dev_dependencies` section of `pubspec.yaml`.
╷
7 │ import 'package:native_toolchain_c/native_toolchain_c.dart';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This behavior is inconsistent with dart analyze
.
Expected behavior
No errors, there is a pubspec.yaml
inside test/data/native_add_add_source/
that contains a dependency on native_toolchain_c
.
I expect the behavior to be similar to dart analyze
respecting other pubspec.yaml
s.
Related issues
This issue seems to be related to:
Both of these issues have to do with assuming that there is only a single pubspec.yaml
.