Commit Graph

16 Commits

Author SHA1 Message Date
Paul Berry 07b214eef5 Bump analysis server to language version 3.12.
Also start using the "private named parameters" feature.

Change-Id: I1c6da5f8ae2985e12313d405a2eb419c6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487521
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-03-12 14:18:11 -07:00
FMorschel 3c4eaf4263 [DAS] Use new analysis_server_plugin 0.3.8 version
Fixes: https://github.com/dart-lang/sdk/issues/62173
Change-Id: I3cdf41e1c090d4003893a72a8b14cc1d2be06dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/477880
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-02-03 07:15:59 -08:00
FMorschel 03980b59ac [analysis_server_plugin] Fixes warning ignores by namespacing rules by plugins
Bug: https://github.com/dart-lang/sdk/issues/62173
Change-Id: I09b26b99fa928822f76246d8c6380a7c9a2b0a1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/475080
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2026-01-28 12:22:28 -08:00
Jens Johansen a1e4696ab3 [analyzer plugin] Dependency overrides can be relative
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>
2025-09-14 23:56:42 -07:00
Sam Rawlins 26102c5d52 DAS plugins: Wire up initial screen for new plugins.
This renames the old screen, "Legacy plugins" and adds a new screen,
"Plugins". On the new plugins screen, we ask the plugins isolate(s) for
their plugins details, and print the following, for eadh plugin:

* the plugin's name
* the names of the registered lint rules
* the names of the registered warning rules
* the IDs and "messages" of the registered assists
* the IDs and "messages" and associated diagnostic codes of the
  registered quick fixes

More to come in follow ups:

* The resolved versions of plugin packages (coming from package_config.json)

Change-Id: Ic3dc4c5bffa64fd4da4097c042a847cc064e41ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447763
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-09-02 08:38:32 -07:00
Sam Rawlins 53d805ff63 analyzer: Move the PluginSource classes to be private; add to signature
This week we moved some other "plugin analysis options" code into the
private API. This continues that work, in order to add plugin source
options into the AnalysisOptionsImpl signature code.

The classes are deprecated as far as the public API is concerned,
encoded with a `@Deprecated` export. This is not reflected in api.txt.

Change-Id: Ie95851a7b0d54ef6abb8fb1e2b41294fbc5db836
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-08-29 15:44:39 -07:00
Sam Rawlins 0d2bbcb191 DAS plugins: support a dependencies_override section
Fixes https://github.com/dart-lang/sdk/issues/61422

This change provides a mechanism by which a developer hoping to use or
try or test plugins can specify a "dependency_overrides" section for
the generated pubspec.yaml file. We just copy the contents as text,
and paste them into the generated file.

Change-Id: I6f85d41f3dfc029e219b644a85ab14f80339342b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447540
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-08-28 15:29:11 -07:00
Sam Rawlins 7fb2897a26 DAS plugins: Use a caret dependency on the analysis_server_plugin package
Also stop generating that version number. This code that used the
version of the analysis_server_plugin package in the Dart SDK was
defensive, but is now seen as overly restrictive; it does not allow
bug fixes to be used, to no benefit.

The only reason to bump the minimum version here is if there is a
change made to the API spec which is breaking, which requires a new
version of the package in order to communicate with DAS.

Change-Id: I13dab8135a8ec754aa993509656d871a547cb9cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446686
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-08-25 15:08:44 -07:00
Sam Rawlins e4e36a396b DAS plugins: Make a constraint on the analysis_server_plugin package instead of the others
Fixes https://github.com/dart-lang/sdk/issues/61182

Change-Id: I46cff3e599ae63fb718a1e05778afa05be50ab79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441835
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-07-23 17:02:02 -07:00
Sam Rawlins 03eb25d975 Bump analyzer version used in plugins
Change-Id: I409bab47add37b51e676fc39286244aae554a4fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-02-13 12:25:00 -08:00
Sam Rawlins 994b474b74 analysis_server_plugin: Bump versions of dependencies
Change-Id: I6f4a04732ef8ad5af178ea64b1ab259c891ea451
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-24 07:46:20 -08:00
Sam Rawlins 6c5fe06d70 DAS plugins: Add an SDK constraint to generated pubspec
Change-Id: I98765c019d5e41b347b11b874165e3de0e381002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-21 10:30:20 -08:00
Sam Rawlins b08eb9d21a DAS plugins: Launch a shared plugin, configured from analysis options
This change is the final piece in enabling plugins in the new style to
be launched from a specification in analysis options.

Work towards https://github.com/dart-lang/sdk/issues/53402

* We support both one legacy analyzer plugin (the current max), and
  a set of new analyzer plugins, which are combined and launched in one
  shared plugin isolate.
* Make PluginLocator.pluginMap private.
* Add a parameter to PluginManager.addPluginToContextRoot:
  isLegacyPlugin. This method is used for both legacy and new plugins,
  but has slightly different behavior, finding where the plugin files
  are.

Change-Id: I6644aecd4283eea22586ffd051a01b0ec8987fc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-12-10 16:14:49 +00:00
Sam Rawlins 3515a199ce DAS plugins: Start enforcing an analyzer constraint
Change-Id: Ie2f987edfd4da9c2e45298a65e645b9fb9f80670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395261
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-15 01:04:01 +00:00
Sam Rawlins e66a8a4fa3 analyzer plugins: parse version and path keys in YAML
This enables plugin sources to be specified in one of three ways:

* as a YamlScalar, like `plugin_name: ^1.2.3`
* with a 'version' key, like `plugin_name:\n  version: ^1.2.3`, which
  allows diagnostic configurations to be alongside.
* with a 'path' key, like `plugin_name:\n  path: foo/bar`, which
  allows diagnostic configurations to be alongside.

We introduce a PluginSource with a `toYaml` method to convert the
values back into YAML for the generates pubspec. We update
PluginPackageGenerator to use PluginSource.toYaml.

Change-Id: Ic5f372f0339edd6aa638dd9b568a83f41a023b08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393900
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 19:41:00 +00:00
Sam Rawlins 5ee4eb52e6 DAS plugins: Add plugin package generator
This generator will be used create shared plugin package entrypoints from
plugin configurations.

Work towards https://github.com/dart-lang/sdk/issues/53402

Change-Id: If5c6aeb7bc7845311975928fba1cb9c8d273423c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-09-11 16:54:29 +00:00