Skip to content

Files in folder .dart_tool are not properly updated/managed (Windows10) #2738

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
stephan-gruen opened this issue Jun 24, 2020 · 1 comment
Closed

Comments

@stephan-gruen
Copy link

From time to time when I switch to a new dart_sdk version I "hit a bug in build_runner".
Deleting the .dart_tool folder and then recreating an empty one by running pub get (no dependencies are updated) resolves the issue every time.

"D:\dart-sdk\dart-sdk 2.9.0-18.0.dev\bin\pub.bat" global run webdev serve web:53322
[SEVERE] 
[SEVERE] 
[SEVERE] You have hit a bug in build_runner
[SEVERE] Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues
[SEVERE] 
[SEVERE] 
[SEVERE] NoSuchMethodError: Closure call with mismatched arguments: function 'MutablePackageTree.allPackages'
[SEVERE] Receiver: Closure: (_SyncIterator<Package>) => bool
[SEVERE] Tried calling: MutablePackageTree.allPackages()
[SEVERE] Found: MutablePackageTree.allPackages(_SyncIterator<Package>) => bool
[SEVERE] dart:core                                                              _SyncIterable.iterator
[SEVERE] package:package_config/src/package_config_impl.dart 26:36              new SimplePackageConfig
[SEVERE] package:package_config/src/package_config_json.dart 213:10             parsePackageConfigJson
[SEVERE] package:package_config/src/package_config_json.dart 45:10              parsePackageConfigBytes
Unhandled exception:
[SEVERE] package:package_config/src/package_config_io.dart 117:10               readPackageConfigJsonFile
Bad state: Unable to start build daemon.
[SEVERE] package:package_config/src/discovery.dart 109:18                       findPackagConfigInDirectory
#0      _handleDaemonStartup (package:build_daemon/client.dart:82:5)
<asynchronous suspension>
[SEVERE] package:package_config/src/discovery.dart 44:31                        findPackageConfig
#1      BuildDaemonClient.connect (package:build_daemon/client.dart:183:11)
<asynchronous suspension>
[SEVERE] package:package_config/package_config.dart 114:5                       findPackageConfig
#2      connectClient (package:webdev/src/daemon_client.dart:17:23)
[SEVERE] package:build_runner_core/src/package_graph/package_graph.dart 74:15   PackageGraph.forPath
#3      _startBuildDaemon (package:webdev/src/serve/dev_workflow.dart:26:18)
[SEVERE] package:build_runner_core/src/package_graph/package_graph.dart 110:20  PackageGraph.forThisPackage
#4      DevWorkflow.start (package:webdev/src/serve/dev_workflow.dart:191:24)
[SEVERE] package:build_runner/src/entrypoint/run.dart 22:64                     run
#5      ServeCommand.run (package:webdev/src/command/serve_command.dart:101:27)
<asynchronous suspension>
[SEVERE] .dart_tool\build\entrypoint\build.dart 133:22                          main
#6      CommandRunner.runCommand (package:args/command_runner.dart:197:27)
[SEVERE] 
#7      _CommandRunner.runCommand (package:webdev/src/webdev_command_runner.dart:38:24)
#8      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#9      new Future.sync (dart:async/future.dart:223:31)
#10     CommandRunner.run (package:args/command_runner.dart:112:14)
#11     run (package:webdev/src/webdev_command_runner.dart:19:56)
#12     main (file:///C:/Users/Stephan/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/webdev-2.5.9/bin/webdev.dart:17:22)
#13     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
Dart Webdev terminated

After deleting .dart_tool:

Working dir: D:\dart-apps\webV\gdv\gdv_app
"D:\dart-sdk\dart-sdk 2.9.0-18.0.dev\bin\pub.bat" get
Resolving dependencies...
Overriding the upper bound Dart SDK constraint to <=2.9.0-18.0.dev for the following packages:

dart_internal

To disable this you can set the PUB_ALLOW_PRERELEASE_SDK system environment variable to `false`, or you can silence this message by setting it to `quiet`.
Warning: You are using these overridden dependencies:
! intl 0.16.1
Got dependencies!
Process finished with exit code 0

"D:\dart-sdk\dart-sdk 2.9.0-18.0.dev\bin\pub.bat" global run webdev serve web:53322
[INFO] Building new asset graph completed, took 2.5s
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms
[INFO] Serving `web` on http://127.0.0.1:53322
[INFO] Generating SDK summary completed, took 5.3s
[INFO] Running build completed, took 1m 48s
[INFO] Caching finalized dependency graph completed, took 735ms
[INFO] Succeeded after 1m 48s with 6508 outputs (14178 actions)
[INFO] ------------------------------------------------------------------------

@jakemac53
Copy link
Contributor

This is an issue with vm snapshots - it should be resolved with dart-lang/sdk#41802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants