This prevents an issue where typing during completion can cause completion requests to completely fail (returning 0 items) just because snippets couldn't
be computed.
Change-Id: I20fb457a700ec12317d0146b3364e6f1a4f96177
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256214
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Unfortunately my idea about checking for specific `DartType` subtype,
and only then asking for the element is too punitive. It almost
works in google3, but the amount and the kind of changes I had to
do make me realize that we should keep `get elementX` in `DartType`.
I guess this is the same as we had in AST when `get constructors`
does not make sense for mixins (?), but works for classes and enums,
and it is easier to pull it into the superclass.
Change-Id: Ibc4fac0b95d63748fa65de96d29300f477fdfc76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The command name is a bit unfortunate in that it isn't very readable for
debugging purposes, but it has the advantage that there isn't any
opportunity for it to get out of sync. That might be the wrong thing to
optimize for. Let me know what you think.
Change-Id: Iec5c2ad9703f51c7702d4d5094f0548b48fbaafd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254321
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
* Move many identifiers from snake_case or SCREAMING_SNAKE_CASE to
camelCase. I think I restricted the changes to private API.
* Add an ignore in generated files for constant_identifier_names;
we often just mirror names found in YAML files or whatever, where
things are not necessarily named according to Effective Dart
standards.
* Avoid some implementation imports which I think were accidental.
* Use single quotes in some more places.
Bug: https://github.com/dart-lang/sdk/issues/48784
Change-Id: I439fe50cb9f8f8f5e9c74ce594aea15e394ee7da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
No changes to implementation yet, we still look for both Blaze and Bazel.
Bug: https://github.com/dart-lang/sdk/issues/49629
Change-Id: Iaf1b1cc2c9a8cf28d8bbfb5541819a1f5c8a3de6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254343
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This is necessary to separate `ClassElement`, `EnumElement`, and `MixinElement`. And, in the future, augmentations like `ClassAugmentationElement`, etc.
Change-Id: Iecd2f8707212e53ef56f0e101880c7bab9e5d057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254104
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This reflects the recent change to the implementation classes.
Change-Id: I0867a274c830d34f46c858713f0df511b7b811c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254066
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This is in preparation for adding new documentation.
Change-Id: Icf77b898d3e0b2c6ae0c71419e70ecd6248c86e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254002
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Always use NotImportedContributor.
Change-Id: I3ed518f2d84d10600a5ea27bc88282762573ef2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253784
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Existing tests like `test_fileSystem_changeFile_hasOverlay_removeOverlay` verify that removing the overlay correctly re-reads content from disk.
Change-Id: I05660acfe81e35fd4b247d8c7b901903bb67f728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This is very incomplete at this point, but any feedback, including
feedback about the overall design, is very welcome. I added a
placeholder for a refactoring so that I could see what the design
implies in terms of the difficulty of adding a refactoring.
I expect that specific details will change a fair bit as we start to
write some concrete refactorings, so I'm more interested in problems
with the overall design, but any comments are, of course, welcome.
Change-Id: Id80741b60542bee31fd48a0655ef8650192b58a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253604
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
For `InterfaceType` keep `element2` deprecated and define
`InterfaceElement get element2` instead. Most changes are because
of this.
Change-Id: I13b888610fc707438c3c97b676f1460e7fc2b040
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253564
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
There were no changes other than to move the files and update the imports
to match.
Change-Id: I0790d9bf7287d62756ad7534b760689489706d40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253602
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This reverts commit da31cab154.
Reason for revert: I agree to some extent that this method can be useful.
Original change's description:
> Deprecate ClassElement.isValidMixin
>
> Change-Id: I0cc8245b20e2cbe3c201263207f8570a46d6ab15
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253026
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
TBR=scheglov@google.com,brianwilkerson@google.com,srawlins@google.com
Change-Id: Ibee8b6260ff8268f9e9f2f05b54c8256febb19d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Moves multiple classes into their own files. Renames several classes and
the associated test classes. Moves a few of those classes (files) into
the parent directory. Converts snippets to use constructor tear-offs
rather than static method tear-offs.
Change-Id: If1aae3cc468d20ef056e650c0206fcfbf3c94f62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253004
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
* I manually edited the counts. They seemed to have drifted...
* I flipped 4 diagnostics to "noFix" with notes.
* I flipped 9 diagnostics to "needsFix" with notes.
I didn't use a _lot_ of rhyme or reason, or even method to my madness;
I more or less gut-checked each of these.
I also didn't have a lot of rhyme or reason to the ones I picked except
they are alphabetically near each other.
This is sort of an experiment in spending 10 minutes "evaluating"
possible fixes, to get down the huge "needsEvaluation" count.
Change-Id: I32c9f86058c54b97e68f5e9182e3ff827ec4eb48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Part of #49514
Change-Id: Ie74a149b998a5901c6f1ad2a389403165167aa83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252582
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Closes https://github.com/dart-lang/sdk/pull/49478
TEST=Manual
GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
May prevent https://github.com/dart-lang/sdk/issues/48051 from occurring since we will no longer call driver.changeFile() for SDK libraries being opened, although it does not resolve the underlying issue.
Change-Id: I5ca53a04842348a584ccc824aaf90ba7f230c002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251980
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This should be a no-op and existing tests pass. This is a step towards extracting code that computes a range for removing/sorting directives that could be used elsewhere such as the RemoveUnusedImport() fix.
Change-Id: Ib43b57bb1e34b817cb3771b60c65ad9ba2fe2919
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
We need this for:
1. CompilationUnitElement changes its enclosing element from LibraryElement to LibraryOrAugmentationElement
2. Similarly PrefixElement.
Change-Id: I5e3719b4ef59d03caab1b20c9172a8c0fd786bdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251900
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Part of #47540
Change-Id: Iff1e81a2809ce045dc6dfb9b9567ad934400308e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251761
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This introduces a race where if the function throws before `expect(throwsA)` adds a handler, it becomes an unhandled exception.
Fixes https://github.com/dart-lang/sdk/issues/49455.
Change-Id: I81205f272c9ec211b99bf73af64dab8e4d774e84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251550
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The DetachableFileSystemManager API also changes slightly with this change resolving a TODO.
Change-Id: I388b352c987e6c96f95fcabd9a532cbfcfa39e4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Part of #49365
Change-Id: Icf4ef0fb89cbc514587b39bbe10a4d394290499a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This was copied from quick fixes and then modified, so please also look
for places that I missed updating the text.
Change-Id: Ib67865232e9af2194999553a8007911f1e691fae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251140
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Remove them from tests.
(They should have been removed from tests before launcing 2.17.)
Change-Id: I546f6cb90fdf9e6ed1bb560f3715f9db163b7c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250384
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
This page is currently disabled, and will likely remain that way until
we allow analytics to be enabled.
Change-Id: I834d3b3eba4f8b690524d7f0955a2bc55418a327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
I wanted to be able to plug in different kinds of analytics reporters,
and that's still a goal, but with the desire to make it possible for
users to see what data we are collecting I needed to change the level
at which reporters are plugged in.
This CL doesn't change the behavior of the code, but it does split the
classes out into separate files and collapse the AnalyticsManager class
and its subclasses into a single class, requiring that different
reporters be implemented by implementing the Analytics class instead.
Change-Id: Ia98ff225f97ae747d89c61fe98f520ce0b5e9961
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249943
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
We don't need to go so low.
Change-Id: Ifbb02e60038c545bc43ebb4f7a344f1fde014fc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249941
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Part of #49317
Change-Id: I616ca93bb5061ded835b4dc0938446a402fd76e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249584
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
It found a few cases for `BytesBuilder` exported from `dart:io`.
I fixed most of them in a separate CL.
But package:flutter (itself only) is clean.
There are a few violations in google3.
I will ignore most of them, and fix a few.
Bug: https://github.com/dart-lang/sdk/issues/23067
Change-Id: Ic89370ad84caa60fd49326c2bc60ad5d927e2264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248343
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
+ fix an issue with constructor declarations not returning any matches at all for LSP which provides an offset.
Fixes https://github.com/Dart-Code/Dart-Code/issues/4020.
Change-Id: Id59c83e32630c4ab947e3c3062b55989c78d1c61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248581
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Many params/result types are defined as unions without names in the spec. This gives them names so the handlers will be able to use names instead of the full EitherX<Y> type.
Change-Id: I3f96b48e5e70c86814724edc3fec4fc7f76534de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248801
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
+ improve the use of LSPAny/LSPObject where
LSPAny = anything, including null or undefined
LSPObject = any object (equiv of non-null Map<String, Object?>)
Change-Id: I335b299aad8e58b1cb4ee33cf27dc0dd887ec916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248781
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The new JSON model doesn't have/support type args (the original Markdown/TS spec had one instance where the type arg added no value) so this cleans up the code slightly.
Change-Id: I773d2acb38f95d78d2d5f73e1c9bd39468fbcad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248585
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Fixes#49241
TEST=ci
Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Not providing textEdit means that the client will use insertText and compute its own range for what needs to be replaced. This may be incorrect if the name includes symbols that VS Code doesn't realise are part of the identifier.
To fix this, we should _always_ supply the range. This will result in a slightly larger payload, although an upcoming change to use itemDefaults will remove that for supporting clients.
Fixes https://github.com/Dart-Code/Dart-Code/issues/3943.
Change-Id: Ifd3f38ef96fecc6c745e00f511eb0bdbbd0d4a82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248143
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Let me know if there are other parameters that we should collect
information about. I thought about open/close, to correspond to the
number of priority files tracked for the legacy protocol, but I thought
it would be too noisy. Happy to discuss if you think otherwise.
Change-Id: Id1b8bc043052570c706dc19ea31c33c2b19177ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit 3b111d5e0d.
Reason for revert: Wrong design, will rework.
Original change's description:
> Add AnalysisDriver.contextRoot, deprecate configure().
>
> In the future AnalysisDriver.analysisContext will be removed, and
> AnalysisDriver will implement AnalysisContext. At the same time we
> will remove DriverBasedAnalysisContext.
>
> Google3 looks green.
> https://fusion2.corp.google.com/presubmit/tap/453818030
>
> Change-Id: Iaa6bf85e27c3be5d0ecb40126d6b857fe6f2aa64
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247626
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
TBR=scheglov@google.com,brianwilkerson@google.com,srawlins@google.com
Change-Id: I2eb567c6343636d3affd48bb4bfb0b4b1aa788b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247861
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
C compilers don't enforce nesting rules. `dart:ffi` was enforcing these
rules causing issues for binding to C libraries having looser packing
for nested structs than outer structs.
This CL completely removes the error from the analyzer and CFE.
(As an alternative we could have kept a hint/lint, but this might create
more noise than value.)
TEST=pkg/analyzer/test/src/diagnostics/packed_nesting_non_packed_test.dart
Closes: https://github.com/dart-lang/sdk/issues/46644
Change-Id: Iae2d5c885546f7799bc6dea2f8cd7dd508216a0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247382
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
In the future AnalysisDriver.analysisContext will be removed, and
AnalysisDriver will implement AnalysisContext. At the same time we
will remove DriverBasedAnalysisContext.
Google3 looks green.
https://fusion2.corp.google.com/presubmit/tap/453818030
Change-Id: Iaa6bf85e27c3be5d0ecb40126d6b857fe6f2aa64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247626
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This repurposes an existing lint CorrectionProducer to handle both
the lint and the hint.
Bug: https://github.com/dart-lang/sdk/issues/49074
Change-Id: Iacd597ca2151cdb80be9ddae0847128b4cc700a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246989
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
This setting is already supported in VS Code but accidentally stopped working in the switch to LSP. This change prevents/removes the registration for willRenameFiles so that a client won't call the server when files are renamed if this setting is `false`.
Change-Id: Ia7b22b9fc2f119d0e7f98f4e2c5f0bac994a28af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247544
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Previously, Organise Imports always failed silently (since it was often run on-save). Sort Members had not been given the same treatment (but often now runs on-save).
This uses a new LSP 3.17 field to know when the command was run automatically, so both are now consistent, showing errors if invoked manually and failing silently if run automatically.
Change-Id: I48e8380fcee4e54d0f4dc3c177c9ae2362627efb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247542
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Renaming a folder with files that referenced each other would fail with edit conflicts. The pass over the first file would update the reference to the other (going from "a.dart" to "../old/a.dart" as if the other file wasn't moving too) and then then when processing the second file, it would try to update the import back.
It doesn't seem to ever make sense to update relative paths when the "other" file is also in the folder being renamed, so this skips them.
Change-Id: I14c09977aa66017eecac5922d0e3caacf59350fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Following up on #49164 this PR allows rename in extensions via `dart fix`
Closes https://github.com/dart-lang/sdk/pull/49200
GitOrigin-RevId: a5af8d05f4d9bf849e8115cc780b17bce18d0d50
Change-Id: I845848901768ff48746a0438b009f631c5d03a7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247460
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This makes it easier to extend commands in future (for example adding additional args to indicate if the command execution was automatic on-save or manually invoked, to adjust error handling).
Change-Id: I274f28109ebc0d93ed555525b4c8d1ee689b2af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247385
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Let me know if there are other values you can think of related to
requests that ought to be captured, especially in LSP.
Change-Id: Id9e92f54dd9ade3541d3ca8dc11450fb6affee0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247328
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>