Skip to content
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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/_internal/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77"
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab"
url: "https://pub.dev"
source: hosted
version: "73.0.0"
version: "76.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.3.2"
version: "0.3.3"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a"
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e"
url: "https://pub.dev"
source: hosted
version: "6.8.0"
version: "6.11.0"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -266,10 +266,10 @@ packages:
dependency: transitive
description:
name: macros
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
url: "https://pub.dev"
source: hosted
version: "0.1.2-main.4"
version: "0.1.3-main.0"
matcher:
dependency: transitive
description:
Expand Down
4 changes: 4 additions & 0 deletions packages/freezed_lint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## unreleased patch

- Support custom_lint v0.7.0.

## 0.0.6 - 2025-01-06

- fix false positive `freezed_missing_private_empty_constructor` if accessor/method/field is static (thanks to @SunlightBro)
Expand Down
1 change: 0 additions & 1 deletion packages/freezed_lint/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ analyzer:
strict-casts: true
strict-inference: true
strict-raw-types: true

6 changes: 3 additions & 3 deletions packages/freezed_lint/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
analyzer: ^6.5.0
analyzer: ^6.6.0
Copy link

@coderabbitai coderabbitai bot Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Version conflict with freezed package

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

Copy link
Contributor Author

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.

Copy link

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.

analyzer_plugin: ^0.11.2
custom_lint_builder: ^0.6.0
custom_lint_builder: ^0.7.0
freezed_annotation: ^2.4.4

dev_dependencies:
custom_lint: ^0.6.0
custom_lint: ^0.7.0
build_verify: ^3.1.0
test: ^1.22.2
Loading