Commit Graph

43 Commits

Author SHA1 Message Date
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
Sam Rawlins bddcddfe6b analysis_server: use new Diagnostic name over AnalysisError
Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: I5cc0cc66afd3531271eb8dc337556505cb21c074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-06-06 16:00:25 -07:00
Sam Rawlins 903d77cc82 analyzer: Rename ErrorListener classes to DiagnosticListener
Work towards https://github.com/dart-lang/sdk/issues/60635

I tried to keep this minimal but still sensible:

* Rename AnalysisErrorListener and all subtypes to use 'Diagnostic'.
* Rename all instantiations of such classes if they previously
  contained the word 'error'.
* Rename `RecordingDiagnosticListener.errors` to `.diagnostics`.
* Rename some _testing_ instance members that had the word 'error'
  to instead use 'diagnostic'.

Change-Id: I3948e27ba28ac2494092e04f4e1d201a20cc1135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433004
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-06-05 14:05:40 -07:00
Danny Tuppeny 8d36178a43 [analysis_server] Move support for locking requests to the scheduler
This removes the original `lockRequestsWhile` functionality of the LSP server which worked by pausing reading from stdin to instead pause the processing of messages in the scheduler.

Change-Id: I737e977adee11fe6fc70f44185cfaa22c22805da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-06-04 15:06:12 -07:00
Sam Rawlins 2dc94ee84a analyzer: Rename DiagnosticCode.errorSeverity to DiagnosticCode.severity
Change-Id: I244a96a940f82902a20e817fd13fe32026607ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-22 17:25:01 -07:00
Danny Tuppeny 49e7d4ac83 [analysis_server] Support "Fix" CodeActions via commands if client doesn't support CodeActionLiterals
This updates fixes to return either CodeActionLiterals or Commands based on the capabilities of the client (similar to was done previously for assists).

Change-Id: I688cb80aef415d329d65092edba247e5ec7a5a13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428783
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-05-15 10:54:48 -07:00
Danny Tuppeny 4b4e3f4964 [analysis_server] Update CodeActionsProducers to support either kind of CodeAction
No functional changes, just some additional refactors extracted from an upcoming CL to make it easier to review. This updates the `CodeActionProducer`s (and related code in `CodeActionComputer`) so their signatures use `CodeAction` instead of `CodeActionLiteral`, which means this code will be able to support `Command` code actions in future.

Mostly it's trivial changes, but the code that de-dupes and merges actions needed a little more updating to handle the different kinds.

Change-Id: Ic2255b2d9864b6974a542d1d3ee3b099c4d5ea32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427222
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-07 08:41:25 -07:00
Danny Tuppeny 3c161d3fd1 [analysis_server] Move CodeActionKind filter earlier in production of code actions
This removes a filter of CodeActionKinds from the final step (and a class named `_CodeActionSorter`!) and instead applies it earlier during building of the actions. This will help apply the filter in the case where we return bare Commands (which don't have `kind`s) instead of `CodeActionLiteral`s.

I added some TODOs because I still don't think this is filtering early enough (because in the case of invoking an action via the command, we need to not have to produce _all_ code actions just to locate the _one_ we want to execute), but it's a step closer (and easier to review this without it being lumped in with the CL that supports returning Commands).

Change-Id: Ibc73c4900d939ac833f6345e9e8f1fdf3f5d6823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427000
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-05-06 11:03:33 -07:00
Sam Rawlins 9ab2139df5 analyzer: Deprecate ErrorSeverity in favor of DiagnosticSeverity
Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: Ic7f84584d4185e1ab7e8741052ec6694487c8c08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-05-05 13:58:32 -07:00
Sam Rawlins eb03a1673d DAS: Use Diagnostic in place of deprecated AnalysisError
Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: I0107a65580bc41d769c2a384319225b256df2fbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-05-05 09:35:18 -07:00
Danny Tuppeny 4f3a672b00 [analysis_server] Add a CodeAction typedef for CodeActionLiteral | Command
Following on from a previous change to use the term `CodeAction` (an item returned from a `textDocument/codeAction` request) to mean either a `CodeActionLiteral` (which contains inline edits and/or a command) or a base `Command`, this adds a typedef describing the same and updates all code that used `Either2<CodeActionLiteral, Command>` to instead use the typedef.

It also renames a few additional methods/functions to be more consistent with these terms and adds a `CodeActionExtension` to simplify extracting fields like `command` and `title` from either kind of code action.

Change-Id: Iad5f77ef21229fc5c9738527f98ccf7202f83bd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425863
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-05-01 11:12:17 -07:00
Sam Rawlins 3a9f4331dd analysis_server: Use new DiagnosticCode name
Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: I76c3f7b3ed890b808f3831f2b7776bd1988a223d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425407
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-30 09:29:50 -07:00
Brian Wilkerson d85ab6df0c Refactor the MessageSchedulerTestView for more flexibility
There are no functional changes, just changes to the way the logging
functionality is implemented. The motivation for the changes is to
allow future CLs to explore ways of changing the expectations so that
async handling of messages won't produce flaky tests.

All references to the 'messageLog' outside the class have been replaced
by higher-level methods with a semantic meaning.

The class has been split into an interface and an implementation, which
allows the test-specific aspects to be in the `test` directory.

Some additional code cleanup was also done.

Change-Id: Ie515f71153a96fb6e92eb8e2eb05f4b5e064bbd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421965
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-04-10 16:18:39 -07:00
Sam Rawlins fbf331e0dd DAS: reformat source code with tall-style
Change-Id: I42b4a44fd6a2197e499e8623274b3cd1a4b5556f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394003
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 23:04:00 +00:00
Konstantin Shcheglov 57392e8324 CQ. Put TreeStringSink into analyzer_utilities/ to reuse.
Change-Id: I7a1a3e6bc42830b842060fd778a6265ed614f9f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-07-30 20:32:24 +00:00
Konstantin Shcheglov 017bed7b9a CQ. Enable unnecessary_final in analysis_server/
Change-Id: Ieb62a1c774a5e8f5a22deaa8e8e5fff6f9f849dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-16 21:20:28 +00:00
Konstantin Shcheglov 5c07c89a35 Enable 'unnecessary_final' in analysis_server/.
Change-Id: I71ee934b915d4aff924cf5925f87bcc9adc6c015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-04-16 20:04:15 +00:00
Danny Tuppeny 8e1751f4ce [analysis_server] Add LSP CodeLenses for "Go to Augmented" and "Go to Augmentation"
These are on by default but can be toggled in the client with the "dart.codeLens" setting, either by disabling entirely:

```
"dart.codeLens": false
```

Or individually

```
"dart.codeLens": {
  "augmented": false,
  "augmentation": false,
}
```

They require a client-provided command to handle the navigation, so this also adds a "commands" section to the client capabilities (in "experimental", because that's the extension point for non-standard LSP) that allows the client to inform the server that it handles such a command (which is documented in the readme and implemented in Dart-Code in https://github.com/Dart-Code/Dart-Code/commit/ebe029c3f9aca724d386b3da10f414f624bc705a).

Change-Id: I91791c9f4aa5957c4ab4b9c0c5bb4fcf8ebeb717
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359640
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-03-25 22:32:24 +00:00
Konstantin Shcheglov 60e8519402 Rewrite test_fileSystem_changeFile_buildFile_legacy
Change-Id: Idb764aa7b2aa36a9191e10d68cb6a2351f986d46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339343
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-01 23:27:30 +00:00
Sam Rawlins 73ab31b98a analyzer: Move the Source class to be public API.
Deprecate accessing LineInfo, Source, or SourceRange via the
old library (pkg/analyzer/lib/src/generated/source.dart).
Migrate all SDK code to the new library.

Fixes https://github.com/dart-lang/sdk/issues/46420

Change-Id: Ic7c98a5820415c92a457f9fa2756351b05520cd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-11-14 17:10:37 +00:00
Danny Tuppeny 17f3a6ec30 [analysis_server] Convert more LSP handlers to work over the legacy protocol
Change-Id: I9bd1f3ffd9bcdb017a4208e4aedcfb7436259fc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-07 15:27:46 +00:00
pq 05965ef720 + fix dangling library comments
Change-Id: Ia857fec46ddf83d307cd19450cea88aab8c86a38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294430
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-04-11 20:17:38 +00:00
Danny Tuppeny 1b38b7bb7b [analysis_server] Move TestCode from analysis_server to analyzer
Change-Id: I81333240d7693b66416ce6bb308f980b264a2238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264920
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 19:58:47 +00:00
Danny Tuppeny eea14037e0 [analysis_server] Add support for range marker shorthand in TestCode
Change-Id: I70efc2fd32de128351aa9fd8c10555dbd1391da4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 18:13:57 +00:00
Danny Tuppeny 5b1ca7eef1 [analysis_server] Remove string_scanner dependency from TestCode
Change-Id: Ia31efb8b5fede64d91ed1669219d11014afe25c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 16:28:25 +00:00
Brian Wilkerson c42ab25787 Refactor TestCode to prepare to move it to analyzer
This is the first phase of preparing it to be moved. The plan is for the
extensions to remain in this library along with an export of the new
library in the analyzer package.

The second phase will be to rewrite it to not use string_scanner so that
we don't have to add a dependency to the analyzer package.

Change-Id: I0d4e9c47bdcb7b825a9d3bfc76331a4e575ac664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263443
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-10-18 18:31:53 +00:00
Konstantin Shcheglov dd63e54e2c Remove fluent check().
Change-Id: I6f41efb2432ebd4a6a03638d5db0937f20386200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261440
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 19:15:55 +00:00
Danny Tuppeny 64a2e5c114 [analysis_server] Add a new mechanism for marking up test code with regions/positions
Change-Id: I45ca24d2360f7201a563145a19c5291f83b9465c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259424
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-22 16:33:18 +00:00
Konstantin Shcheglov aaeb9e7acf Use check() and extensions for SourceChange/SourceFileEdit.
Change-Id: I7372fa152aa78fc6db01a11306a903e0ce38463e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219742
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-08 23:07:43 +00:00
Brian Wilkerson 1ad68b9b16 Make local variables that hide fields be final (analysis_server)
As per our earlier conversation, I looked for places where a local
variable was introduced to overcome field promotion and has the same
name as the field. Where possible I made them final; where not possible
I changed the name.

Change-Id: Iad3d2139693ca66f1eb22a3926c3b84a4115f13d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196552
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:12:07 +00:00
Paul Berry b10a592341 Add a url field to DiagnosticMessage.
This paves the way for allowing analyzer and analysis server clients
to format diagnostic message URLs in a special way (e.g. to make them
clickable).

Note that DiagnosticMessage is part of the public API of the analyzer,
so I've retained the old behavior in a deprecated fashion to avoid
breaking clients that don't yet handle diagnostic messages containing
URLs.

See
https://dart-review.googlesource.com/c/sdk/+/193749/comment/86d1ce4b_77a60b1e/
for additional discussion.

Change-Id: Iae9d43a2be7dbc67cb7cb82afe0a7824043d6113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196101
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-23 20:34:32 +00:00
Brian Wilkerson 0190d20bd6 Migrate some tests and test utilities in server
Change-Id: I0a37352c903bf7139af25aab255fe6a5331ce98b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-03 19:23:44 +00:00
Konstantin Shcheglov e97f1bdbf0 Switch analysis_server to language 2.12, so null safety, but opt-out files.
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.

Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 23:39:37 +00:00
Konstantin Shcheglov 9f986d2501 Migrate package:analyzer to null safety.
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-02-01 18:56:04 +00:00
Sam Rawlins 78956cb8d4 analysis_server: Remove unnecessary imports
https://github.com/dart-lang/sdk/issues/44569

Change-Id: I0b5d237f532ab99c112247e9f24392ef317575dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177222
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-30 04:39:25 +00:00
Konstantin Shcheglov 999321ede2 Extract TestInstrumentationService into a library, more tests.
R=brianwilkerson@google.com

Change-Id: I563304d4d278fa0755387122a7078b8f020c2d0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175862
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-11 19:49:29 +00:00
Sam Rawlins 69cb9f7a67 Analyzer: Remove legacy parser (replaced by Fasta).
* Replace most of the implementation of Parser with the implementation
  found in _Parser2, which uses Fasta.
* Rework Parser constructor to do exactly what the previous factory
  constructor + _Parser2 constructor did.
* Remove _Parser2 and ParserAdapter.
* Remove `useFasta` argument in several places.
* Delete tests in parser_test.dart which only used the legacy parser.
* Move ParserProxy from parser_fasta_test.dart to parser_test.dart
* Remove ~240 cases of dead code like `if (useFasta)` and `useFasta ?`
  in tests.

Change-Id: Iea29a10ff83103293902336490fbc9cd46cd20ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175560
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-10 23:47:48 +00:00
Paul Berry 596198fb74 Share logic of package_root.dart
This CL unifies the implementations of `package_root.dart` found in
packages `analysis_server`, `analysis_server_client`, `analyzer`, and
`analyzer_plugin`.

This should make it easier to re-use this logic in other packages,
such as `nnbd_migration`.

Change-Id: I0da44edb379b8e929dd0b1c16a6989c1e9418acb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-11 18:09:18 +00:00
Brian Wilkerson d0ac759927 Initial parser for the data-driven fixes data file
This is very incomplete, but allows us to read rename changes, which will
enable us to get a steel thread in place.

Change-Id: I3259f64bd6d3dc1fdc4894d2b08b5388e8652dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159642
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-21 19:11:30 +00:00
Brian Wilkerson 8969b1839c Enable omit_local_variable_types in analysis_server
Change-Id: I7e5c13d40fd276854601681fc84be321e6031b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 03:58:44 +00:00
Erik Ernst e3af7e724f Update usage of int/String fromEnvironment
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.

Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-24 11:19:14 +00:00
Brian Wilkerson 4043a6fce3 Remove unnecessary uses of new in analysis_server
Other than analysis_options.yaml, all of the changes were from running
dartfix.

Change-Id: I92411642f12a00fc6bd0bfd24dd60fe67f0fed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 19:01:51 +00:00
Jens Johansen 74e09abc6e [CFE] Remove/move file that wasn't needed by frontend; cleanup pubspec.yaml a bit
Change-Id: I204b844e7f1cb892a529bca3a13017ed836275f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114074
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-23 07:42:03 +00:00