-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update custom_lint #1147
Update custom_lint #1147
Conversation
WalkthroughThis pull request updates the Changes
Assessment against linked issues
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
packages/_internal/pubspec.lock
is excluded by!**/*.lock
📒 Files selected for processing (3)
packages/freezed_lint/CHANGELOG.md
(1 hunks)packages/freezed_lint/analysis_options.yaml
(0 hunks)packages/freezed_lint/pubspec.yaml
(1 hunks)
💤 Files with no reviewable changes (1)
- packages/freezed_lint/analysis_options.yaml
✅ Files skipped from review due to trivial changes (1)
- packages/freezed_lint/CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: freezed (packages/freezed_lint, master, get)
- GitHub Check: freezed (packages/freezed_annotation, master, get)
- GitHub Check: freezed (packages/freezed, master, get)
🔇 Additional comments (2)
packages/freezed_lint/pubspec.yaml (2)
18-18
: LGTM! Consistent version updateThe custom_lint version update matches the custom_lint_builder version, maintaining consistency between the packages.
14-14
: Verify custom_lint_builder version compatibilityThe update to custom_lint_builder 0.7.0 is a minor version bump in a 0.x.x range, which may contain breaking changes. This aligns with the PR objectives to update custom_lint support.
Let's verify the changes and compatibility:
✅ Verification successful
Version update to custom_lint_builder ^0.7.0 is appropriate
The update is explicitly documented in the changelog as a compatibility update to support custom_lint v0.7.0, and both dependencies (custom_lint and custom_lint_builder) are consistently updated to the same version.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check custom_lint_builder changes and compatibility # Get the custom_lint_builder package info curl -s https://pub.dev/packages/custom_lint_builder.json | jq -r '.versions[] | select(.version | startswith("0.7.")) | .version' # Check if any packages in the repository depend on a conflicting custom_lint_builder version rg -l "custom_lint_builder:" | xargs cat | rg "custom_lint_builder: [\"'^].*[\"'\$]" || echo "No other custom_lint_builder dependencies found"Length of output: 393
Script:
#!/bin/bash # Try alternative approach to check package information and changes # Check for CHANGELOG.md in the repository fd -g "CHANGELOG.md" --exec grep -l "custom_lint" {} \; # Check pubspec.lock for current version constraints fd -g "pubspec.lock" --exec grep -A 5 "custom_lint_builder:" {} \; # Check any migration guides or documentation fd -g "README.md" --exec grep -B 2 -A 2 "custom_lint" {} \;Length of output: 705
Script:
#!/bin/bash # Check changelog content for version-related information # Read the changelog content cat packages/freezed_lint/CHANGELOG.md # Check for any version-specific documentation rg -B 2 -A 2 "0.7.0" packages/freezed_lint/Length of output: 1490
@@ -9,12 +9,12 @@ environment: | |||
sdk: ">=3.0.0 <4.0.0" | |||
|
|||
dependencies: | |||
analyzer: ^6.5.0 | |||
analyzer: ^6.6.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
The proposed analyzer version ^6.6.0 conflicts with the requirement in packages/freezed/pubspec.yaml which needs ">=7.0.0 <8.0.0". Consider updating to a compatible version that satisfies the >=7.0.0 constraint.
- packages/freezed/pubspec.yaml already supports and requires analyzer >=7.0.0
- packages/freezed/CHANGELOG.md explicitly mentions support for analyzer 7.0.0
🔗 Analysis chain
Verify analyzer version compatibility
The minor version bump of the analyzer package should be verified for compatibility with other dependencies and potential breaking changes.
Let's check the analyzer's changelog and verify compatibility:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check analyzer package compatibility and changelog
# Get the analyzer package info and changelog
curl -s https://pub.dev/packages/analyzer.json | jq -r '.versions[] | select(.version | startswith("6.6.")) | .version'
# Check if any packages in the repository depend on a conflicting analyzer version
rg -l "analyzer:" | xargs cat | rg "analyzer: [\"'^].*[\"'\$]" || echo "No other analyzer dependencies found"
Length of output: 284
Script:
#!/bin/bash
# Find the specific file with the analyzer version >=7.0.0
rg -l "analyzer: \"\>=7\.0\.0" || rg -l "analyzer: '>="
# Also check custom_lint dependency as it might be related
rg "custom_lint:" -A 1
Length of output: 418
Script:
#!/bin/bash
# Find files containing analyzer version with simpler pattern
rg -p "analyzer.*7\.0\.0"
Length of output: 145
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, 'lil bot... good point, I guess.
Blocked on invertase/dart_custom_lint#300.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lishaduck I see - the issue is about upgrading multiple dependencies including analyzer, analyzer_plugin, and source_gen. This explains the version constraint situation. We'll need to wait for that upgrade to be completed in custom_lint before we can align the analyzer versions here.
🔗 Analysis chain
@lishaduck Understood, thanks for clarifying. The analyzer version update is blocked pending resolution of invertase/dart_custom_lint#300. We'll wait for that to be resolved first.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Fetch the GitHub issue details
gh issue view 300 --repo invertase/dart_custom_lint
Length of output: 208
✏️ Learnings added
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.467Z
Learning: The analyzer version upgrade in freezed_lint is blocked by invertase/dart_custom_lint#300 which handles the broader upgrade of analyzer, analyzer_plugin, and source_gen dependencies in custom_lint.
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.467Z
Learning: The analyzer version update to >=7.0.0 in freezed_lint package is blocked by invertase/dart_custom_lint#300, preventing alignment with freezed package's analyzer requirements.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
I've updated custom_lint to support analyzer 7. So I've updated Freezed separate to support the new custom-lint version. But thanks! |
Closes #1141
Example folder golden passes on both flutter stable and master channels (for me).
Summary by CodeRabbit
Dependency Updates
analyzer
to version 6.6.0custom_lint_builder
to version 0.7.0custom_lint
to version 0.7.0Analysis Options
Enhanced type checking by enabling strict analysis options for casts, inference, and raw types