skillfed

dart-resolve-package-conflicts

When pub get fails due to version conflicts, this workflow guides you through surgical lockfile edits to remove only the problematic package entry, then re-resolve to find compatible versions. It covers auditing dependencies with dart pub outdated, upgrading safely with version constraints, and handling retracted packages without wiping your entire lock file.

dart-resolve-package-conflicts fixes pub get failures by surgically removing conflicting packages from your lockfile and re-resolving dependencies.

AI-generated summary based on this skill's SKILL.md

2,745 161 BSD-3-Clause updated by flutter

Install

flutter/agent-plugins/dart-resolve-package-conflicts · repository language: Dart

CLI (skillfed)coming soon
git clone https://github.com/flutter/agent-plugins
cp -r agent-plugins/skills/dart-resolve-package-conflicts ~/.claude/skills/dart-resolve-package-conflicts

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How to fix dart pub get version conflicts?

dart-resolve-package-conflicts guides you through surgical lockfile edits when pub get fails due to incompatible versions. Rather than deleting your entire pubspec.lock, remove only the problematic package entry from pubspec.lock, then run pub get again to re-resolve dependencies. This targeted approach preserves your other locked versions while finding compatible alternatives for the conflicting package.

What does dart-resolve-package-conflicts cover for dependency auditing?

dart-resolve-package-conflicts helps you audit and upgrade Dart dependencies safely using dart pub outdated to identify resolvable versions. It teaches you how to apply version constraints and caret syntax in pubspec.yaml to control upgrade scope, avoiding version lock while maintaining stability. The workflow prevents accidental major version jumps that break compatibility.

How do I resolve dart package conflicts without wiping my lockfile?

dart-resolve-package-conflicts teaches surgical editing of pubspec.lock to fix retracted or locked packages. Instead of regenerating the entire lock file, identify the conflicting package entry, remove only that section, and run pub get to re-resolve just that dependency against your constraints. This preserves all other pinned versions and speeds recovery from version conflicts.

What version constraint syntax does dart-resolve-package-conflicts explain?

dart-resolve-package-conflicts covers understanding and applying version constraints and caret syntax in pubspec.yaml. The caret operator (^) allows patch and minor updates while pinning the major version, giving you controlled flexibility. The workflow shows how to tighten or loosen these constraints to resolve dependency graph conflicts without manual lockfile regeneration.

How does dart-resolve-package-conflicts handle transitive dependency issues?

dart-resolve-package-conflicts addresses fixing transitive dependency issues by teaching you to identify which direct or transitive package is causing pub get to fail. By surgically removing the problematic entry from pubspec.lock and re-running pub get, the resolver recalculates the entire dependency graph, finding compatible versions that satisfy all constraints downstream.

What workflow does dart-resolve-package-conflicts recommend for major version upgrades?

dart-resolve-package-conflicts provides a major version upgrade workflow that combines auditing with dart pub outdated, adjusting version constraints in pubspec.yaml incrementally, and testing compatibility before committing lockfile changes. This staged approach prevents breaking your entire dependency tree and lets you validate each upgrade step safely.

SKILL.md

rendered from the published skill — quoted content, verbatim

Managing Dart Dependencies

Contents

Core Concepts

Dart enforces a strict single-version rule for dependencies: a project and all its transitive dependencies must resolve to a single, shared version of any given package. This prevents runtime type mismatches but introduces the risk of "version lock."

To mitigate version lock, Dart relies on version constraints rather than pinned versions in the pubspec.yaml. The pubspec.lock file maintains the exact resolved versions for reproducible builds.

Understand the output columns of dart pub outdated: * Current: The version currently

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
skills/dart-resolve-package-conflicts/SKILL.md

Related skills

Tags

dependency-resolution version-locking constraint-management transitive-deps lockfile-surgery conflict-resolution package-auditing upgrade-workflow