Skip to content

Use Dart 3.8.0, analyzer 7.5.9, reformat.#1277

Merged
rrousselGit merged 1 commit intorrousselGit:masterfrom
davidmorgan:use-dart-3-8
Jul 16, 2025
Merged

Use Dart 3.8.0, analyzer 7.5.9, reformat.#1277
rrousselGit merged 1 commit intorrousselGit:masterfrom
davidmorgan:use-dart-3-8

Conversation

@davidmorgan
Copy link
Copy Markdown
Contributor

@davidmorgan davidmorgan commented Jul 16, 2025

Flutter channel name has changed from master to main, change it to main to get the latest Flutter which has 3.8.0.

But, this hits an issue in custom_lint, so use stable for now.

Using Dart 3.8.0 triggers a formatting change: reformat.

Summary by CodeRabbit

  • Chores

    • Updated continuous integration workflows to use the Flutter stable channel instead of master.
    • Raised minimum supported Dart SDK to 3.8.0 and analyzer version to 7.5.9.
  • Style

    • Applied consistent formatting and indentation improvements across source files and test cases for better readability and code style.
  • Documentation

    • Updated changelog to reflect new minimum version requirements.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 16, 2025

Walkthrough

This update raises the minimum Dart SDK to 3.8.0 and the analyzer version to 7.5.9, updates CI workflows to use the Flutter stable channel, and applies extensive code and test formatting improvements across the Freezed package. No logic, control flow, or public API changes are introduced; all modifications are stylistic or configuration-related.

Changes

File(s) Change Summary
.github/workflows/build.yml CI workflow updated: Flutter channel switched from master to stable throughout.
packages/freezed/pubspec.yaml, packages/freezed/CHANGELOG.md Minimum Dart SDK raised to 3.8.0, analyzer to 7.5.9; changelog updated accordingly.
packages/freezed/example/, packages/freezed/test/integration/, packages/freezed/test/** Formatting improvements: constructor, print, and expect statements condensed or realigned.
packages/freezed/lib/src/** Extensive formatting and indentation adjustments; no logic or API changes.
packages/freezed/lib/src/templates/** Consistent code style and formatting improvements in code generation templates.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant CI Workflow
    participant Flutter SDK

    Developer->>CI Workflow: Push code / PR
    CI Workflow->>Flutter SDK: Setup using "stable" channel
    CI Workflow-->>Developer: Run checks, formatting, and tests on stable channel
Loading

Possibly related PRs

  • rrousselGit/freezed#1192: Updates minimum Dart SDK and analyzer versions, directly related to this PR’s version constraint changes.
  • rrousselGit/freezed#1271: Implements pattern matching methods (when/map), which relate to this PR’s formatting and template improvements for code generation.

Suggested reviewers

  • rrousselGit

Poem

In the warren where the Freezed code grows,
We tidied the burrows where the Dart wind blows.
Raised the roof—3.8, analyzer anew,
Fluffed up the tests and templates too!
Now every hop is neat and stable,
On the Flutter channel, we’re more than able!
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@davidmorgan davidmorgan marked this pull request as ready for review July 16, 2025 12:37
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (9)
.github/workflows/build.yml (1)

55-56: Nit: tighten the comment wording

Minor wording tweak for clarity.

-# Check dart format only on stable
+# Run `dart format` only when testing the stable channel
packages/freezed/CHANGELOG.md (1)

1-2: Bullet is misplaced and contains a typo

The new entry sits outside any release section and “minumum” is miss-spelled.
Move it under ## 3.1.0 and fix the spelling.

- Support Dart 3.8.0 and analyzer 7.5.9 as a minumum.
+### Dart/Analyzer
+* Support Dart 3.8.0 and analyzer 7.5.9 as a minimum.
packages/freezed/test/multiple_constructors_test.dart (1)

179-184: Remove redundant cast to ErrorsResult

AnalysisSession.getErrors already returns Future<ErrorsResult>. The extra as ErrorsResult adds noise without benefit.

-      final errorResult =
-          await main.session.getErrors(
-                '/freezed/test/integration/multiple_constructors.freezed.dart',
-              )
-              as ErrorsResult;
+      final errorResult = await main.session.getErrors(
+        '/freezed/test/integration/multiple_constructors.freezed.dart',
+      );
packages/freezed/test/map_test.dart (1)

302-305: Same redundant cast here

As in the previous test file, the cast to ErrorsResult is unnecessary.

-      final errorResult =
-          await main!.session.getErrors('/freezed/test/integration/main.dart')
-              as ErrorsResult;
+      final errorResult =
+          await main!.session.getErrors('/freezed/test/integration/main.dart');
packages/freezed/lib/src/templates/pattern_template.dart (1)

296-298: Add space after commas for generated readability

When the generated union has multiple properties, join(',') produces "a,b" – dart-format will fix it later, but emitting "a, b" up-front is cleaner and avoids extra formatter churn.

-        .map((e) => '_that.${e.name}')
-        .join(',');
+        .map((e) => '_that.${e.name}')
+        .join(', ');
packages/freezed/lib/src/templates/parameter_template.dart (1)

258-269: Clarify field access in copyWith

Using this.typeDisplayString / this.parameterElement makes it explicit that the original field value is retained and avoids the slight cognitive overhead of shadow-lookup.

-    type: type ?? this.type,
-    typeDisplayString: typeDisplayString,
+    type: type ?? this.type,
+    typeDisplayString: this.typeDisplayString,
...
-    parameterElement: parameterElement,
+    parameterElement: this.parameterElement,
packages/freezed/lib/src/templates/copy_with.dart (2)

90-94: Redundant newline inside doc string (minor)

The triple-quoted string already starts with a newline, so the extra leading blank line after ${_copyWithDocs(...)} results in an empty line in the generated comment. Totally harmless, but you may want to drop it to avoid stray blank lines in emitted code.


221-225: Add a space after commas for readability

The parameters list is concatenated with ','.join(...), which produces a,int instead of a, int. It compiles, but a single space after commas matches the surrounding style and aids readability of the generated code.

-        .join(',');
+        .join(', ');
packages/freezed/lib/src/templates/concrete_template.dart (1)

528-529: Minor readability suggestion

needsConstModifier condition is untouched functionally, but chaining with leading ! reads slightly better if grouped:

-        var needsConstModifier =
-            !declaration.type.isDartCoreString &&
+        var needsConstModifier = !declaration.type.isDartCoreString &&

Purely cosmetic—ignore if you prefer current wrapping.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 542dce4 and ae7a921.

📒 Files selected for processing (40)
  • .github/workflows/build.yml (3 hunks)
  • packages/freezed/CHANGELOG.md (1 hunks)
  • packages/freezed/example/lib/main.dart (2 hunks)
  • packages/freezed/example/lib/time_slot.dart (1 hunks)
  • packages/freezed/example/test/diagnosticable_test.dart (1 hunks)
  • packages/freezed/example/test/json_test.dart (1 hunks)
  • packages/freezed/lib/src/ast.dart (3 hunks)
  • packages/freezed/lib/src/freezed_generator.dart (2 hunks)
  • packages/freezed/lib/src/models.dart (10 hunks)
  • packages/freezed/lib/src/string.dart (1 hunks)
  • packages/freezed/lib/src/templates/abstract_template.dart (2 hunks)
  • packages/freezed/lib/src/templates/concrete_template.dart (5 hunks)
  • packages/freezed/lib/src/templates/copy_with.dart (4 hunks)
  • packages/freezed/lib/src/templates/from_json_template.dart (2 hunks)
  • packages/freezed/lib/src/templates/parameter_template.dart (7 hunks)
  • packages/freezed/lib/src/templates/pattern_template.dart (8 hunks)
  • packages/freezed/lib/src/templates/properties.dart (2 hunks)
  • packages/freezed/lib/src/tools/recursive_import_locator.dart (3 hunks)
  • packages/freezed/lib/src/tools/type.dart (1 hunks)
  • packages/freezed/pubspec.yaml (1 hunks)
  • packages/freezed/test/bidirectional_test.dart (1 hunks)
  • packages/freezed/test/common.dart (1 hunks)
  • packages/freezed/test/common_types_test.dart (1 hunks)
  • packages/freezed/test/decorator_test.dart (4 hunks)
  • packages/freezed/test/deep_copy_test.dart (4 hunks)
  • packages/freezed/test/generic_test.dart (2 hunks)
  • packages/freezed/test/generics_refs_test.dart (1 hunks)
  • packages/freezed/test/integration/json.dart (9 hunks)
  • packages/freezed/test/integration/multiple_constructors.dart (1 hunks)
  • packages/freezed/test/integration/single_class_constructor.dart (3 hunks)
  • packages/freezed/test/json_test.dart (1 hunks)
  • packages/freezed/test/manual_test.dart (2 hunks)
  • packages/freezed/test/map_test.dart (24 hunks)
  • packages/freezed/test/multiple_constructors_test.dart (7 hunks)
  • packages/freezed/test/optional_maybe_test.dart (5 hunks)
  • packages/freezed/test/single_class_constructor_test.dart (7 hunks)
  • packages/freezed/test/source_gen_src.dart (1 hunks)
  • packages/freezed/test/source_gen_test.dart (1 hunks)
  • packages/freezed/test/typedef_parameter_test.dart (1 hunks)
  • packages/freezed/test/when_test.dart (23 hunks)
🧰 Additional context used
🧠 Learnings (19)
📓 Common learnings
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/CHANGELOG.md (2)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
.github/workflows/build.yml (2)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.701Z
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.
packages/freezed/lib/src/tools/recursive_import_locator.dart (2)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/pubspec.yaml (2)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/test/integration/json.dart (1)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/test/single_class_constructor_test.dart (2)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/test/when_test.dart (1)
Learnt from: rrousselGit
PR: rrousselGit/freezed#1157
File: packages/freezed/test/integration/extend.dart:10-14
Timestamp: 2025-02-23T20:01:34.876Z
Learning: In Dart, when calling a named super constructor, the syntax `super.value` can be used in the constructor parameters along with `super.named()` in the initializer list. For example: `const Subclass._(super.value) : super.named();` is valid syntax to call the named constructor `Base.named()`.
packages/freezed/lib/src/ast.dart (1)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/test/deep_copy_test.dart (1)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/test/generic_test.dart (1)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/test/decorator_test.dart (2)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.701Z
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.
packages/freezed/lib/src/templates/copy_with.dart (1)
Learnt from: rrousselGit
PR: rrousselGit/freezed#1157
File: packages/freezed/test/integration/extend.dart:10-14
Timestamp: 2025-02-23T20:01:34.876Z
Learning: In Dart, when calling a named super constructor, the syntax `super.value` can be used in the constructor parameters along with `super.named()` in the initializer list. For example: `const Subclass._(super.value) : super.named();` is valid syntax to call the named constructor `Base.named()`.
packages/freezed/lib/src/freezed_generator.dart (1)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/lib/src/templates/parameter_template.dart (1)
Learnt from: rrousselGit
PR: rrousselGit/freezed#1157
File: packages/freezed/test/integration/extend.dart:10-14
Timestamp: 2025-02-23T20:01:34.876Z
Learning: In Dart, when calling a named super constructor, the syntax `super.value` can be used in the constructor parameters along with `super.named()` in the initializer list. For example: `const Subclass._(super.value) : super.named();` is valid syntax to call the named constructor `Base.named()`.
packages/freezed/test/map_test.dart (1)
Learnt from: rrousselGit
PR: rrousselGit/freezed#1157
File: packages/freezed/test/integration/extend.dart:10-14
Timestamp: 2025-02-23T20:01:34.876Z
Learning: In Dart, when calling a named super constructor, the syntax `super.value` can be used in the constructor parameters along with `super.named()` in the initializer list. For example: `const Subclass._(super.value) : super.named();` is valid syntax to call the named constructor `Base.named()`.
packages/freezed/test/manual_test.dart (1)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
packages/freezed/test/integration/single_class_constructor.dart (1)
Learnt from: rrousselGit
PR: rrousselGit/freezed#1157
File: packages/freezed/test/integration/extend.dart:10-14
Timestamp: 2025-02-23T20:01:34.876Z
Learning: In Dart, when calling a named super constructor, the syntax `super.value` can be used in the constructor parameters along with `super.named()` in the initializer list. For example: `const Subclass._(super.value) : super.named();` is valid syntax to call the named constructor `Base.named()`.
packages/freezed/lib/src/models.dart (3)
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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.
Learnt from: lishaduck
PR: rrousselGit/freezed#1147
File: packages/freezed_lint/pubspec.yaml:12-12
Timestamp: 2025-01-07T20:51:22.701Z
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: rrousselGit
PR: rrousselGit/freezed#1157
File: packages/freezed/test/integration/extend.dart:10-14
Timestamp: 2025-02-23T20:01:34.876Z
Learning: In Dart, when calling a named super constructor, the syntax `super.value` can be used in the constructor parameters along with `super.named()` in the initializer list. For example: `const Subclass._(super.value) : super.named();` is valid syntax to call the named constructor `Base.named()`.
🪛 LanguageTool
packages/freezed/CHANGELOG.md

[grammar] ~1-~1: Ensure spelling is correct
Context: ...port Dart 3.8.0 and analyzer 7.5.9 as a minumum. ## 3.1.0 - 2025-07-02 - Added when/...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (72)
.github/workflows/build.yml (2)

24-33: packages/freezed_lint is completely excluded – confirm this is intentional

With the matrix now containing only the stable channel, the exclusion rules on L29-33 remove every combination that involves packages/freezed_lint.
As a result, the “Lint golden test” block at L80-87 will never execute and freezed_lint won’t be built, analyzed, or tested in CI.

If the intent was merely to avoid the custom-lint issue on non-stable channels, you may want to:

  1. Drop the package exclusion and keep only the dependencies: downgrade exclusion; or
  2. Split the job or add a conditional so that packages/freezed_lint still runs its golden test on the stable channel.

Please double-check that skipping this package is acceptable for the project.


40-40: Caching condition looks good

cache: ${{ matrix.channel == 'stable' }} resolves to the literal strings "true"/"false", which the subosito/flutter-action input correctly interprets as booleans. No action needed.

packages/freezed/pubspec.yaml (1)

9-14: Raising the lower SDK bound is a breaking change – consider 4.0.0

Per pub semver, increasing the minimum Dart SDK (3.6 → 3.8) is breaking for users pinned to 3.6/3.7.
Publishing as 3.1.0 may violate versioning expectations.

Please confirm whether a major bump (e.g. 4.0.0) is more appropriate, or explicitly justify keeping the minor bump.

packages/freezed/test/generics_refs_test.dart (1)

17-21: Readability tweak looks good

The multi-line formatting improves scan-ability without altering behavior.

packages/freezed/lib/src/string.dart (1)

17-24: No issues – formatting only

The refactor is purely cosmetic and keeps the original semantics intact.

packages/freezed/test/integration/multiple_constructors.dart (2)

143-147: Whitespace insertion is harmless

The blank line increases visual separation inside the parameter list; compilation is unaffected.


151-155: Whitespace insertion is harmless

Same comment as above—purely stylistic.

packages/freezed/test/common_types_test.dart (1)

21-25: Refactor for clarity acknowledged

Splitting the awaited call onto multiple lines aids readability; no functional impact observed.

packages/freezed/lib/src/templates/abstract_template.dart (1)

23-24: Line break improves readability

The logical expression is now easier to read. ✅

packages/freezed/lib/src/templates/properties.dart (2)

26-36: LGTM: Improved constructor formatting.

The reformatting of the fromParameter constructor call enhances readability by making the parameter passing more compact and consistent.


84-89: LGTM: Consistent method return formatting.

The reformatting of the abstractGetter, asGetter, and abstractSetter methods creates consistent, readable parameter passing patterns across all three methods.

Also applies to: 92-97, 100-105

packages/freezed/test/source_gen_test.dart (1)

43-49: LGTM: Improved test assertion formatting.

The reformatting of the expect statement makes the substring operation more readable and maintains proper line alignment.

packages/freezed/test/source_gen_src.dart (1)

16-16: LGTM: Constructor formatting simplified.

The conversion to a single-line constructor maintains the same functionality while improving conciseness.

packages/freezed/lib/src/ast.dart (2)

9-13: LGTM: Improved for loop formatting.

The multi-line formatting of the for loop enhances readability by clearly separating the initialization, condition, and increment parts.


68-70: LGTM: Consistent method chain formatting.

The reformatting of the method chains for generics variable assignment creates consistent, readable patterns in both the fullName and escapedName methods.

Also applies to: 85-87

packages/freezed/lib/src/tools/type.dart (1)

46-50: LGTM: Simplified lambda expressions.

The conversion to implicit returns in the nested lambda expressions improves code conciseness while maintaining the same functionality.

packages/freezed/lib/src/tools/recursive_import_locator.dart (3)

35-41: LGTM: Improved formatting of chained method calls

The reformatting improves readability by consistently aligning the chained method calls with proper indentation.


50-60: LGTM: Better indentation for method parameters and boolean expressions

The indentation adjustments enhance code readability while maintaining the same logic.


164-167: LGTM: Consistent parameter formatting

The parameter alignment in the Object.hash call is more readable and follows consistent formatting conventions.

packages/freezed/test/deep_copy_test.dart (3)

27-31: LGTM: Improved formatting of async method calls

The reformatting makes the async getErrors call more readable by properly separating the method and its arguments.


44-48: LGTM: Consistent formatting with other test methods

The formatting matches the pattern used in other test methods, maintaining consistency across the test file.


712-732: LGTM: Better organization of complex method calls

The formatting improvements make the complex resolveSources call and subsequent getErrors call more readable.

packages/freezed/test/integration/single_class_constructor.dart (3)

15-15: LGTM: Consolidated factory constructor parameter

The single-line formatting is more concise and appropriate for this simple factory constructor parameter.


306-306: LGTM: Added visual separation

The blank line improves visual separation between the positional and named parameters in the factory constructor.


535-536: LGTM: Consolidated comment and annotation

The formatting consolidation maintains readability while being more concise.

packages/freezed/lib/src/models.dart (7)

119-121: LGTM: Improved type arguments formatting

The formatting makes the type arguments mapping more readable with proper indentation.


153-154: LGTM: Better error message formatting

The multi-line error message is more readable with proper indentation.


279-283: LGTM: Consistent variable assignment formatting

The formatting improves readability of the complex variable assignment with proper line breaks.


530-531: LGTM: Constructor formatting improvement

The constructor parameters are properly aligned and the assertion is clearly separated.


780-792: LGTM: Complex type map formatting

The formatting of the complex type map declaration significantly improves readability with proper indentation and line breaks.


967-971: LGTM: Method call formatting

The leastUpperBound method call is more readable with proper parameter alignment.


1089-1091: LGTM: Generics parameter template formatting

The formatting of the generics parameter template is cleaner and more readable.

packages/freezed/example/test/diagnosticable_test.dart (1)

12-12: LGTM: Consolidated expect statement

The single-line formatting is more concise and appropriate for this simple test assertion.

packages/freezed/test/bidirectional_test.dart (1)

16-20: LGTM: Formatting improvement enhances readability.

The multi-line formatting of the async call and cast improves code readability without changing functionality.

packages/freezed/example/lib/time_slot.dart (1)

10-10: LGTM: Concise factory constructor formatting.

The single-line formatting of the factory constructor improves code conciseness while maintaining all functionality.

packages/freezed/test/typedef_parameter_test.dart (1)

17-21: LGTM: Consistent formatting improvement.

The multi-line formatting matches the pattern used in other test files and enhances readability without changing functionality.

packages/freezed/test/manual_test.dart (2)

24-24: LGTM: Improved constructor initializer formatting.

The indentation improvement enhances code readability while preserving functionality.


112-114: LGTM: Enhanced test case readability.

The multi-line formatting of the constructor call improves test readability without changing test logic.

packages/freezed/example/test/json_test.dart (2)

6-13: LGTM: Concise test assertion formatting.

The inline map literals make the test assertions more concise and readable while preserving all test logic.


18-18: LGTM: Consistent inline formatting.

The inline map literal formatting matches the style used in other test assertions in this file.

packages/freezed/test/json_test.dart (1)

750-754: LGTM! Improved readability through multi-line formatting.

The reformatting of the errorResult assignment enhances readability by breaking down the complex awaited call and cast into properly indented lines.

packages/freezed/test/common.dart (2)

10-21: LGTM! Improved formatting for better readability.

The multi-line reformatting of the resolveSources call enhances code readability through consistent indentation and parameter alignment.


23-25: LGTM! Consistent formatting with improved readability.

The multi-line formatting of the errorResult assignment matches the pattern used in other test files and improves code clarity.

packages/freezed/test/single_class_constructor_test.dart (1)

30-39: LGTM! Consistent formatting improvements throughout the file.

The reformatting enhances code readability through:

  • Multi-line formatting for complex function calls
  • Consistent indentation and alignment
  • Better visual structure for object instantiations and method calls

All changes are purely stylistic with no functional impact.

Also applies to: 214-216, 251-254, 258-261, 266-269, 276-279, 378-382, 393-395, 635-649, 651-653

packages/freezed/test/integration/json.dart (1)

347-347: LGTM! Consistent formatting for factory constructors.

The reformatting of fromJson factory constructors to single-line expressions improves consistency and readability while maintaining identical functionality.

Also applies to: 382-382, 397-397, 412-412, 427-427, 443-443, 571-571, 584-584, 617-621

packages/freezed/test/generic_test.dart (1)

48-52: LGTM! Formatting improvements for better readability.

The multi-line reformatting of complex expressions and consistent parameter alignment enhance code readability while maintaining identical functionality.

Also applies to: 67-70, 74-76

packages/freezed/test/decorator_test.dart (5)

15-23: LGTM: Improved formatting for async error retrieval calls.

The reformatting of await main.session.getErrors calls with multi-line indentation enhances readability while maintaining identical functionality.


30-39: LGTM: Enhanced readability for resolveSources call.

The multi-line formatting with proper indentation and trailing commas improves code clarity without affecting test behavior.


50-52: LGTM: Improved formatting for chained method calls.

The multi-line formatting of the chained method calls enhances readability while preserving the same functionality.


61-87: LGTM: Consistent formatting improvements for resolveSources.

The multi-line formatting with proper indentation and parameter alignment improves code readability without altering test logic.


89-91: LGTM: Consistent formatting for error retrieval.

The multi-line formatting aligns with the established pattern and improves readability.

packages/freezed/example/lib/main.dart (4)

24-27: LGTM: Cleaner factory constructor formatting.

The reformatting of the factory constructor parameters improves readability while maintaining the same functionality.


54-58: LGTM: Improved switch expression formatting.

The multi-line formatting with proper indentation enhances readability of the switch expression.


64-75: LGTM: Consistent switch expression formatting.

The multi-line formatting provides better readability and maintains consistency with other switch expressions in the file.


82-84: LGTM: Enhanced print statement formatting.

The multi-line formatting improves readability for complex print statements.

packages/freezed/test/when_test.dart (4)

34-49: LGTM: Improved formatting for expectLater calls.

The multi-line formatting with explicit parentheses and indentation enhances readability of the test assertions while maintaining identical functionality.


286-299: LGTM: Enhanced resolveSources formatting.

The multi-line formatting with proper indentation improves code clarity without affecting test behavior.


301-303: LGTM: Consistent async error retrieval formatting.

The multi-line formatting aligns with the established pattern and improves readability.


411-413: LGTM: Improved method call formatting.

The multi-line formatting enhances readability while preserving the same functionality.

packages/freezed/lib/src/freezed_generator.dart (2)

43-46: LGTM: Improved formatting for nullable property assignment.

The multi-line formatting enhances readability of the complex boolean expression while maintaining identical functionality.


119-128: LGTM: Enhanced formatting for copyWith assignment.

The multi-line formatting with proper indentation improves readability of the complex conditional expression and method chaining.

packages/freezed/test/optional_maybe_test.dart (4)

11-14: LGTM: Cleaner map syntax and improved lambda formatting.

The removal of braces around the single-entry map and the multi-line formatting of the lambda expression enhance readability.


17-21: LGTM: Enhanced async error retrieval formatting.

The multi-line formatting with proper indentation improves readability while maintaining identical functionality.


27-43: LGTM: Improved expectLater formatting.

The multi-line formatting with explicit parentheses and indentation enhances readability of the test assertions.


97-98: LGTM: Consistent formatting for expect statements.

The formatting improvements enhance readability while preserving the same test behavior.

packages/freezed/lib/src/templates/copy_with.dart (2)

65-71: No functional change – looks good

This hunk is a pure re-indent of the multi-line literal assigned to body; the generated output remains byte-for-byte identical.
No action required.


249-253: LGTM

Pure re-indent; logic unchanged.

packages/freezed/lib/src/templates/concrete_template.dart (4)

31-34: Style-only change acknowledged

Just splits a long boolean expression across multiple lines; behaviour unchanged.


141-146: No observable behavioural change – safe re-format.


233-284: Guard clauses remain intact – implementation still correct

Verified that the unmodifiable-collection wrappers and nullability checks are preserved exactly; only whitespace/indentation changed.


303-310: Trivial re-indent; nothing to add.

packages/freezed/lib/src/templates/from_json_template.dart (1)

35-40: Formatting-only change looks correct

Indentation and triple-quoted string placement align with the rest of the template code and do not alter the generated output. No action needed.

Comment on lines +13 to 14
analyzer: ">=7.5.9 <8.0.0"
build: ^2.5.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Double-check downstream custom_lint / freezed_lint compatibility

analyzer >= 7.5.9 can still collide with custom_lint < 0.6, which is currently pinned below 7.x (see invertase/dart_custom_lint#300).
Consider documenting this in the README or guarding with explanatory release notes to prevent solver conflicts for users consuming both freezed and freezed_lint.

🤖 Prompt for AI Agents
In packages/freezed/pubspec.yaml around lines 13 to 14, the analyzer version
constraint ">=7.5.9 <8.0.0" may cause compatibility issues with custom_lint
versions below 0.6, which are pinned below analyzer 7.x. To fix this, add a note
in the README or release notes explaining this potential conflict and advising
users about the version constraints when using both freezed and freezed_lint
together, helping prevent dependency solver conflicts.

Comment on lines 38 to 40
if (globalData.hasDiagnostics && data.options.asString)
'DiagnosticableTreeMixin'
'DiagnosticableTreeMixin',
].join();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Use a separator in join to avoid future string concatenation bugs

If additional interfaces are appended later, the current join() (empty separator) will concatenate names without commas or spaces ('FooBar'). Safer to specify ', '.

-    var interfaces = [
-      if (globalData.hasDiagnostics && data.options.asString)
-        'DiagnosticableTreeMixin',
-    ].join();
+    var interfaces = [
+      if (globalData.hasDiagnostics && data.options.asString)
+        'DiagnosticableTreeMixin',
+    ].join(', ');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (globalData.hasDiagnostics && data.options.asString)
'DiagnosticableTreeMixin'
'DiagnosticableTreeMixin',
].join();
var interfaces = [
if (globalData.hasDiagnostics && data.options.asString)
'DiagnosticableTreeMixin',
].join(', ');
🤖 Prompt for AI Agents
In packages/freezed/lib/src/templates/abstract_template.dart around lines 38 to
40, the join method is called without a separator, which concatenates interface
names directly and can cause issues if more interfaces are added later. Fix this
by specifying a separator string like ', ' in the join call to ensure interface
names are properly separated.

@rrousselGit
Copy link
Copy Markdown
Owner

Thanks for this :)

@rrousselGit rrousselGit merged commit cc4e25e into rrousselGit:master Jul 16, 2025
4 checks passed
@davidmorgan davidmorgan deleted the use-dart-3-8 branch July 16, 2025 14:06
@coderabbitai coderabbitai bot mentioned this pull request Sep 3, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants