angulardart / angular

Fast and productive web framework provided by Dart
https://pub.dev/packages/angular
MIT License
1.83k stars 230 forks source link

dart_style 1.2.4 error on pub get #1742

Closed alescdb closed 5 years ago

alescdb commented 5 years ago

Thank you for taking the time to file an issue!

In order to route, prioritize, and act on this as soon as possible please include:

Dart VM version: 2.2.0 (Unknown timestamp) on "linux_x64"

angular: ^5.2.0

Linux

I don't know if I'm in the right place, but it seems there is a dependency problem between angular and (I think) build_runner :

environment:
  sdk: '>=2.1.0 <3.0.0'

dependencies:
  angular: ^5.2.0

dev_dependencies:
  build_runner: ^1.2.8
  build_web_compilers: ^1.1.0

dependency_overrides:
  analyzer: ^0.34.3

Failed on pub get with errors :

[...]
Precompiling executables... (3.7s)
Failed to precompile build_runner:build_runner:
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:1840:24: Error: Type 'SetOrMapLiteral' not found.
  visitSetOrMapLiteral(SetOrMapLiteral node) {
                       ^^^^^^^^^^^^^^^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:506:23: Error: 'SetOrMapLiteral' isn't a type.
    if (expression is SetOrMapLiteral) return false;
                      ^^^^^^^^^^^^^^^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:1608:14: Error: The getter 'elements2' isn't defined for the class 'ListLiteral'.
 - 'ListLiteral' is from 'package:analyzer/dart/ast/ast.dart' ('file:///home/alex/.pub-cache/hosted/pub.dartlang.org/analyzer-0.34.3/lib/dart/ast/ast.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'elements2'.
        node.elements2.length <= 1 ? Cost.singleElementList : Cost.normal;
             ^^^^^^^^^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:1610:38: Error: The getter 'elements2' isn't defined for the class 'ListLiteral'.
 - 'ListLiteral' is from 'package:analyzer/dart/ast/ast.dart' ('file:///home/alex/.pub-cache/hosted/pub.dartlang.org/analyzer-0.34.3/lib/dart/ast/ast.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'elements2'.
        node, node.leftBracket, node.elements2, node.rightBracket, cost);
                                     ^^^^^^^^^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:1840:24: Error: 'SetOrMapLiteral' isn't a type.
  visitSetOrMapLiteral(SetOrMapLiteral node) {
                       ^^^^^^^^^^^^^^^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:1842:20: Error: The getter 'leftBracket' isn't defined for the class 'invalid-type'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'leftBracket'.
        node, node.leftBracket, node.elements2, node.rightBracket);
                   ^^^^^^^^^^^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:1842:38: Error: The getter 'elements2' isn't defined for the class 'invalid-type'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'elements2'.
        node, node.leftBracket, node.elements2, node.rightBracket);
                                     ^^^^^^^^^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:1842:54: Error: The getter 'rightBracket' isn't defined for the class 'invalid-type'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'rightBracket'.
        node, node.leftBracket, node.elements2, node.rightBracket);
                                                     ^^^^^^^^^^^^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:1842:9: Error: The argument type 'invalid-type' can't be assigned to the parameter type 'TypedLiteral'.
 - 'TypedLiteral' is from 'package:analyzer/dart/ast/ast.dart' ('file:///home/alex/.pub-cache/hosted/pub.dartlang.org/analyzer-0.34.3/lib/dart/ast/ast.dart').
Try changing the type of the parameter, or casting the argument to 'TypedLiteral'.
        node, node.leftBracket, node.elements2, node.rightBracket);
        ^
file:///home/alex/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.4/lib/src/source_visitor.dart:2179:62: Error: 'SetOrMapLiteral' isn't a type.
    if (node.expression is ListLiteral || node.expression is SetOrMapLiteral) {
                                                             ^^^^^^^^^^^^^^^

Overriding dependency with dart_style: "<1.2.4" works.

environment:
  sdk: '>=2.1.0 <3.0.0'

dependencies:
  angular: ^5.2.0

dev_dependencies:
  build_runner: ^1.2.8
  build_web_compilers: ^1.1.0

dependency_overrides:
  analyzer: ^0.34.3
  dart_style: "<1.2.4"

Dep tree :

Dart SDK 2.2.0
deontologie 0.0.0
|-- analyzer 0.34.3
|   |-- args...
|   |-- charcode 1.1.2
|   |-- collection...
|   |-- convert 2.1.1
|   |   |-- charcode...
|   |   '-- typed_data...
|   |-- crypto...
|   |-- front_end 0.1.9+1
|   |   |-- charcode...
|   |   |-- convert...
|   |   |-- crypto...
|   |   |-- kernel...
|   |   |-- meta...
|   |   |-- package_config...
|   |   |-- path...
|   |   |-- source_span...
|   |   '-- yaml...
|   |-- glob...
|   |-- html 0.13.4+1
|   |   |-- csslib...
|   |   |-- source_span...
|   |   '-- utf 0.9.0+5
|   |-- kernel 0.3.9+1
|   |   |-- args...
|   |   '-- path...
|   |-- meta...
|   |-- package_config 1.0.5
|   |   |-- charcode...
|   |   '-- path...
|   |-- path...
|   |-- plugin 0.2.0+3
|   |-- pub_semver...
|   |-- source_span...
|   |-- watcher...
|   '-- yaml...
|-- angular 5.2.0
|   |-- analyzer...
|   |-- angular_ast 0.5.8
|   |   |-- analyzer...
|   |   |-- charcode...
|   |   |-- collection...
|   |   |-- meta...
|   |   |-- source_span...
|   |   '-- string_scanner 1.0.4
|   |       |-- charcode...
|   |       |-- meta...
|   |       '-- source_span...
|   |-- angular_compiler 0.4.2
|   |   |-- analyzer...
|   |   |-- args...
|   |   |-- build...
|   |   |-- code_builder...
|   |   |-- collection...
|   |   |-- dart_style...
|   |   |-- logging...
|   |   |-- meta...
|   |   |-- path...
|   |   |-- source_gen...
|   |   |-- source_span...
|   |   '-- stack_trace...
|   |-- build...
|   |-- build_config...
|   |-- code_builder 3.2.0
|   |   |-- built_collection...
|   |   |-- built_value 6.3.2
|   |   |   |-- built_collection...
|   |   |   |-- collection...
|   |   |   |-- fixnum...
|   |   |   '-- quiver...
|   |   |-- collection...
|   |   |-- matcher...
|   |   '-- meta...
|   |-- collection...
|   |-- csslib 0.14.6
|   |   |-- args...
|   |   |-- logging...
|   |   |-- path...
|   |   '-- source_span...
|   |-- intl...
|   |-- js...
|   |-- logging...
|   |-- meta...
|   |-- path 1.6.2
|   |-- source_gen 0.9.4+1
|   |   |-- analyzer...
|   |   |-- async...
|   |   |-- build...
|   |   |-- dart_style...
|   |   |-- glob...
|   |   |-- meta...
|   |   |-- path...
|   |   '-- source_span...
|   |-- source_span 1.5.5
|   |   |-- charcode...
|   |   |-- path...
|   |   '-- term_glyph 1.1.0
|   '-- stack_trace 1.9.3
|       '-- path...
|-- angular_components 0.12.0
|   |-- angular...
|   |-- angular_forms 2.1.1
|   |   |-- angular...
|   |   '-- meta...
|   |-- async 2.0.8
|   |   '-- collection...
|   |-- build 1.1.1
|   |   |-- analyzer...
|   |   |-- async...
|   |   |-- convert...
|   |   |-- crypto...
|   |   |-- glob...
|   |   |-- logging...
|   |   |-- meta...
|   |   '-- path...
|   |-- build_config 0.3.1+4
|   |   |-- build...
|   |   |-- json_annotation 2.0.0
|   |   |-- meta...
|   |   |-- path...
|   |   |-- pubspec_parse...
|   |   '-- yaml...
|   |-- built_collection 4.1.0
|   |   |-- collection...
|   |   '-- quiver...
|   |-- collection 1.14.11
|   |-- fixnum 0.10.9
|   |-- intl 0.15.7
|   |   '-- path...
|   |-- js 0.6.1+1
|   |-- logging 0.11.3+2
|   |-- meta 1.1.7
|   |-- observable 0.22.2
|   |   |-- collection...
|   |   |-- dart_internal 0.1.3
|   |   |-- meta...
|   |   '-- quiver...
|   |-- protobuf 0.10.8
|   |   '-- fixnum...
|   |-- quiver 2.0.1
|   |   |-- matcher 0.12.4
|   |   |   '-- stack_trace...
|   |   '-- meta...
|   '-- sass_builder 2.1.2
|       |-- build...
|       |-- build_config...
|       |-- path...
|       '-- sass 1.17.3
|           |-- args...
|           |-- async...
|           |-- charcode...
|           |-- cli_repl 0.2.0+1
|           |   |-- async...
|           |   '-- js...
|           |-- collection...
|           |-- meta...
|           |-- package_resolver...
|           |-- path...
|           |-- source_maps...
|           |-- source_span...
|           |-- stack_trace...
|           |-- stream_transform...
|           |-- string_scanner...
|           |-- term_glyph...
|           |-- tuple 1.0.2
|           |   '-- quiver...
|           '-- watcher...
|-- build_runner 1.2.8
|   |-- args 1.5.1
|   |-- async...
|   |-- build...
|   |-- build_config...
|   |-- build_daemon 0.4.2
|   |   |-- built_collection...
|   |   |-- built_value...
|   |   |-- package_resolver 1.0.10
|   |   |   |-- collection...
|   |   |   |-- http 0.12.0+1
|   |   |   |   |-- async...
|   |   |   |   |-- http_parser...
|   |   |   |   '-- path...
|   |   |   |-- package_config...
|   |   |   '-- path...
|   |   |-- path...
|   |   |-- pedantic...
|   |   |-- pool...
|   |   |-- shelf...
|   |   |-- shelf_web_socket...
|   |   |-- stream_transform...
|   |   |-- watcher...
|   |   '-- web_socket_channel...
|   |-- build_resolvers 1.0.3
|   |   |-- analyzer...
|   |   |-- build...
|   |   '-- path...
|   |-- build_runner_core 2.0.3
|   |   |-- async...
|   |   |-- build...
|   |   |-- build_config...
|   |   |-- build_resolvers...
|   |   |-- collection...
|   |   |-- convert...
|   |   |-- crypto...
|   |   |-- glob...
|   |   |-- graphs...
|   |   |-- json_annotation...
|   |   |-- logging...
|   |   |-- meta...
|   |   |-- path...
|   |   |-- pedantic...
|   |   |-- pool...
|   |   |-- timing...
|   |   |-- watcher...
|   |   '-- yaml...
|   |-- code_builder...
|   |-- collection...
|   |-- crypto 2.0.6
|   |   |-- collection...
|   |   |-- convert...
|   |   '-- typed_data 1.1.6
|   |-- dart_style 1.2.4
|   |   |-- analyzer...
|   |   |-- args...
|   |   |-- path...
|   |   '-- source_span...
|   |-- glob 1.1.7
|   |   |-- async...
|   |   |-- collection...
|   |   |-- path...
|   |   '-- string_scanner...
|   |-- graphs 0.2.0
|   |-- http_multi_server 2.0.5
|   |   '-- async...
|   |-- io 0.3.3
|   |   |-- charcode...
|   |   |-- meta...
|   |   |-- path...
|   |   '-- string_scanner...
|   |-- js...
|   |-- logging...
|   |-- meta...
|   |-- mime 0.9.6+2
|   |-- path...
|   |-- pedantic 1.5.0
|   |-- pool 1.4.0
|   |   |-- async...
|   |   '-- stack_trace...
|   |-- pub_semver 1.4.2
|   |   '-- collection...
|   |-- pubspec_parse 0.1.4
|   |   |-- json_annotation...
|   |   |-- pub_semver...
|   |   '-- yaml...
|   |-- shelf 0.7.4
|   |   |-- async...
|   |   |-- collection...
|   |   |-- http_parser 3.1.3
|   |   |   |-- charcode...
|   |   |   |-- collection...
|   |   |   |-- source_span...
|   |   |   |-- string_scanner...
|   |   |   '-- typed_data...
|   |   |-- path...
|   |   |-- stack_trace...
|   |   '-- stream_channel...
|   |-- shelf_web_socket 0.2.2+4
|   |   |-- shelf...
|   |   |-- stream_channel...
|   |   '-- web_socket_channel...
|   |-- stack_trace...
|   |-- stream_transform 0.0.16+1
|   |-- timing 0.1.1+1
|   |   '-- json_annotation...
|   |-- watcher 0.9.7+10
|   |   |-- async...
|   |   '-- path...
|   |-- web_socket_channel 1.0.9
|   |   |-- async...
|   |   |-- crypto...
|   |   '-- stream_channel 1.6.8
|   |       '-- async...
|   '-- yaml 2.1.15
|       |-- charcode...
|       |-- collection...
|       |-- source_span...
|       '-- string_scanner...
'-- build_web_compilers 1.2.0
    |-- analyzer...
    |-- archive 2.0.8
    |   |-- args...
    |   |-- crypto...
    |   '-- path...
    |-- bazel_worker 0.1.20
    |   |-- async...
    |   '-- protobuf...
    |-- build...
    |-- build_config...
    |-- build_modules 1.0.9
    |   |-- analyzer...
    |   |-- async...
    |   |-- bazel_worker...
    |   |-- build...
    |   |-- build_config...
    |   |-- glob...
    |   |-- graphs...
    |   |-- json_annotation...
    |   |-- logging...
    |   |-- meta...
    |   |-- path...
    |   |-- pedantic...
    |   '-- scratch_space...
    |-- crypto...
    |-- glob...
    |-- js...
    |-- logging...
    |-- path...
    |-- pool...
    |-- scratch_space 0.0.3+2
    |   |-- build...
    |   |-- crypto...
    |   |-- path...
    |   |-- pedantic...
    |   '-- pool...
    |-- source_maps 0.10.8
    |   '-- source_span...
    |-- source_span...
    '-- stack_trace...
alescdb commented 5 years ago

This looks like it has been resolved.