BOT: Dart Dependency Updater#416
Conversation
WalkthroughUpdates CHANGELOG entries for multiple packages with automation note dated November 4, 2025. Version bumps applied (3.0.0+1, 10.0.2+1, 1.0.0+91). Normalizes YAML quoting conventions to double quotes and updates minor dependency versions across packages. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/json_dynamic_widget/CHANGELOG.md (1)
388-388: Remove git merge conflict marker.Line 388 contains a residual git merge artifact (
>>>>>>> fabcc57c...) that should not be committed. Remove this line entirely.->>>>>>> fabcc57c6772a1015dbb260dc2cb5a28bfade292:CHANGELOG.md
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/codegen/CHANGELOG.md(1 hunks)packages/codegen/pubspec.yaml(1 hunks)packages/json_dynamic_widget/CHANGELOG.md(1 hunks)packages/json_dynamic_widget/example/pubspec.yaml(2 hunks)packages/json_dynamic_widget/pubspec.yaml(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Pull Request Checker
packages/json_dynamic_widget/pubspec.yaml
[error] 1-1: Dependency resolution failed: json_dynamic_widget_codegen requires analyzer < 7.4.0, while build_runner ^2.10.1 requires analyzer ^8.0.0. Version solving failed. Failed to update packages. Command: 'dart pub get'.
packages/codegen/pubspec.yaml
[error] 1-1: Dependency resolution failed: json_dynamic_widget_codegen requires analyzer < 7.4.0, while build_runner ^2.10.1 requires analyzer ^8.0.0. Version solving failed. Failed to update packages. Command: 'dart pub get'.
packages/json_dynamic_widget/example/pubspec.yaml
[error] 1-1: Dependency resolution failed: json_dynamic_widget_codegen requires analyzer < 7.4.0, while build_runner ^2.10.1 requires analyzer ^8.0.0. Version solving failed. Failed to update packages. Command: 'dart pub get'.
🔇 Additional comments (5)
packages/json_dynamic_widget/CHANGELOG.md (1)
1-3: Changelog entry is properly formatted.The new pre-release entry follows the established format with correct date and message. Consistent with similar automated-update entries in the history.
packages/codegen/CHANGELOG.md (1)
1-3: Changelog entry format is correct.The pre-release entry for version 3.0.0+1 follows conventions and aligns with the automated update pattern.
packages/json_dynamic_widget/pubspec.yaml (1)
4-4: Version bump is appropriate for pre-release.Incrementing to 10.0.2+1 is the correct semver approach for an automated dependency update.
packages/json_dynamic_widget/example/pubspec.yaml (2)
4-4: Version bump is appropriate.The increment to 1.0.0+91 for the example app is reasonable for dependency updates.
13-13: Individual dependency updates are reasonable, but PR is blocked upstream.The updates to
dotted_border: ^3.1.0,flutter_svg: ^2.2.1, andicons_launcher: ^3.0.3are individually sound. However, this file transitively depends on the blocker constraint throughjson_dynamic_widget→json_dynamic_widget_codegen. The PR cannot proceed until the analyzer constraint issue is resolved inpackages/codegen/pubspec.yaml.Also applies to: 17-17, 30-31
| template_expressions: '^3.3.1+2' | ||
| yaml_writer: '^2.1.0' | ||
| yaon: '^1.1.4+10' | ||
| analyzer: ">=6.2.0 <7.4.0" |
There was a problem hiding this comment.
🧩 Analysis chain
Analyzer constraint blocks dependency resolution (critical blocker).
The constraint analyzer: ">=6.2.0 <7.4.0" prevents the proposed updates to build (^4.0.2), code_builder (^4.11.0), and especially source_gen (^4.0.2). According to the PR objectives, source_gen >=4.0.1 depends on analyzer ^8.1.1, which is incompatible with the upper bound <7.4.0.
The changelog (line 15 in CHANGELOG.md) explains this was a deliberate decision to work around Dart deprecations, but it now blocks modern dependency updates.
To resolve:
- Option A (Recommended): If your code is compatible with analyzer ^8.x, update the constraint to
analyzer: "^8.1.1"or">=8.0.0". Review the code for any uses of deprecated analyzer APIs. - Option B: Revert the dependency upgrades to versions compatible with analyzer <7.4.0 (e.g., source_gen ^2.0.0, build ^2.4.2).
- Option C: Pin to a specific analyzer version that satisfies both constraints (unlikely to exist).
Before proceeding, verify that your codebase is compatible with analyzer ^8.x:
🏁 Script executed:
#!/bin/bash
# Search for any uses of deprecated analyzer APIs or direct analyzer imports
rg -n "from 'package:analyzer" packages/codegen/lib/ || echo "Checking for analyzer usage..."
rg -n "analyzer\." packages/codegen/lib/ -A 2 -B 2 --type dartLength of output: 30
I need to gather more information about the dependency resolution. The lack of direct analyzer usage doesn't invalidate the constraint issue—analyzer is likely a transitive dependency. Let me verify the actual dependency structure and the source_gen requirements.
Also, let me search for the latest information on source_gen and analyzer compatibility:
🏁 Script executed:
#!/bin/bash
# Check the full pubspec.yaml content to see all dependencies and their constraints
cat packages/codegen/pubspec.yaml | grep -A 50 "dependencies:"Length of output: 1273
🏁 Script executed:
#!/bin/bash
# Look for pubspec.lock or similar lock files
find packages/codegen -name "pubspec.lock" -o -name ".flutter" -type dLength of output: 0
🏁 Script executed:
#!/bin/bash
# Search for any analyzer version references or dependency declarations in comments
rg -n "analyzer|source_gen|code_builder" packages/codegen/pubspec.yaml -B 1 -A 1Length of output: 318
🏁 Script executed:
#!/bin/bash
# Check if there are analysis options or other analyzer configuration files
find packages/codegen -name "analysis_options.yaml" -o -name ".dart_tool" -type dLength of output: 38
🌐 Web query:
source_gen 4.0.2 analyzer dependency requirements
💡 Result:
source_gen 4.0.2 requires package:analyzer >=8.1.1 <9.0.0. [1][2]
Sources:
- source_gen changelog (4.0.1 entry). [1]
- source_gen package page. [2]
Analyzer constraint blocks dependency resolution (critical blocker).
The constraint analyzer: ">=6.2.0 <7.4.0" is incompatible with source_gen: "^4.0.2". source_gen 4.0.2 requires analyzer >=8.1.1 <9.0.0, which falls outside the upper bound of <7.4.0.
No direct analyzer imports were found in the codebase, suggesting analyzer is a transitive dependency. This is promising for compatibility with analyzer ^8.x, but still requires your verification.
To resolve:
- Option A (Recommended): Update the constraint to
analyzer: "^8.1.1"and verify your code works with analyzer 8.x. - Option B: Revert the dependency upgrades to versions compatible with analyzer <7.4.0 (e.g., source_gen ^2.0.0).
- Option C: Pin to a specific analyzer version satisfying both constraints (unlikely to exist).
🤖 Prompt for AI Agents
In packages/codegen/pubspec.yaml around line 16, the pinned analyzer range
">=6.2.0 <7.4.0" conflicts with source_gen ^4.0.2 (which requires analyzer
>=8.1.1 <9.0.0); update the analyzer constraint to "analyzer: ^8.1.1"
(recommended), run pub get, then run project tests and dart analyze to verify no
breakages; if upgrading causes issues instead revert the source_gen upgrade to a
version compatible with <7.4.0 (or choose the alternate option your team
prefers) and ensure CI passes.
| dev_dependencies: | ||
| build_runner: '^2.4.15' | ||
| flutter_lints: '^6.0.0' | ||
| build_runner: "^2.10.1" |
There was a problem hiding this comment.
🧩 Analysis chain
Dependency resolution fails due to analyzer constraint conflict.
The update to build_runner: ^2.10.1 is incompatible with json_dynamic_widget_codegen: ^3.0.0, which constrains analyzer to >=6.2.0 <7.4.0. However, build_runner ^2.10.1 requires analyzer ^8.0.0, creating an unsolvable constraint conflict. Pipeline validation confirms: "Dependency resolution failed: json_dynamic_widget_codegen requires analyzer < 7.4.0, while build_runner ^2.10.1 requires analyzer ^8.0.0."
This is a blocker that prevents the entire PR from proceeding.
Root cause: The analyzer constraint in packages/codegen/pubspec.yaml (line 16) must be updated to support newer versions of build_runner and source_gen, or build_runner must remain on an older constraint-compatible version.
Recommendation: Before proceeding with this PR, either:
- Update the analyzer constraint in
packages/codegen/pubspec.yamlto allow analyzer ^8.0.0 (if compatible with your code), or - Revert
build_runnerto a version compatible with analyzer <7.4.0 (e.g., ^2.4.15)
I'll verify the dependency conflict claim by examining the actual pubspec.yaml files and checking the build_runner version requirements.
🏁 Script executed:
#!/bin/bash
# Examine the pubspec.yaml files referenced in the review
echo "=== packages/json_dynamic_widget/pubspec.yaml (around line 35) ==="
cat packages/json_dynamic_widget/pubspec.yaml | sed -n '30,40p'
echo -e "\n=== packages/codegen/pubspec.yaml (around line 16) ==="
cat packages/codegen/pubspec.yaml | sed -n '1,30p'Length of output: 997
🌐 Web query:
build_runner 2.10.1 analyzer dependency requirements
💡 Result:
build_runner 2.10.1 requires analyzer 8.x — the 2.10.0/2.10.x changelog notes it "Require analyzer 8.0.0". [1]
Source: build_runner changelog (pub.dev). [1]
🌐 Web query:
source_gen 4.0.2 build_runner 2.10.1 compatibility
💡 Result:
Short answer: incompatible.
Why: source_gen 4.x requires package:build >=3.0.0 (source_gen 4.0.1+ specified Allow build: '>=3.0.0 <5.0.0'). [1] build_runner 2.10.1 is a 2.x build_runner which targets the package:build 2.x ecosystem, so it will not satisfy source_gen's build >=3 constraint. [2]
Options: upgrade your build_runner/build tooling to versions that support build >=3 (or downgrade source_gen to a 3.x release compatible with build 2.x). [1][2]
Sources:
- source_gen changelog (4.0.1/4.0.2 notes). [1]
- build_runner package / changelog (2.10.1 / 2.x series). [2]
Dependency resolution fails: build_runner ^2.10.1 is incompatible with json_dynamic_widget_codegen ^3.0.0.
Two unresolvable conflicts exist:
- Analyzer versions: build_runner ^2.10.1 requires
analyzer ^8.0.0, but codegen constrainsanalyzer >=6.2.0 <7.4.0. - Build ecosystem: source_gen ^4.0.2 requires
build >=3.0.0, but build_runner 2.10.1 targets thebuild 2.xecosystem.
Either update the analyzer constraint in packages/codegen/pubspec.yaml to allow analyzer ^8.0.0 and source_gen 4.x (if compatible with your code), or downgrade build_runner to a version compatible with the build 2.x ecosystem (e.g., ^2.4.15) and use source_gen 3.x.
🤖 Prompt for AI Agents
In packages/json_dynamic_widget/pubspec.yaml around line 35, build_runner is set
to ^2.10.1 which conflicts with json_dynamic_widget_codegen's analyzer and build
ecosystem constraints; fix by either (A) downgrading build_runner to a 2.x
compatible release (e.g., ^2.4.15) so it stays in the build 2.x ecosystem and
matches source_gen 3.x, or (B) update packages/codegen/pubspec.yaml to relax the
analyzer constraint to allow ^8.0.0 and bump source_gen to a 4.x compatible
version (ensuring codegen compiles against analyzer ^8 and source_gen 4 APIs);
apply one of these two changes and run pub get to verify dependency resolution.
PR created automatically
dependencies:
build: 2.4.2 --> 4.0.2code_builder: 4.10.1 --> 4.11.0json_theme: 9.0.0+1 --> 9.0.3source_gen: 2.0.0 --> 4.0.2Error!!!
dependencies:
json_schema: 5.2.1 --> 5.2.2json_theme: 9.0.0+1 --> 9.0.3dev_dependencies:
build_runner: 2.4.15 --> 2.10.1Error!!!
dependencies:
dotted_border: 2.1.0 --> 3.1.0flutter_svg: 2.1.0 --> 2.2.1json_theme: 9.0.0+1 --> 9.0.3dev_dependencies:
build_runner: 2.4.15 --> 2.10.1icons_launcher: 3.0.1 --> 3.0.3Error!!!
Summary by CodeRabbit