I plan using it to implement serialization of MacroExecutionResult(s).
Bug: https://github.com/dart-lang/language/issues/3877
Change-Id: I34d95ab6fd2c335ceb2a957c9222947b85e986a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369841
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This CL doesn't set up the analyzer to surface links to these destinations, just includes the new format in the diagnostic messages file.
Change-Id: I6c227448b42a5abac53d5c6a863e599c7e8809da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Marya Belanger <mbelanger@google.com>
- use the new RelevanceComputer to compute relevance for CandidateSuggestion's before calling into the SuggestionBuilder, as
part of the new flow for completions.
- reuse the RelevanceComputer where possible in SuggestionBuilder.
Change-Id: I8fdfaee81e68bc66f726c40a76ab6c81099a2cc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Late local variables are lowered by the CFE into a local:
* backing store variable
* get method
* set method
* isSet local variable (optionally when the type is nullable)
This change updates the name in JavaScript used for the backing store
variable to match the name for the late variable from the original
source. It also updates the scope information passed for expression
evaluation to remove the lowered name and replace it with the original
so evaluations will work as well.
The name change avoids the hiding performed by the debugger on
recognized temporary names so it appears in the list of local variables.
b/343405209
Issue: See https://github.com/dart-lang/sdk/issues/55918
Change-Id: I6b65a62baf6f26f6e9cfee9f14667d021e16645e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369506
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Work towards https://github.com/dart-lang/dartdoc/issues/3761
Sibling CL to https://dart-review.googlesource.com/c/sdk/+/365204
The analyzer has never recognized `[this]` as a valid doc comment
reference (and the `comment_references` lint rule has similarly
reported such reference attempts). dartdoc has its own algorithms
for resolving comment references, which we are dismantling in favor
of a single resolution, provided by the analyzer.
We've also decided against adding support in the analyzer (see
https://github.com/dart-lang/linter/issues/2079), so these
reference attempts should be re-written.
Change-Id: I872c215a574dc3d04f0708387408d22fdfd14c14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366882
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
This package was moved to third_party but the URL here was not updated so the link on Pub is a 404.
This will need a new Pub release before it updates, but I'm not sure it's worth doing until there are some changes.
Change-Id: Ibd1e4ba0208f13f27e1e04ba141e8a78155bd2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369700
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Well, to be honest, remove all instances of Group. Instead, "groups"
are Strings. Because there was only one field left, a Group is just
a... name of a group.
Also, LintRule is no longer Comparable because that does not seem to
have served a purpose...
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I6e058139631dc1b06a4072a2549f156d1622c673
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369782
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
* Remove unused LinterException, Reporter, PrintingReporter.
* Mark Hyperlink as visible-for-testing, and make 3 fields private.
* Make the LinterConstantEvaluationResult constructor private.
* Make LinterContextParsedImpl.package a getter
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ib403fb7744e9454742d6555c8cdb8764ab4377be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369781
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Also update the coverage test so that it prints detailed results to
standard output, so that the repro instructions will produce a useful
result.
In my experiments, I've found that the number supplied for the
`--tasks` argument can have a small effect on coverage numbers (though
I'm not sure why), so I've included it in the repro instructions.
Change-Id: Ic347a9e5e3c2da0f73ceefbaa9322a60295735d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368920
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Index checks in debug mode are useful to catch bugs earlier.
Also remove stale declaration of PcDescriptors::PrintHeaderString.
TEST=ci
Change-Id: I4a149c3516a6627b3d4d254b9b7eed403f8aea1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369721
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
And rename it to TestLinter.
We also get to remove `LintRule._locationInfo`,which was _only_ used
for testing pubspec-oriented rules.
This DartLinter class is only used in tests and tools of the linter
package, so it's good to move it out of analyzer lib/.
In order to remove `LintRule._locationInfo`, we move the singular
package_names test case to be a reflective test.
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I97b5e79daa07eb3942f5444502473a4ec1e9daf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369562
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
PatternAssignment is a strange expression that syntactcally can have
declared variables inside.
Bug: https://github.com/dart-lang/sdk/issues/52363
Change-Id: Id6132be26581112941b7b4828c8e232143ed59b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369505
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
As discussed, remove dedicated wildcard experiment test classes in favor of language versioning exceptions.
Change-Id: I415485b42b6c356d6beec9203dcb7d838e341399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369509
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
TEST=verified that
pkg/vm_service/test/breakpoint_resolves_immediately_in_compiled_field_initializer_test.dart
fails without the changes in this CL and passes with them, verified that
none of the existing debugger tests got broken by this CL
Change-Id: I6acb5576a80e5d633b012c866fe90bf13d2c1ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369162
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Instead of hand-written assembly to instantiate various different kinds
of type constants, we simply lower type constants to `InstanceConstant`s
for which we already have code generation.
This lowering also means that types that are considered to be different
on the kernel `DartType` level may end up being lowered to the same
`InstanceConstant`.
=> We canonicalize them now where we didn't before
=> We reduce code size.
An example where this happens the `TypeParameterType`: On the kernel
level two such types are different if they refer to a different class.
But in the RTT data structure we do not care about what class they refer
to, only the index is important (as RTT knows which class it belongs
to).
Issue https://github.com/dart-lang/sdk/issues/55516
Change-Id: I7ebd68b2c48c752f6d074a7981da75fbbfbcf00f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369480
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
When checking against a destination type that isn't generic, we can
safely ignore the type arguments of the concrete class (as we only care
whether the object's class has the destination type in its transitive
super type hierarchy).
=> Avoid calling `Object._getTypeArguments(o)` if dst type is non-generic.
Issue https://github.com/dart-lang/sdk/issues/55516
Change-Id: Ie9c6a3ab2d99acc07546f9d28ca71ac740c4aad5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369462
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This makes it more consistent with other listener calls.
Change-Id: Iae98ae4c37078c15ea785faef1cb21b2ea85bb48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
If we do a type check against a class that isn't generic, then we can
safely ignore all the type arguments - because irrespective of their
values - either the class we test against is in the transitive super
hierarchy of an object's class or not.
Issue https://github.com/dart-lang/sdk/issues/55516
Change-Id: Ibf6950492d4c33d7eaf55d6ce8389ebfac201b00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369461
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
This brings the soft static enforcement that we had before: a producer
that extends ParsedCorrectionProducer cannot access the
ResolvedUnitResult of a ParsedUnitResult.
Also we add some runtime enforcement that the producers used for parse-
only lint rules are ParsedCorrectionProducer.
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: If77fa66ae6fc070de1c7e931eb992a4adc14b68a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369561
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
We talked about migrating these tests to using language version overrides but I lost the plot over the weekend :).
Can you suggest how I'd modify this? How would I opt into this feature with a language version override if there is not version in which we have it enabled?
Change-Id: Ie0411d8f24e7468692a99cc2bc645bdbd3d5a500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369420
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>