Skip to content

pub upgrade "Cannot assign to final variable 'trace='." #26295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zoechi opened this issue Apr 19, 2016 · 1 comment
Closed

pub upgrade "Cannot assign to final variable 'trace='." #26295

zoechi opened this issue Apr 19, 2016 · 1 comment
Labels
area-sdk Use area-sdk for general purpose SDK issues (packaging, distribution, …).
Milestone

Comments

@zoechi
Copy link
Contributor

zoechi commented Apr 19, 2016

Since update to

Dart VM version: 1.16.0-edge.2bb2a12720db04afcf6162d3e4a7e30ed638ae1e (Mon Apr 18 18:12:06 2016) on "linux_x64"

( from Dart VM version: 1.16.0-edge.bab552edaf1080fdca423029128516e1c81a3279 (Fri Apr 15 13:25:32 2016) on "linux_x64")

Deleting .pub didn't have any effect. Looks like a breaking change outside of pub anyway.

(master) $ pub upgrade --trace
Resolving dependencies... (13.3s) 
  analyzer 0.27.3
  args 0.13.4
  async 1.10.0
  barback 0.15.2+7
  boolean_selector 1.0.1
  browser 0.10.0+2
  charcode 1.1.0
  cli_util 0.0.1+2
  code_transformers 0.4.2+2
  collection 1.5.1
  convert 1.0.1
  crypto 0.9.2+1 (1.1.0 available)
  csslib 0.12.2
  dart_style 0.2.4
  glob 1.1.2
  html 0.12.2+1
  http_multi_server 2.0.1
  http_parser 2.2.1
  initialize 0.6.2+2
  logging 0.11.2
  matcher 0.12.0+2
  mime 0.9.3
  package_config 0.1.3
  path 1.3.9
  plugin 0.1.0
  polymer 1.0.0-rc.15 (1.0.0-rc.16 available)
  polymer_elements 1.0.0-rc.8
  polymer_interop 1.0.0-rc.9
  pool 1.2.3
  pub_semver 1.2.4
  reflectable 0.5.4
  shelf 0.6.5
  shelf_static 0.2.3+3
  shelf_web_socket 0.2.0
  source_map_stack_trace 1.0.4
  source_maps 0.10.1+1
  source_span 1.2.2
  stack_trace 1.6.5
  stream_channel 1.3.1
  string_scanner 0.1.4+1
  test 0.12.13
  typed_data 1.1.2
  utf 0.9.0+3
  watcher 0.9.7
  web_components 0.12.3
  web_socket_channel 1.0.2
  when 0.2.0
  which 0.1.3
  yaml 2.1.8
No dependencies changed.
Precompiling dependencies... 
Loading source assets... 
Loading initialize/build/loader_replacer, initialize, polymer_interop/src/build/minify_transformer, reflectable/src/transform_import, web_components/build/mirrors_remover and web_components traLoading initialize/build/loader_replacer, initialize, polymer_interop/src/build/minify_transformer, reflectable/src/transform_import, web_components/build/mirrors_remover and web_components traLoading initialize/build/loader_replacer, initialize, polymer_interop/src/build/minify_transformer, reflectable/src/transform_import, web_components/build/mirrors_remover and web_components traLoading initialize/build/loader_replacer, initialize, polymer_interop/src/build/minify_transformer, reflectable/src/transform_import, web_components/build/mirrors_remover and web_components transformers...
cannot assign to final variable 'trace='.

NoSuchMethodError: cannot assign to final variable 'trace='
dart:core                                           NoSuchMethodError._throwNew
package:pub/src/barback/barback_server.dart 200     BarbackServer._serveAsset.<async>
===== asynchronous gap ===========================
dart:async                                          _Completer.completeError
package:pub/src/barback/barback_server.dart 207     BarbackServer._serveAsset.<async>
===== asynchronous gap ===========================
dart:async                                          _asyncThenWrapperHelper
package:pub/src/barback/barback_server.dart         BarbackServer._serveAsset
package:pub/src/barback/barback_server.dart 118     BarbackServer.handleRequest.<async>.<fn>
===== asynchronous gap ===========================
dart:async                                          _Future.then
package:pub/src/barback/barback_server.dart 118     BarbackServer.handleRequest.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:pub/src/barback/barback_server.dart         BarbackServer.handleRequest
package:shelf/src/middleware.dart 69                createMiddleware.<fn>.<fn>.<fn>.<fn>
dart:async                                          Future.Future.sync
package:shelf/src/middleware.dart 69                createMiddleware.<fn>.<fn>.<fn>
===== asynchronous gap ===========================
dart:async                                          _Future.then
package:shelf/src/middleware.dart 66                createMiddleware.<fn>.<fn>
package:shelf/shelf_io.dart 76                      handleRequest.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:shelf/shelf_io.dart                         handleRequest
package:shelf/shelf_io.dart 52                      serveRequests.<fn>.<fn>
===== asynchronous gap ===========================
dart:async                                          StreamView.listen
package:shelf/shelf_io.dart 52                      serveRequests.<fn>
package:shelf/src/util.dart 20                      catchTopLevelErrors
package:shelf/shelf_io.dart 51                      serveRequests
package:pub/src/barback/base_server.dart 43         BaseServer.BaseServer
package:pub/src/barback/barback_server.dart 69      BarbackServer.BarbackServer._
package:pub/src/barback/barback_server.dart 63      BarbackServer.bind.<fn>
dart:async                                          _SyncCompleter.complete
package:pub/src/io.dart 868                         bindServer.<async>
===== asynchronous gap ===========================
dart:async                                          _Future.then
package:pub/src/barback/barback_server.dart 57      BarbackServer.bind
package:pub/src/barback/asset_environment.dart 476  AssetEnvironment._load.<fn>.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:pub/src/barback/asset_environment.dart      AssetEnvironment._load.<fn>
package:pub/src/log.dart 407                        progress
package:pub/src/barback/asset_environment.dart 458  AssetEnvironment._load
package:pub/src/barback/asset_environment.dart 82   AssetEnvironment.create.<fn>.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:pub/src/barback/asset_environment.dart      AssetEnvironment.create.<fn>
package:pub/src/log.dart 407                        progress
package:pub/src/barback/asset_environment.dart 74   AssetEnvironment.create
package:pub/src/entrypoint.dart 240                 Entrypoint._precompileDependencies.<async>.<fn>.<async>
===== asynchronous gap ===========================
package:pub                                         Entrypoint._precompileDependencies.<async>.<fn>
package:pub/src/log.dart 407                        progress
package:pub/src/entrypoint.dart 234                 Entrypoint._precompileDependencies.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:pub/src/entrypoint.dart                     Entrypoint._precompileDependencies
package:pub/src/entrypoint.dart 204                 Entrypoint.acquireDependencies.<async>
dart:async                                          _SyncCompleter.complete
package:pub/src/entrypoint.dart 443                 Entrypoint._get.<async>
dart:async                                          _SyncCompleter.complete
package:pub/src/source/hosted.dart 122              HostedSource.downloadToSystemCache.<async>
===== asynchronous gap ===========================
dart:async                                          _asyncThenWrapperHelper
package:pub/src/entrypoint.dart                     Entrypoint.acquireDependencies
package:pub/src/command/upgrade.dart 34             UpgradeCommand.run.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:pub/src/command/upgrade.dart                UpgradeCommand.run
package:args/command_runner.dart 176                CommandRunner.runCommand.<fn>
dart:async                                          Future.Future.sync
package:args/command_runner.dart 129                CommandRunner.runCommand
package:pub/src/command_runner.dart 131             PubCommandRunner.runCommand.<async>.<fn>
dart:async                                          Future.Future.sync
package:pub/src/utils.dart 113                      captureErrors.<fn>
package:stack_trace                                 Chain.capture
package:pub/src/utils.dart 127                      captureErrors
package:pub/src/command_runner.dart 131             PubCommandRunner.runCommand.<async>
dart:async                                          _SyncCompleter.complete
package:pub/src/command_runner.dart 217             PubCommandRunner._validatePlatform.<async>
@whesse
Copy link
Contributor

whesse commented Apr 19, 2016

The error mentioned above, "cannot assign to final variable trace", is expected, and the code is just written wrong. Changing the line to use a new temporary variable should remove this error. There may be another error, which is making us reach this code (which is error-reporting code) for the first time.

@kevmoo kevmoo added the area-sdk Use area-sdk for general purpose SDK issues (packaging, distribution, …). label Apr 19, 2016
@kevmoo kevmoo added this to the 1.16 milestone Apr 19, 2016
munificent added a commit that referenced this issue Apr 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-sdk Use area-sdk for general purpose SDK issues (packaging, distribution, …).
Projects
None yet
Development

No branches or pull requests

4 participants