sdk
sdk copied to clipboard
`dart analyze` always produces `Target of URI doesn't exist` errors but `dart run` is successful
issue: dart analyze
always produces Target of URI doesn't exist
errors but dart run
is successful
version: 2.17.6
system: MacOSX
steps to reproduce:
-
wget https://storage.googleapis.com/dart-archive/channels/stable/release/2.17.6/sdk/dartsdk-macos-x64-release.zip
-
unzip dartsdk-macos-x64-release.zip
-
<path to dart> create testapp
-
cd testapp
-
<path to dart> pub get
-
<path to dart> analyze
output:
Analyzing testapp... 1.7s
error • bin/testapp.dart:1:8 • Target of URI doesn't exist: 'package:testapp/testapp.dart'. Try creating the file
referenced by the URI, or Try using a URI for a file that does exist. • uri_does_not_exist
error • test/testapp_test.dart:1:8 • Target of URI doesn't exist: 'package:testapp/testapp.dart'. Try creating the
file referenced by the URI, or Try using a URI for a file that does exist. • uri_does_not_exist
error • test/testapp_test.dart:2:8 • Target of URI doesn't exist: 'package:test/test.dart'. Try creating the file
referenced by the URI, or Try using a URI for a file that does exist. • uri_does_not_exist
error • test/testapp_test.dart:5:3 • The function 'test' isn't defined. Try importing the library that defines 'test',
correcting the name to the name of an existing function, or defining a function named 'test'. •
undefined_function
error • test/testapp_test.dart:6:5 • The function 'expect' isn't defined. Try importing the library that defines
'expect', correcting the name to the name of an existing function, or defining a function named 'expect'. •
undefined_function
error • test/testapp_test.dart:6:12 • The function 'calculate' isn't defined. Try importing the library that defines
'calculate', correcting the name to the name of an existing function, or defining a function named 'calculate'. •
undefined_function
warning • analysis_options.yaml:14:10 • The include file 'package:lints/recommended.yaml' in
'/Users/brigham/tmp2/testapp/analysis_options.yaml' can't be found when analyzing '/Users/brigham/tmp2/testapp'. •
include_file_not_found
7 issues found.