Skip to content

Checking for already-installed packages doesn't consider the SDK version #15

@evanweible-wf

Description

@evanweible-wf

If, for example, you run dpx dependency_validator on Dart 3.4 and then again on Dart 2.19, you'll get this error:

> dpx dependency_validator    
dependency_validator as globally activated doesn't support Dart 2.19.6, try: dart pub global activate dependency_validator

This is because dpx finds that dependency_validator is already globally activated and skips the activation step to save time. Note that even if we move forward with #11, this issue would still apply when a version constraint is specified.

To fix this, we could:

  • Detect this specific error message and re-activate to workaround it.
  • Detect whether the globally activated package supports the current SDK. Not sure where this information is stored (if at all); need to investigate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions