Closed
Description
This is the analyzer specific issue for dart-lang/language#115. Note that this includes the following elements (with check boxes on dart-lang/language#115):
- analysis_server core features (Go To Definition, Find References, Sort Declarations)
- analysis_server auto-complete (name, constructors)
- analyzer: include generalized type alias test cases in existing diagnostic tests (invalid assignment, type alias application in places like catch, extends, constructor redirection, unnecessary cast with as, unused type aliases, invalid access to a @Protected constructor, member, etc)
- linter: consider existing lints; add test cases and application to generalized type alias (splitting off from this issue)
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
eernstg commentedon Feb 8, 2021
@scheglov, can we close this one? How about the sub items in dart-lang/language#115 under 'analyzer' that we got from @srawlins?
Analyzer: Add conflicting generic interface tests with non-function t…
Analyzer: non-function typedef test cases in diagnostics a-e
Add non-function typedef tests to for_in_* diagnostics
eernstg commentedon Feb 12, 2021
Note that the implementation tracking issue for non-function type aliases is now #44951. The sub-items I mentioned here are now separate items.
Analyzer: introduce more non-function typedef test cases
scheglov commentedon Feb 12, 2021
@srawlins is going over the analyzer tests and adds necessary new tests. I guess we will close this issue only after finishing this tests work. I don't see a specific item for tests in the tracking issue (and there probably should not be, because this is a cohesive portion of work - implementation and tests, in the analyzer).
eernstg commentedon Feb 12, 2021
OK, thanks! There is an item for co19 tests (#44964), and there is an item for checking that the existing language tests are passing (#44966), and I think it makes sense to keep track of the analyzer specific tests separately.
TimWhiting commentedon Mar 10, 2021
I don't know if this is a build problem or an analyzer problem:
I've set my min-sdk version to
2.13.0-0
, and added the experiment to theanalysis_options.yaml
I see no syntax errors in my file.
Traced it to here in package:build
This error message is coming from
package:build
but it directly uses a AnalysisDriver, which is why I'm submitting on this issue. I would assume that the analysis driver would pick up my min-sdk version and the analysis_options.yaml.Also doesn't work if I try to run:
dart run --enable-experiment=nonfunction-type-aliases build_runner build
or
dart --enable-experiment=nonfunction-type-aliases run build_runner build
eernstg commentedon Mar 11, 2021
Hi @TimWhiting, the ability of a code generator to work with new language constructs is separate from the support for the same language construct in the analyzer and compilers. I wouldn't expect the package freezed to handle that kind of type alias at this point, that would most likely be a new feature to implement in the code generator when it is enabled by default.
Moreover, I do not think
dart run
(orpub run
) supports enabling an experiment for subprocesses. The package build does have something calledwithEnabledExperiments
which can be used by aBuilder
. I haven't tried to use that feature, so I don't know exactly what it can do or how to use it, but I believe that it would be a feature of the freezed code generator, not something which is enabled from the outside when that code generator is executed.12 remaining items