Konstantin Shcheglov
560f44af01
CQ. Switch clients to default constructor of FunctionTypeImpl.
...
Also rename the public `FunctionTypeImpl` constructor formal parameter
from `parameters` to `formalParameters`, matching the API exposed by
`FunctionType`.
Change-Id: I6f9bbeed06cee708f78bb7127843222db08e1d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499040
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2026-04-28 17:13:48 -07:00
Konstantin Shcheglov
6cd3938741
Breaking changes for analyzer 13.0.0
...
https://github.com/dart-lang/sdk/issues/62799
https://github.com/dart-lang/sdk/issues/62944
https://github.com/dart-lang/sdk/issues/63002
https://github.com/dart-lang/sdk/issues/62970
Looks mostly green in google3: https://fusion2.corp.google.com/presubmit/901021300/OCL:901021300:BASE:901308428:1776439417713:37cd1695
Change-Id: I44754a48f66a0b58851d7c20fcfa61f7fb1b555a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488624
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-04-17 23:06:25 -07:00
Konstantin Shcheglov
9bec262263
FixCrash. Fix inferUndefinedExpressionType() to handle missing positional / named record type field.
...
Change-Id: Ie3758d195f8f4e352880616c50b1f28a7337eeb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493964
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-04-08 17:28:26 -07:00
Brian Wilkerson
c6a0f08eb0
Update convert-into-block-body for primary constructors
...
This updates convert-into-block-body to work on primary constructor
bodies.
It also makes it work for top-level container declarations.
Closes https://github.com/dart-lang/sdk/issues/63039
Change-Id: I9b57b73a631aee8446f6c046d6faf23e7eea827f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493488
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2026-04-08 13:14:34 -07:00
FMorschel
0e35d4ecf7
[DAS] Fixes create member inference for switch expressions
...
Fixes: https://github.com/dart-lang/sdk/issues/62108
Change-Id: Iefed0af48180deb75f185417ea88361290a85ebe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/466122
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-12-10 11:06:58 -08:00
FMorschel
2cbcc7f37c
[DAS] Fixes Create (extension) method for unresolved closure return type
...
Fixes: https://github.com/dart-lang/sdk/issues/61898
Change-Id: I0b1e7ad208a54a04f0ff4147f27403845f9a379d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459521
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-12-10 10:40:00 -08:00
FMorschel
9f4c7e5d8b
[DAS] Fixes Create setters, getters and fields for using type parameters
...
Bug: https://github.com/dart-lang/sdk/issues/61186
Change-Id: Ib70937ce8232ec087cf95d12d52a1bfdf59ad3ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442240
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-12-05 10:32:55 -08:00
FMorschel
eb1a814681
[DAS] Fixes create fixes type resolving in for-in loops.
...
This makes the create fixes correctly suggest `Iterable`, `Future<Iterable>`, or `Future<Stream>` when the awaited expression is used in a for-in loop. It also takes into account the type of the loop variable for the type argument of `Iterable` or `Stream`.
Fixes: https://github.com/dart-lang/sdk/issues/62092
Change-Id: I055af13ee12ceb141f5d75c340c607ae803d0b07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/464782
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-11-30 15:19:55 -08:00
FMorschel
b5113c2c23
[DAS] Review create fixes for if-null expressions
...
Fixes: https://github.com/dart-lang/sdk/issues/61575
Change-Id: If5232574ebe9cb352628eac0f6c07c39c964a110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452240
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-10-17 09:15:48 -07:00
FMorschel
bf2fc7d8e5
[DAS] Fixes part file handling for some create fixes
...
Bug: https://github.com/dart-lang/sdk/issues/61192
Change-Id: I8aa765fca2d2948ab6fe1b47a6bff6bf58de3cd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447341
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-10-08 11:40:11 -07:00
FMorschel
cc876c2345
[DAS] Fixes infering bool for guard in create fixes
...
Fixes: https://github.com/dart-lang/sdk/issues/61589
Change-Id: Iaf43927c9d3fcf43b2dfa23c91e17333baeed184
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452181
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-10-06 14:46:01 -07:00
FMorschel
7c754d325d
[DAS] Adds typeParametersInScope for DartEditBuilder.writeType and related methods
...
This change adds a new parameter `typeParametersInScope` to `DartEditBuilder.writeType`, and related methods to deprecate the previous `methodBeingCopied` parameter, which limited our ability to pass in some type parameters that are in scope.
Also fixes a TODO about testing if the `Record` feature is enabled or not.
And as a bonus, we now always write down type parameters by looking for the closest public type or falling back to `Object?` or `dynamic`.
Bug: https://github.com/dart-lang/sdk/issues/61186
Change-Id: I7a7b1c62adb81aecfdf61ebbaa0d95f1d33bced8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442282
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-08-29 10:32:10 -07:00
Sam Rawlins
cbfc0784de
DAS plugins: Bump language version to 3.9
...
Change-Id: I880e53634c570cc25f4ff22dd01397b088b9bd07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-08-28 09:35:20 -07:00
FMorschel
990d99161a
[DAS] Removes "Add null check" fix false-positive and fixes num special-casing operators
...
Fixes: https://github.com/dart-lang/sdk/issues/61056
Change-Id: I28dab2908a9a2f384190a4705dd7383aec86860c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-08-06 13:42:02 -07:00
Danny Tuppeny
784fdb4a1f
[analysis_server] Move EOL from ChangeBuilder to FileEditBuilder
...
Because ChangeBuilder can be used to modify multiple files, the EOL should come from an individual files edit builder and not from the overall ChangeBuilder.
This change renames `eol` on ChangeBuilder to `defaultEol` (since it's still useful to supply a custom default, for example when moving a class from an existing file to a new file, we want to default to the same EOL as the source file), and adds an EOL to file edit builders which is computed from the file content (and falls back to the default from ChangeBuilder if there are none).
My intention here is to not introduce any breaking changes (yet) so the ChangeBuilder constructor interface still has the "eol" named parameter (marked as deprecated) as well as the new `defaultEol` parameter.
I added a new `StringExtension` for `endOfLine` to both analyzer_plugin and analysis_server_plugin as we need this in both places (but I expect one of those projects will ultimately be dropped). This slightly differs from `CorrectionUtils.endOfLine` because it can return `null` which is a signal to fall back to the ChangeBuilder default instead of forcing its own default. (CorrectionUtils.endOfLine now uses that extension, although because of the null/default, it's likely that some - if not all - uses of this should migrate to the new extension and fall back to a default from a ChangeBuilder).
Change-Id: Ie2e6eaba78c96a1cbd79eba881e12bbeef724aa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-08-04 14:56:40 -07:00
Fedor Shcheglov
f47cc4487b
Remove Xyz2 suffix getters from /analysis
...
Change-Id: I10221b86f63ee8a2d74938ef0438945b43e11f6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441990
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-07-24 05:54:30 -07:00
FMorschel
2419e97604
[DAS] Fixes create method, create getter and create mixin fixes
...
Fixes: https://github.com/dart-lang/sdk/issues/60826
Change-Id: I16cb1db16bcb8d7e57cb92723f058302f347e40e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-07-08 09:14:41 -07:00
Konstantin Shcheglov
a1955aa8e7
Elements. Switch FunctionTypeImpl to typeParameters, remove typeFormals.
...
Change-Id: I6f190d53c6b13cab7d921b2bb895f1038c3f1cc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-07-02 07:24:41 -07:00
Fedor Shcheglov
318aeb322b
Deprecate DartType.element3, use element instead.
...
Change-Id: Idef9da09c565a05fa84869f7433df3c24c6fbb5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435521
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-06-24 07:23:11 -07:00
FMorschel
2175df077f
[DAS] Adds new create operator fix
...
Fixes: https://github.com/dart-lang/sdk/issues/60954
Change-Id: I933e45ddd950b798e87595f4de8a5cadabddf898
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435660
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-06-18 15:24:03 -07:00
Sam Rawlins
dadef9bfab
DAS: Rename CorrectionProducer.errorLength and errorOffset to diagnostic names
...
Change-Id: I7578da7f1be1f996474b22621885e45ab3e86428
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434100
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-06-11 11:06:31 -07:00
Sam Rawlins
c219974ecf
analyzer: Deprecate Diagnostic.errorCode in favor of diagnosticCode
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: I2c7d64a81bc214e64fbc3ac95cf1fe2363a6ebd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433242
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2025-06-09 09:22:22 -07:00
Brian Wilkerson
b5e12ecaff
Replace use of NodeLocator2 in CorrectionProducer
...
This is the last use of NodeLocator2 outside of the analyzer package
itself that I'm aware of (at least in our code base).
Change-Id: I57ba74571d60e820c60e2ca3d8d17e9374597073
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431440
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-05-27 21:03:43 -07:00
Sam Rawlins
f16cd980ce
DAS: Deprecate CorrectionProducer.inheritanceManager
...
Change-Id: Id1772d47617a98ffc15d700a9bd7de58a04d745e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430020
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-21 14:42:21 -07:00
Brian Wilkerson
5d6dc673dc
Make nodeCovering a method on CompilationUnitImpl rather than an extension method
...
This allows us to traverse the children without needing to create lists.
It also allows us to iterate over lists of nodes more efficiently.
Tested against the script that computes fixes for 10,000 diagnostics,
I'm seeing the following result.
Before this CL the average time was 10692.4 ms.
After this CL the average time was 1900.0 ms.
That's just over an 82% improvement.
Change-Id: Ideff745288c8990e9948b22c5204d176af3cac6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426904
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-05-07 09:05:52 -07:00
Jens Johansen
a01d47d5e2
[analyzer] Cache/reuse CorrectionUtils
...
For `lsp_many_prefer_single_quotes_violations_benchmark.dart --sizes=3200`:
Before:
Initial analysis: 0.119093
First code action call: 2.632948
Subsequent action call 1: 2.176926
Subsequent action call 2: 2.316560
Select all code action call: 8.269120
Now:
Initial analysis: 0.105622
First code action call: 2.629498
Subsequent action call 1: 2.240760
Subsequent action call 2: 2.354467
Select all code action call: 6.873468
Change-Id: Ic967e54592d96057e20a8d70355e47d5232653a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426180
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-05-06 23:14:28 -07:00
FMorschel
dbd0be6b7e
[DAS] Fixes Create getter and Create mixin quick-fixes trigger
...
Fixes: https://github.com/dart-lang/sdk/issues/60613
Change-Id: Ie8661ae57f4fb3d8e9702fb67fc900530ba10632
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424560
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-04-29 11:31:19 -07:00
Konstantin Shcheglov
b2fdd8a345
Elements. Rename XyzElement2 into XyzElement.
...
The CL was done with rename + adding typedef for each class.
Change-Id: Ia25cc581d2e42cf7d12a85a3579af952d5c232ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424687
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-04-25 13:27:18 -07:00
Konstantin Shcheglov
49599e06cc
Elements. Deprecated element2.dart library.
...
Change-Id: I2be38df49e6f242d9fe59f34164549da4a0f41b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424683
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-04-25 11:23:18 -07:00
FMorschel
ae6bdae111
[DAS] Fixes create method for enums and extension types
...
Fixes: https://github.com/dart-lang/sdk/issues/60562
Change-Id: I8bbc92205f5900c025e9dc31110f3e1cb2343643
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423240
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-04-18 16:52:11 -07:00
Sam Rawlins
91e682940c
analyzer: Move coveringNode to public API
...
NodeLocator and NodeLocator2 are being deprecated in favor of this
extension method. We move it to the public API here and start using it
in the analysis_server_plugin package.
Change-Id: I4783bb1f511b798e52b3383dd600b154dccc6d5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-04-17 09:41:40 -07:00
Sam Rawlins
6838dabc15
DAS: make add_null_check fixKind final
...
A few statements around the package read:
> Producers used in bulk fixes must not modify the FixKind during
> computation.
In fact, this `add_null_check` correction producer seems to be the
_only_ remaining producer that violates this statement. In order to
fix it, such that `fixKind` is set during constructor initialization,
we must do some poking around the AST.
So we convert `_computeTarget` to be static (and change it to also
compute and return any possible null-aware token, renaming it to
`_computeTargetAndNullAwareToken`). We also convert `_isNullAware` to
be static. Then the two public constructors are converted into
factory constructors that determine the fix kind, and store the
`_target` and `_nullAwareToken` in fields, so as to avoid re-computing
them during `compute()`.
Change-Id: Ic66319ef764dd9bd69f0e1059347acf174debb25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-04-03 23:51:44 -07:00
Sam Rawlins
6253555a2c
DAS: Only yield libraries that provide an extension member with a given name
...
The `DartFixContext.librariesWithExtensions` utility function accepts
a `memberName` parameter but never did anything with it. This change
adds filtering in that function based on the member name.
This code depends on the set of exported extensions, which is provided
in an extension (`LibraryElementExtensions.exportedExtensions`) in the
analysis_server package, which must be moved to the analyzer package.
Change-Id: I06c8a9a0e11ceb70e75517b30c0b048321d6b024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418641
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-04-02 08:06:25 -07:00
FMorschel
90c0aa6aaa
[DAS] Fixes create method/function return type
...
Fixes: https://github.com/dart-lang/sdk/issues/60306
Change-Id: Iba6222bbb5d0b63ca94920cad6d6abfd571ed830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417780
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-03-25 15:30:23 -07:00
Sam Rawlins
ffd08a344b
DAS: Do not repeatedly compute a null value for coveringNode
...
The field may be set to `null`, so it's nullity is not a signal of whether it needs to be computed.
Change-Id: If19eb1f77ad601e744e41bde45a30d393ab8726f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417327
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-03-25 13:57:39 -07:00
Konstantin Shcheglov
b3ca203e8f
Elements. Start deprecating V1 elements.
...
This updates `analyzer_use_new_elements` lint to stop reporting inside
deprecated declarations. So, we can deprecated and prepare for removal.
Apply deprecation dart/analysis/results.dart
Deprecate `ElementDeclarationResult`, add `FragmentDeclarationResult` instead.
Change `getFragmentDeclaration` (not yet published) return type to `FragmentDeclarationResult` to better correspond to the method name.
Rename `getElementDeclaration` from `AnalysisSessionHelper` to
`getFragmentDeclaration`, to better reflect on what it operates.
Change-Id: I2839c9a7e21ed2e5b34035fc8c3ec88fd23df1b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-02-28 08:19:21 -08:00
Brian Wilkerson
a59bae3f37
Cleanup code in analysis_server_plugin
...
Change-Id: I596a5a516136b4bd024b8f72b11df6eb641075ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412680
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-02-27 11:44:14 -08:00
Konstantin Shcheglov
2ad1b56534
Elements. Use TypeImpl in more places.
...
Change-Id: I68fd3ca29f4059d9772233978da9391245097207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412000
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-02-25 09:56:20 -08:00
Jake Macdonald
f4cfbf9cdc
Update create function fix to create an async function for await expressions
...
Bug: https://github.com/dart-lang/sdk/issues/59990
Change-Id: I9e89089ca5c60bea190060bc0c8e869c7e78e32e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408361
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Jake Macdonald <jakemac@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-02-06 14:25:39 -08:00
Sam Rawlins
f5d01eb734
DAS plugins: Remove direct dependency on _fe_analyzer_shared
...
Change-Id: If498173f3d37ab6798a1e05070274c197948ab0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406687
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-01-31 09:27:59 -08:00
pq
876752e40f
[CQ] add feature isEnabled utility
...
Change-Id: I267aee8da50ec073a28bdb22ebe5379d31b1dc91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403265
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-01-07 13:18:28 -08:00
Brian Wilkerson
7041cda56d
[Migrate] CorrectionProducer
...
Change-Id: Ia8fba6d745d04cef88d1beb7e6da7ed15d23fcb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402588
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-01-03 09:50:10 -08:00
pq
8a08c1bc56
[element model] migrate session_helper API
...
Change-Id: Ia2717bb24c83a409e853fb5271a3d5ed91cd3306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-12-20 13:56:49 -08:00
Konstantin Shcheglov
af2527723b
Elements. Migrate lib/src/cider/fixes.dart
...
Change-Id: I01867f48ac6d39c65a9a21961079232399e05c1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399029
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-12-06 23:59:55 +00:00
Konstantin Shcheglov
7e1721dfab
Elements. Migrate ImportLibrary.
...
Change-Id: I127e0f0b31e6b0d05727ae518b54971287e37008
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398950
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-12-05 05:04:08 +00:00
Konstantin Shcheglov
6f992aea0d
Elements. Migrate lib/src/utilities/extensions/element.dart
...
Change-Id: Ibcf9d2449411413210e1d363ced4acdcfeede8d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398948
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-12-04 23:19:17 +00:00
FMorschel
6dac184012
Adds library result
...
R=scheglov@google.com
Fixes https://github.com/dart-lang/sdk/issues/57092
Change-Id: I125c53e138c97e57fc22d69b2362351ddcbb6b4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395420
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com >
2024-11-19 15:50:42 +00:00
Brian Wilkerson
15cdbc5eab
Migrate five correction producers
...
Change-Id: I3289e0862797947fadf76d78a2ce27c0cf249dd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394321
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-11-08 21:08:18 +00:00
Sam Rawlins
97871aeab5
analyzer: Use less AnalysisOptionsImpl
...
In many cases, AnalysisOptions is sufficient.
* ResolvedCorrectionProducer will be public API for someone writing an
analyzer plugin; it should not expose an AnalysisOptionsImpl. Luckily
the only need for the Impl, today, is in the "ignore diagnostic" fixes
so we can cast in there. (We could also expose the `file` and the
`unignorableNames` fields.)
* Some other spots only cast in order to access one of the 'strict'
fields, but all of those have been made public.
* AnalysisOptionsImpl.enabledLegacyPluginNames can be made final.
* Many other users don't need AnalysisOptionsImpl, or only need it to
pass it to other code that _does_ need it. In many of those cases it
makes sense to look at an object as an AnalysisOptions, and let the
code that needs a field from Impl to do a cast.
Change-Id: I3640934fb9d93c9b95f15a22457af604e420c7a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-10-29 14:22:58 +00:00
Sam Rawlins
bc58f69e53
analyzer: Move AnalysisOptionsImpl out of the generated directory
...
None of the code in AnalysisOptionsImpl or AnalysisOptionsBuilder is
changed.
Change-Id: I0d3253d80fdcd624c73720c35ece9d23a2582071
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392180
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2024-10-28 21:03:33 +00:00