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

Upgrade to newer flutter analyzer #1357

Closed
brookman opened this issue Jul 18, 2023 · 3 comments · Fixed by #1365
Closed

Upgrade to newer flutter analyzer #1357

brookman opened this issue Jul 18, 2023 · 3 comments · Fixed by #1365

Comments

@brookman
Copy link

brookman commented Jul 18, 2023

Problem

The current version realm_generator 1.3.0 depends on an older version of the Flutter analyzer package.
This version contains regressions which are fixed in analyzer 6.0.0. The new version makes the code gen step of our project 400% faster again.

dependency_overrides does not work:

realm_generator-1.3.0/lib/src/field_element_ex.dart:190:25: Error: The getter 'enclosingElement3' isn't defined for the class 'FieldElement'.
 - 'FieldElement' is from 'package:analyzer/dart/element/element.dart' ('../../../caches/pub_cache/hosted/pub.dev/analyzer-6.0.0/lib/dart/element/element.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'enclosingElement3'.
      final modelSpan = enclosingElement3.span!;

Solution

Upgrade the dependency.

Alternatives

No response

How important is this improvement for you?

Would be a major improvement

Feature would mainly be used with

Local Database only

@desistefanova
Copy link
Contributor

Hi @brookman!
Thanks for the reporting! We will definitely do that in some of the next releases.
I hope it is not a blocker for you.

@nielsenko
Copy link
Contributor

@brookman Are you using flutter master channel?

@nielsenko
Copy link
Contributor

The following minimal pubspec.yaml illustrates the problem with your request:

name: upgrade_analyzer
environment:
  sdk: '>=3.0.6 <4.0.0'

dependencies:
  analyzer: ^6.0.0
  flutter:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter
  test: any # no version of test will work with analyzer ^6.0.0 and current flutter stable (3.10.6)

You will not be able resolve this with current stable version of flutter. I think it is a bit unacceptable for a package like realm to require people to use the master channel or stop using the test package 😄

That said, we will revisit on each new stable release of flutter.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants