Skip to content

[packages] Design analysis solution for SwiftPM packages #172427

@stuartmorgan-g

Description

@stuartmorgan-g

See #171442 for background. tl;dr is that the xcode-analyze command in flutter/packages repo tooling has traditionally analyzed both the native test code in the Runner project, and also the code of CocoaPods packages the project imported—importantly, the plugin code itself. However, the observed behavior is that if code in included in a project via SwiftPM, that code is not analyzed as part of the project, so the xcode-analyze command as currently designed doesn't analyze the plugin code, which is the main point of the command.

We need a solution to analyze the plugin code when using SwiftPM, since CocoaPods will stop working at some point. In theory that should be as simple as finding a command that allows running Xcode analysis of a Swift Package directly from the command line, but we'll presumably run into the usual problem that causes us to use example apps to interact with plugin packages, which is that the package is not necessarily well-formed on its own. In particular, Flutter imports are presumably broken. @vashworth this may inform some of the planning around the alternate SwiftPM integration model you've been looking at?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: pluginsSupport for writing, building, and running plugin packagesa: tests"flutter test", flutter_test, or one of our testsc: contributor-productivityTeam-specific productivity, code health, technical debt.packageflutter/packages repository. See also p: labels.team-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions