fzyzcjy / dart_interactive

REPL (interactive shell) for Dart, supporting 3rd party packages, hot reload, and full grammar
https://github.com/fzyzcjy/dart_interactive
MIT License
147 stars 12 forks source link

Impossible to activate: Failed to build #59

Closed Driky closed 1 year ago

Driky commented 1 year ago

Describe the bug I tried running the command

dart pub global activate interactive

I got the following result:

 dart pub global activate interactive
Resolving dependencies...
+ _fe_analyzer_shared 51.0.0
+ analyzer 5.3.1
+ args 2.3.1
+ async 2.10.0
+ cli_repl 0.2.3
+ collection 1.17.0
+ convert 3.1.1
+ crypto 3.0.2
+ file 6.1.4
+ glob 2.1.1
+ interactive 1.2.0
+ js 0.6.5
+ logging 1.1.0
+ meta 1.8.0
+ package_config 2.1.0
+ path 1.8.3
+ pub_semver 2.1.3
+ source_span 1.9.1
+ string_scanner 1.2.0
+ term_glyph 1.2.1
+ typed_data 1.3.1
+ vm_service 9.4.0
+ watcher 1.0.2
+ yaml 3.1.1
Downloading interactive 1.2.0...
Downloading cli_repl 0.2.3...
Downloading path 1.8.3...
Downloading analyzer 5.3.1...
Downloading _fe_analyzer_shared 51.0.0...
Downloading string_scanner 1.2.0...
Downloading pub_semver 2.1.3...
Downloading glob 2.1.1...
Downloading convert 3.1.1...
Downloading async 2.10.0...
Building package executables...
Failed to build interactive:interactive:
AppData/Local/Pub/Cache/hosted/pub.dartlang.org/interactive-1.2.0/lib/src/parser.dart:41:66: Error: The argument type 'CompilationUnitMemberImpl' can't be assigned to the parameter type 'ClassDeclaration'.
 - 'CompilationUnitMemberImpl' is from 'package:analyzer/src/dart/ast/ast.dart' ('AppData/Local/Pub/Cache/hosted/pub.dartlang.org/analyzer-5.3.1/lib/src/dart/ast/ast.dart').
 - 'ClassDeclaration' is from 'package:analyzer/dart/ast/ast.dart' ('AppData/Local/Pub/Cache/hosted/pub.dartlang.org/analyzer-5.3.1/lib/dart/ast/ast.dart').
                _PotentialAccessorParser().parseClassDeclaration(declaration),
                                                                 ^

I also tried to activate the 1.1.0 and got the same result.

Looking at the package on pub.dev, it fails the static analysis with the same error I get: https://pub.dev/packages/interactive/score image

environment:

dart --version
Dart SDK version: 2.18.5 (stable) (Tue Nov 22 15:47:29 2022 +0000) on "windows_x64"
welcome[bot] commented 1 year ago

Hi! Thanks for opening your first issue here! :smile:

fzyzcjy commented 1 year ago

Hmm looks like latest dependency (e.g. package:analyzer) have updated its API. I guess this can be easily solved by looking at the doc and see how to migrate. Feel free to PR to fix it!

mdaffailhami commented 1 year ago

I got same problem T_T

fzyzcjy commented 1 year ago

v1.2.1 released