You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[flutter_plugin_tools] Legacy analysis fails on @docImports of dev dependencies #196406
Legacy analysis (.ci/scripts/analyze_legacy.sh, used by the Linux analyze_legacy N-1 and N-2 tasks in flutter/packages) runs remove-dev-dependencies and then analyze --lib-only. If a package's lib/ code has a @docImport of one of its dev dependencies, that import can't be resolved once the dev dependencies are removed, so analysis fails with uri_does_not_exist_in_doc_import.
Doc imports only affect dartdoc references, not compilation, so this is a false positive for what legacy analysis is meant to check (that client-facing code still analyzes on N-1 and N-2).
This first showed up in flutter/packages#13628: N-1 moved to 3.47.9, so cupertino_ui (which requires Flutter 3.47) is legacy-analyzed for the first time. 20 of its lib/ files have /// @docImport 'package:material_ui/material_ui.dart';, and material_ui is only a dev dependency (because material_ui depends on cupertino_ui). As a workaround, that PR adds // ignore: uri_does_not_exist_in_doc_import (or ignore_for_file) to those files.
Possible fixes:
Don't treat uri_does_not_exist_in_doc_import as an error in legacy analysis.
Have remove-dev-dependencies also remove @docImports of the packages it removes.
Once this is fixed, the ignores in packages/cupertino_ui/lib/ can be removed.
Activity
Add TODOs to remove doc import ignores
[ci] Update repo for 3.50 stable release (#13628)