Sdk: Fasta type errors when running pub get on dev.64.1

Created on 21 Jun 2018  路  10Comments  路  Source: dart-lang/sdk

$ dart --version
Dart VM version: 2.0.0-dev.64.1 (Thu Jun 21 08:47:55 2018 +0200) on "linux_x64"

Cron executed build job failed this morning with many errors like this:

Failed to precompile build_runner:graph_inspector:
file:///home/travis/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.9/lib/src/fasta/source/outline_builder.dart:736:49: Error: A value of type 'dart.core::List<dynamic>' can't be assigned to a variable of type 'dart.core::Iterable<fasta.formal_parameter_builder::FormalParameterBuilder<fasta.type_builder::TypeBuilder>>'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::Iterable<fasta.formal_parameter_builder::FormalParameterBuilder<fasta.type_builder::TypeBuilder>>'.
        formals.setRange(count, formals.length, last);
                                                ^

Full log of the build:
https://travis-ci.org/pulyaevskiy/node-interop/builds/395130053

area-front-end needs-info

All 10 comments

FYI, I was seeing that error too this morning, but updating some package versions made it go away. Try updating to build_runner: ^0.8.10.

https://github.com/pulyaevskiy/node-interop/blob/ca278684e00e3b915894d1fe5a950ceb52a2d960/node_interop/pubspec.yaml#L13-L16

(You might want to update to test 1.0.0 while you are there.)

cc @natebosch @kevmoo

seeing this error on a lower sdk dev.60 as well just FYI

Just wondering, did updating to a later build_runner version help resolve the issue, @pulyaevskiy ?

@anders-sandholm , thanks for checking in!

Yes, looks like upgrading to latest versions of everything seems to have solved the issue (I suspect main culprit in my deps was outdated analyzer version which was using older front_end package).

I'm still going through some new strong mode fixes, but dependencies are resolved without issues now: https://travis-ci.org/pulyaevskiy/node-interop/builds/395544708

Thanks @chalin for help!

Thanks for confirming.

I'm getting this error with all packages at their latest versions. The error appears for "build_runner:graph_inspector", "test:test" and "build_runner:build_runner".

Dart version:

Dart VM version: 2.0.0-dev.65.0 (Tue Jun 26 14:17:21 2018 +0200) on "macos_x64"

Packages used in the project:

dependencies:
angular: 5.0.0-alpha+15
angular_components: 0.9.0-alpha+15
firebase: 4.5.1
angular_router: 2.0.0-alpha+14
angular_forms: 2.0.0-alpha+7
http: 0.11.3+16
http_parser: 3.1.2
js: 0.6.1
validator: 0.0.7
dart_sass_transformer: 0.5.0+1
pikaday_datepicker: 2.0.0

dev_dependencies:
angular_test: 2.0.0-alpha+13
build_runner: 0.9.0
build_test: 0.10.2+5
build_web_compilers: 0.4.0+4
test: 1.2.0
sass_builder: 2.0.3

Error message:

Failed to precompile build_runner:graph_inspector:
file:///Users/mikael/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.9/lib/src/fasta/source/outline_builder.dart:736:49: Error: A value of type 'dart.core::List' can't be assigned to a variable of type 'dart.core::Iterable>'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::Iterable>'.
formals.setRange(count, formals.length, last);

Run pub upgrade and trying again. (You might also need to rerun pub global activate foo for the foo commands that you use (such as webdev and/or stagehand). If that doesn't help, then we'll need more info.

@chalin D'oh. So yeah, pub upgrade and not just pub get...

pub upgrade didn't help in my case. I had to change dev_dependencies from build_runner: ^0.8.0 to build_runner: ^0.9.0 - this helped

Hm, also getting this, error. I have 2.0.0-dev.65.0, as well as build_runner@^0.9.0.

Some relevant info from my lockfile:

  build:
    dependency: "direct main"
    description:
      name: build
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.12.7"
  build_config:
    dependency: "direct main"
    description:
      name: build_config
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.3.1"
  build_runner:
    dependency: "direct dev"
    description:
      name: build_runner
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.9.1"
  build_runner_core:
    dependency: transitive
    description:
      name: build_runner_core
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.2.1"
  front_end:
    dependency: transitive
    description:
      name: front_end
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.1.0-alpha.9"
  quiver:
    dependency: transitive
    description:
      name: quiver
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.24.0"

EDIT: Upgraded source from 0.7.0 -> 0.8.0, everything works!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DartBot picture DartBot  路  3Comments

bergwerf picture bergwerf  路  3Comments

ranquild picture ranquild  路  3Comments

jmesserly picture jmesserly  路  3Comments

matanlurey picture matanlurey  路  3Comments