When hitting a protocol error, I saw some errors that were confusing
for a moment because of the lack of quotes, for example:
> Invalid parameter 'params'. Expected to be files; found \"...
This CL doesn't actually improve the situation _much_, but it at least
puts quotes around `files`, to indicate it is a property or something
similar.
Change-Id: Ic12d063b427661025cd4418951c58abf3394df3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449220
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Due to variable shadowing and lazy initialization of the DevTools URI
within DDS, the DevTools URI reported by DDS did not include the `uri`
query parameter used to automatically establish connection to the
current DDS instance.
This change updates variable names to avoid shadowing and also fixes
issues where the DevTools URI would be reported even if DevTools was not
enabled in the DDS configuration.
Change-Id: I1ab0f5c58ee7e583e6eb4f4fb7381cddc29629b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Fix bugs that resulted in multiple `values` arrays being displayed for
an augmentation chain.
This is done by making `ListLiteralImpl.elements` mutable by setting
`isNodeListFinal: false` in the AST generator, and adding a
new`addElements` method.
Made sure Enum's `TypeParameterFragment`s were linked.
Rename `LibraryDirective.name2` to `name`.
Change-Id: If80668d011cec6df5e22bee37a310de980a4205f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Fine-grained manifests now capture more information about function and
constructor parameters so the analyzer can detect semantically relevant
changes.
What’s changed
- Record the default value of optional named and positional parameters as
a `ManifestNode`, and include it in matching/serialization logic.
- Track whether a parameter is an initializing formal (`this`) or a super
formal (`super`) and persist these flags in manifests.
- Add a `never_` entry to `ManifestAstElementKind` and collect
`NeverElementImpl` so const initializers that reference `Never` are
represented correctly.
- Enhance result printing to display `this`/`super` markers, default
values, and decode `Never` in element indices.
- Bump `AnalysisDriver.DATA_VERSION` to 552 to invalidate stale caches.
Why Previously, default parameter values and formal origin
(`this`/`super`) were not part of the manifest. Changing them could
leave linked data unchanged, producing stale analysis results. By
encoding these details (and handling `Never`), we ensure manifest
matching reflects the true API surface and triggers re-linking when
defaults or formal kinds change.
Change-Id: Icae8281f923879574fdc6143fd2c9d6018f4d48f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449363
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Instead of using the computed LocalVarDescriptors when the
frame is interpreted, use the LocalVariableInfo in the serialized
bytecode to find which Scope is currently active.
Add printing of local variable information to the bytecode
disassembler.
TEST=pkg/vm_service/test
Change-Id: I7bd15056e4e2a947ad16ffb83a50447c2ba59994
Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-mac-debug-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449340
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Removes the following hacks:
- The `allowNonExistent` parameter from `_loadCfeStyleMessages`.
- The `!file.existsSync()` check from `messages_suite.dart`.
These were temporary hacks to allow code generation (and presubmits,
respectively) to succeed during the transition period before
`pkg/_fe_analyzer_shared/messages.yaml` was introduced.
Now that `pkg/_fe_analyzer_shared/messages.yaml` is present, the hacks
are no longer needed.
Change-Id: I6a6a69642565a8278a94b61912308bfdcbd04d50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448661
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Moves all the diagnostics that are shared between the analyzer and the
CFE from `pkg/front_end/messages.yaml` to
`pkg/_fe_analyzer_shared/messages.yaml`.
This CL was generated by the following steps:
- Run the `move_shared_diagnostics.dart` script introduced in
https://dart-review.googlesource.com/c/sdk/+/448606.
- Manually modify `pkg/front_end/messages.status` to reflect the
diagnostics that have been moved.
Change-Id: I6a6a6964d618089f8fe8d447b4344800bad5d532
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Adds a new file, `move_shared_diagnostics.dart`, which moves entries
from `pkg/front_end/messages.yaml` to a new
`pkg/_fe_analyzer_shared/messages.yaml` files.
Only messages that are actually shared (those with an `index` parameter) are
moved.
This script is in its own CL for easier code review. In a follow-up CL
I will run the script, which will produce several thousand lines of
diffs.
Change-Id: I6a6a6964793135f54e7e2921643e7b8e4451e801
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448606
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Updates the code in `pkg/analyzer_utilities/lib/messages.dart` to
attempt to read CFE messages from both
`pkg/_fe_analyzer_shared/messages.yaml` and
`pkg/front_end/messages.yaml`, and updates clients accordingly.
Also updates the `messages_suite.dart` test and the presubmit rules to
ensure that the contents of `pkg/_fe_analyzer_shared/messages.yaml`
will be appropriately tested.
Since the file `pkg/_fe_analyzer_shared/messages.yaml` doesn't exist
yet, temporaryhacks have been added to pretend the file is empty if it
can't be found.
In a follow-up CL, I will move messages that are shared between the
analyzer and the CFE to `pkg/_fe_analyzer_shared/messages.yaml`.
Change-Id: I6a6a6964c1c02f20df9ae8e34f23e734bbe88c22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448605
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Since any instruction is a possible pause point when single stepping in
the interpreter, the debugger may pause too early when stepping over an
expression; for example, if the value returned from an expression is
ignored, stepping over the expression should also step over the
following Drop1 instruction (which will have the same source location),
but currently does not.
To avoid this, set last_stepping_fp_ and last_stepping_pos_ when
stepping over either a sync or async expression so that the debugger
won't pause until a new source position is reached.
TEST=pkg/vm_service/test
Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I0934f6bda3fc075a225a85b66eccf46b94cb4020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449420
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This removes the InferenceHelper interface which was implemented by the BodyBuilder and moves functions to the CheckHelper extension.
This is a step towards separating BodyBuilder from inference.
Change-Id: I98f441c5cfb510e39618d2023d724be6bb26ca87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449320
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
The "plugins" can specify "dependency_overrides", e.g. with a path to
make it work in the sdk.
Currently (before this CL) a relative path is just copied verbatim
though (into something like $HOME/.dartServer/.plugin_manager/...) and
thus doesn't work.
This CL parses it the same way as the plugin are otherwise parsed and
makes the path absolute (again like the plugins are otherwise done).
Change-Id: Ia3e450126ef5bfa3bd0a8b1b31aded954252da46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449281
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>