-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Steps to Reproduce
I've just upgraded flutter/dart to the latest version and unbelievably the compilation of many libraries that use derived function parameters is failing during build apk. Here is the first example:
PS C:\Users\Mark\intellij\pwdmgr1> flutter build apk
Initializing gradle... 6.5s
Resolving dependencies... 21.5s
Running 'gradlew assembleRelease'...
compiler message: file:///C:/Users/Mark/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cipher-0.7.1/lib/macs/hmac.dar
t:51:28: Error: The parameter 'params' of the method 'HMac::init' has type cipher.params.key_parameter::KeyParameter, wh
ich does not match the corresponding type in the overridden method (cipher.api::CipherParameters).
compiler message: Change to a supertype of cipher.api::CipherParameters (or, for a covariant parameter, a subtype).
compiler message: void init(KeyParameter params) {
compiler message: ^
I checked the relevant library source. This parameter 'params' and presumably all the others reported (not shown, but there's a great deal) is indeed a subtype but the covariant keyword is not used. Wouldn't this mean that lots of library code that's worked for years will suddenly lead to compilation failure?
Is there a way to run flutter so that it doesn't call dart using checked mode? --release option supposedly does this, but that has the same result.
Dart version:
Dart VM version: 1.24.3 (Wed Dec 13 18:05:29 2017) on "windows_x64"
What can be done? Try to roll back to dart version pre 1.22?
Flutter Doctor
[√] Flutter (Channel dev, v0.3.5, on Microsoft Windows [Version 10.0.14393], locale en-US)
• Flutter version 0.3.5 at C:\Users\Mark\flutter
• Framework revision 7ffcd3d (8 days ago), 2018-04-24 14:03:41 -0700
• Engine revision ec61147
• Dart version 2.0.0-dev.48.0.flutter-fe606f890b
[√] Android toolchain - develop for Android devices (Android SDK 28.0.0-rc1)
• Android SDK at C:\Users\Mark\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 28.0.0-rc1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
• All Android licenses accepted.
[√] Android Studio (version 2.3)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[√] IntelliJ IDEA Community Edition (version 2017.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3
• Flutter plugin version 22.2.2
• Dart plugin version 173.4548.30
[√] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)
• No issues found!
For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.