Skip to content

dart pub get --no-dev-dependencies #4570

Open
@dcharkes

Description

@dcharkes

We have the following repository structure:

  • pkgs/
    • my_package/
    • some_package/
    • lints_for_this_repo/ (used by analysis_options in the top two packages)
    • tools_for_this_repo/ (used in the tool/ by the top two packages)

I don't want to publish lints_for_this_repo and tools_for_this_repo, they are just for the repository, not for the larger Dart eco system.

On most use cases using dev path dependencies (either directly, or via a pub workspace) is fine:

  • git clone you'll have the other packages at the paths.
  • pub get with my_package will not require lints_for_this_repo.

However, there are use cases in a package might be downloaded from pub in a script, and that script then does pub get. This use case is not supported, because the dev dependencies don't exist on pub or on the path.

Should we consider having a dart pub get --no-dev-dependencies?

Or should we make a best practice that someone should publish unlisted packages for these use cases such as your own custom lints and tools?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions