Coder Social home page Coder Social logo

[hive_generator] Error when running about hive HOT 4 CLOSED

isar avatar isar commented on July 21, 2024
[hive_generator] Error when running

from hive.

Comments (4)

simc avatar simc commented on July 21, 2024 2

This is a bug in the dart analyzer. Please downgrade it using

dev_dependencies:
  analyzer: 0.38.2

from hive.

SergeShkurko avatar SergeShkurko commented on July 21, 2024

@leisim it works, thanks!

from hive.

GAM3RG33K avatar GAM3RG33K commented on July 21, 2024

@leisim
I tried downgrading to analyzer v0.38.2 but it doesn't work for me.

By the way, I am not getting this while generating hive adapter but when using it to read from cache on app's restart.

It's a company project so I can't provide code. But I can provide a basic object structure outline for reference.

{
  "meta_data": {}, //small data object, (10-15 string properties)

  "raw_data": [] //a very bug list of small objects( 5-8 numeric properties) with upto 5K objects at a time
}

Can you tell me what the maximum in-memory object size that type adapter can parse at a time?
Thanks in advance.

Update 1 :

When I used jsonString format to store and retrieve the same object via HiveBox then it worked fine and did not throw any error.

Additional info:

Flutter doctor output:

[√] Flutter (Channel beta, v1.17.0, on Microsoft Windows [Version 6.1.7601], locale en-US)
    • Flutter version 1.17.0 at C:\SDK\FlutterSDK\flutter
    • Framework revision e6b34c2b5c (3 weeks ago), 2020-05-02 11:39:18 -0700
    • Engine revision 540786dd51
    • Dart version 2.8.1

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\SDK\Android_SDK
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\SDK\Android_SDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.45.1)
    • VS Code at C:\Users\admin\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.10.1

[√] Connected device (3 available)
    • Android SDK built for x86 • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • Chrome                    • chrome        • web-javascript • Google Chrome 79.0.3945.130
    • Web Server                • web-server    • web-javascript • Flutter Tools

• No issues found!

======================
dev dependencies

dev_dependencies:
  test: ^1.9.4
  analyzer: 0.38.2 # as per https://github.com/hivedb/hive/issues/63
  build_runner: ^1.0.0
  hive_generator: 0.5.2
  json_serializable: 3.2.3 # https://pub.dev/packages/json_serializable#-readme-tab-
  retrofit_generator: 1.0.2+2 # https://pub.dev/packages/retrofit_generator#-readme-tab-

from hive.

bhavikvashi1804 avatar bhavikvashi1804 commented on July 21, 2024

This is a bug in the dart analyzer. Please downgrade it using

dev_dependencies:
  analyzer: 0.38.2

as of now when I perform this then I will tell that first run the pub get after running pub get it automatically change the analyzer version to the latest

from hive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.