Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some analyzer tests fail due to message "No dart files found at <path>.dart" #45556

Closed
stereotype441 opened this issue Apr 1, 2021 · 3 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on

Comments

@stereotype441
Copy link
Member

When https://dart-review.googlesource.com/c/sdk/+/193740 lands, the following analyzer tests will begin failing:

  • pkg/front_end/test/analyser_ignored/load_dill_twice_test
  • service/evaluate_activation_in_method_class_test/dds
  • service/evaluate_activation_in_method_class_test/service
  • service/get_user_level_retaining_path_rpc_test/dds
  • service/get_user_level_retaining_path_rpc_test/service
  • service/pause_on_unhandled_async_exceptions_test/dds
  • service/pause_on_unhandled_async_exceptions_test/service

These tests fail because they cause the analyzer to output the message "No dart files found at .dart", whereas the test runner is expecting valid JSON. Prior to https://dart-review.googlesource.com/c/sdk/+/193740, the test runner was expecting analyzer "machine format", which it parsed using a regular expression; since "No dart files found at .dart" didn't match the regular expression, the test runner was treating this as meaning "no errors".

I'm not sure what the proper behavior of the analyzer should be for these tests, but simply ignoring the message and treating the test as passing seems like the wrong thing to do.

@stereotype441 stereotype441 added the area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). label Apr 1, 2021
@munificent
Copy link
Member

Once this CL lands, the test runner will handle this case more gracefully. It detects non-JSON output from analyzer and reports a special test failure (not crash) for them.

I don't know why analyzer gets confused by these tests, but the test runner is doing it's part, so I'm going to bounce this over to area-analyzer.

@munificent munificent added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. and removed area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). labels Jun 2, 2021
@scheglov
Copy link
Contributor

scheglov commented Jun 2, 2021

It seems that these files are excluded from analysis, so the analyzer refuses to analyze them.
But our usual view is that if a user (or a script in this case) asks to analyze some file explicitly, we should analyze it anyway.
We do this for analysis server, and we need to do this for analyzer cli.

@scheglov scheglov self-assigned this Jul 20, 2021
@scheglov
Copy link
Contributor

@srawlins srawlins added the P2 A bug or feature request we're likely to work on label Jul 20, 2021
dart-bot pushed a commit that referenced this issue Jul 20, 2021
Bug: #45556
Change-Id: I5077759b2929540a3631712a09fce951c3732b51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207400
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

4 participants