Skip to content

Remove internal APIs from exports when not in a test run #5587

@DanTup

Description

@DanTup

We currently export a bunch of internal classes from the extensions activate method in a _privateApi field to make testing easier. These were never intended for use outside of tests, but some other extensions have started using them to get access to things they can't easily get elsewhere (for example the SDK paths or Outline data).

Because these classes were never meant as public API, they often change in breaking ways so we should remove them and only expose them when running in a test run. But first we should try to provide alternatives for extensions where it's reasonable. This issue tracks the known extensions using these APIs, what they use, and whether they have migrated off them.

The initial API provides access to the DTD URI and the current SDK paths (#5583). This will ship with version == 2 in v3.116 at the start of August.

The items above are the only uses of the private APIs I've been able to find (besides CommandDash/commanddash but that is no longer in development) and therefore other APIs that are currently exposed will be removed soon. Other APIs will be removed once the projects above have had some time to migrate over.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in apiRelates to the API exported by the Dart-Code extension for use by other extensions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions