Skip to content

[Null-aware elements] Analyzer implementation #56836

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

Closed
8 of 15 tasks
chloestefantsova opened this issue Oct 2, 2024 · 3 comments
Closed
8 of 15 tasks

[Null-aware elements] Analyzer implementation #56836

chloestefantsova opened this issue Oct 2, 2024 · 3 comments
Assignees
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. feature-null-aware-elements Implementation of the Null-aware elements feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@chloestefantsova
Copy link
Contributor

chloestefantsova commented Oct 2, 2024

This meta issue tracks all the analyzer implementation work items. Referenced from: https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/process/new_language_feature.md

Work Items

  • AST enhancements (AstBuilder)
  • Element model
  • Type system updates (should not be affected)
  • Summary support
  • Resolution (should not be affected)
    • ResolutionVisitor (should not be affected)
    • ScopeResolverVisitor (should not be affected)
    • ResolverVisitor (should not be affected)
  • Index and search (should not be affected)
  • Warnings
    • ErrorVerifier
    • Dead code
      • Verify the correct dead code detection due to the changes in flow analysis.
  • ExitDetector
  • NodeLintRegistry
@chloestefantsova chloestefantsova self-assigned this Oct 2, 2024
@chloestefantsova chloestefantsova added feature-null-aware-elements Implementation of the Null-aware elements feature legacy-area-analyzer Use area-devexp instead. labels Oct 2, 2024
copybara-service bot pushed a commit that referenced this issue Oct 3, 2024
This CL implements type inference for null-aware colletion elements
and map entires in the Analyzer. The new functionality is dependent on
the `null-aware-elements` feature flag, since only when the flag is
enable, can the `keyQuestion` and `valueQuestion` properties of the
MapEntryLiteralEntry class be not null and the objects of the
`NullAwareElement` be created.

Part of #56836

Change-Id: I9243b01d5de097ae0d2ca3376807c6209ef0f830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387980
Commit-Queue: Chloe Stefantsova <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
@scheglov scheglov added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Oct 3, 2024
@pq
Copy link
Member

pq commented Oct 17, 2024

Hi! As part of triage, we look for updates on all P1 issues. @chloestefantsova, is there anything to update?

@chloestefantsova
Copy link
Contributor Author

Hi! As part of triage, we look for updates on all P1 issues. @chloestefantsova, is there anything to update?

@pq Yes, at this point the flow analysis, the type inference, and constant verification are implemented. Currently I'm working on reporting warnings. With warnings done, the existing failures on the co19 tests for the Analyzer will be fully addressed. Then I will switch to supporting the constants in the summaries, lints, and analysis server features.

@pq
Copy link
Member

pq commented Oct 18, 2024

Awesome. Thanks for the update. Cool to see this feature cruising along!

copybara-service bot pushed a commit that referenced this issue Oct 25, 2024
Part of #56836

Change-Id: I3fcdceff667f371fcf4b66c12bd16e2f34e6446c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391621
Reviewed-by: Keerti Parthasarathy <[email protected]>
Reviewed-by: Erik Ernst <[email protected]>
Commit-Queue: Chloe Stefantsova <[email protected]>
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Oct 29, 2024
@srawlins srawlins added the dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec label Nov 22, 2024
@bwilkerson bwilkerson added P2 A bug or feature request we're likely to work on and removed P1 A high priority bug; for example, a single project is unusable or has many test failures labels Jan 22, 2025
@bwilkerson bwilkerson added area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. and removed dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. feature-null-aware-elements Implementation of the Null-aware elements feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants