Skip to content

sky_snapshot should give a better error message for bad paths #122

Closed

Description

@FlutterIssues

Issue by eseidelGoogle
Thursday Aug 06, 2015 at 20:14 GMT
Originally opened as https://github.com/flutter/engine/issues/482


@collinjackson was hitting this today and was confused.

Here is an example:

diff --git a/sky/packages/sky/example/fitness/lib/main.dart b/sky/packages/sky/example/fitness/lib/main.dart
index ca7dfaf..c11a99e 100644
--- a/sky/packages/sky/example/fitness/lib/main.dart
+++ b/sky/packages/sky/example/fitness/lib/main.dart
@@ -8,6 +8,7 @@ import 'package:sky/editing/input.dart';
 import 'package:sky/painting/text_style.dart';
 import 'package:sky/theme/colors.dart' as colors;
 import 'package:sky/widgets.dart';
+import 'package:mojom/blah/blah.dart';

 part 'feed.dart';
 part 'fitness_item.dart';

ninja -C out/Debug

FAILED: python ../../sky/tools/sky_snapshot.py out/Debug/sky_snapshot sky/packages/sky/example/fitness/lib/main.dart --package-root sky/packages/workbench/packages --snapshot out/Debug/gen/sky/packages/sky/example/fitness/fitness_snapshot.bin -C ../../
[0806/131321:FATAL:loader.cc(21)] Check failed: base::ReadFileToString(path, &source). sky/packages/workbench/packages/mojom/blah/blah.dart
#0 0x00000057304e base::debug::StackTrace::StackTrace()
#1 0x00000046e092 logging::LogMessage::~LogMessage()
#2 0x00000040ecb9 (anonymous namespace)::Fetch()
#3 0x00000040ea3d (anonymous namespace)::Loader::Import()
#4 0x00000040e591 HandleLibraryTag()
#5 0x0000007f2f30 dart::Parser::CallLibraryTagHandler()
#6 0x0000007f3b8c dart::Parser::ParseLibraryImportExport()
#7 0x0000007f4c42 dart::Parser::ParseLibraryDefinition()
#8 0x0000007c75d2 dart::Parser::ParseTopLevel()
#9 0x0000007c7315 dart::Parser::ParseCompilationUnit()
#10 0x0000006600c4 dart::Compiler::Compile()
#11 0x000000645b71 dart::CompileSource()
#12 0x000000645a83 Dart_LoadScript
#13 0x00000040eb7b LoadScript()
#14 0x000000411bae main
#15 0x7fbc4d9feec5 __libc_start_main
#16 0x00000040e32c <unknown>

Traceback (most recent call last):
  File "../../sky/tools/sky_snapshot.py", line 28, in <module>
    sys.exit(main())
  File "../../sky/tools/sky_snapshot.py", line 25, in main
    ], cwd=args.C)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['out/Debug/sky_snapshot', 'sky/packages/sky/example/fitness/lib/main.dart', '--package-root=sky/packages/workbench/packages', '--snapshot=out/Debug/gen/sky/packages/sky/example/fitness/fitness_snapshot.bin']' returned non-zero exit status -6

Activity

  1. abarth commented on Nov 10, 2015

    @abarth
    Contributor
  2. github-actions commented on Sep 7, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  3. locked as resolved and limited conversation to collaborators on Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions