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

Using FileKind, and creating result objects for non-Dart files #49022

Open
scheglov opened this issue May 16, 2022 · 2 comments
Open

Using FileKind, and creating result objects for non-Dart files #49022

scheglov opened this issue May 16, 2022 · 2 comments
Labels
analyzer-technical-debt area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@scheglov
Copy link
Contributor

All analyzer/lib/src/dart/analysis/results.dart are Dart results. But we use ErrorsResultImpl to report errors in non-Dart files, like analysis_options.yaml, pubspec.yaml, etc. Which might very well be a good service for users, but the implementation is wrong. If a higher level tool (like DAS) needs a higher level abstraction of "an arbitrary analyzed file", it should wrap and split Dart analysis results vs. other file analysis results.

@scheglov scheglov added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-technical-debt labels May 16, 2022
@bwilkerson
Copy link
Member

While I appreciate what you're saying, all of our user-facing tooling performs analysis on all of the files used in Dart development. If we want to have a parallel set of classes for the analysis of YAML files, that's fine, but it isn't just the analysis server that needs it, we also need this support to be available for plugins.

@scheglov
Copy link
Contributor Author

Maybe. I think we have some utilities from analyzer_plugin used in analysis_server. So, classes for YAML analysis results could live in analyzer_plugin, or even in analyzer - because we still have analyzer_cli that also analyses YAML files, and also constructs ErrorsResultImpl instances for them. We just should not pretend that these are Dart analysis results.

@srawlins srawlins added the P3 A lower priority bug or feature request label May 16, 2022
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-technical-debt area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants