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

Fixes #1036 Bump source_gen version #1038

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sunbromarko
Copy link

@sunbromarko sunbromarko commented Feb 26, 2025

Just updated source_gen package version to support last SDK, and avoid conflicts with over libs

Fixes #1036


Pull Request Checklist

  • [Done] If the changes are being made to code, ensure the version in pubspec.yaml is updated.
  • [Done] Increment the major/minor/patch/patch-count, depending on the complexity of change
  • [No need] Add the necessary unit tests to ensure the coverage does not drop
  • [Done] Update the Changelog to include all changes made in this PR, organized by version
  • [Done] Run the melos run set_version command from the root directory
  • [Please help] Include the necessary reviewers for the PR
  • [No need] Update the docs if there are any API changes or additions to functionality

@sunbromarko sunbromarko marked this pull request as draft February 27, 2025 00:11
Copy link

@OlehMarch OlehMarch left a comment

Choose a reason for hiding this comment

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

LGTM

@sunbromarko
Copy link
Author

sunbromarko commented Feb 27, 2025

I add fix for deprecated fields, pls can you look again ? @OlehMarch

@sunbromarko sunbromarko marked this pull request as ready for review February 27, 2025 19:07
FEAT: melos run command result
FIX: update analyzer version
FIX: removed in Dart 3.7 deprecated fields
@sunbromarko sunbromarko force-pushed the FEAT--Bump-source_get-version branch from ed41c61 to 54d6be4 Compare February 27, 2025 19:21
Copy link
Member

@pavanpodila pavanpodila left a comment

Choose a reason for hiding this comment

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

LGTM

@pavanpodila
Copy link
Member

There are some build failures. Once we fix those, we should be good to merge @SunBro-Marko ... thanks for the contribution 🚀!

@davidmartos96
Copy link
Contributor

Is there any particular reason for not supporting analyzer <8.0.0 ? I believe the Dart team is quite strict regarding breaking changes in the analyzer package.

final returnType = MockType();
// ignore: deprecated_member_use
when(() => returnType.isDynamic).thenReturn(returnsDynamic);
final returnType = returnsDynamic ? DynamicMockType() : MockType();
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is failing the static analysis when using the latest dependencies.
This static analysis bug was fixed in Dart 3.4.0 but mobx supports Dart 3.0.0 as a minimum. To keep supporting this version it can be simply changed to an if else block. Source: dart-lang/sdk#60255

  final DartType returnType;
  if (returnsDynamic) {
    returnType = DynamicMockType();
  } else {
    returnType = MockType();
  }

build: ^2.2.1
build_resolvers: ^2.0.6
meta: ^1.3.0
mobx: ^2.5.0
path: ^1.8.0
source_gen: ^1.2.1
source_gen: ^2.0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be changed to a range constraint, otherwise the project will require Dart 3.6 as a minimum, and the usage of source_gen is compatible with v1

source_gen: ">=1.2.1 <3.0.0"

@@ -14,13 +14,13 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
analyzer: ">=6.0.0 <7.0.0"
analyzer: ">=6.0.0 <= 7.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed that the changes in type_names.dart will require analyzer 6.9.0 as a minimum. And I believe that it requires Dart 3.6

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.

Upgrage source_gen dependency to ^2.0.0
5 participants