Skip to content

Dart workspaces clarification and documentation improvements #4649

@felangel

Description

@felangel

I would love some clarification and improvements to the existing documentation around Dart workspaces. There are many ways to organize a mono-repo with Dart workspaces and it seems there's no clear guidance or guard-rails steering developers one way or another. For context, we're building a Flutter/Dart specific CI product at Shorebird and we would love to better understand how workspaces were intended to be used so that we can reinforce best-practices.

Open Questions:

  1. Even though the Dart workspaces documentation implies that workspace roots should be empty, there's technically nothing preventing developers from having a workspace root that also contains a library. For example, see https://github.com/LukasMirbt/hacker_news/tree/6631d4b49325bd1d5452a70cd3cc7397c62fba7d. Is there a valid case for allowing developers to include library implementations directly within a workspace root?
  2. How should a mono-repo with multiple packages be structured with workspaces (e.g. https://github.com/felangel/bloc)?
  3. How should a mono-repo with a single Flutter application and several local packages be structure with workspaces (e.g. https://github.com/LukasMirbt/hacker_news/tree/6631d4b49325bd1d5452a70cd3cc7397c62fba7d)
  4. How should a mono-repo with a full-stack application (multiple Flutter apps, server-side components, and packages) be structured with workspaces (e.g. https://github.com/flutter/news_toolkit/tree/main/flutter_news_example)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-questionA question about expected behavior or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions