Skip to content
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

Crash when compiling file: xxxxxx/source_span-1.7.0/lib/src/highlighter.dart #2

Closed
xudjx opened this issue Nov 29, 2020 · 5 comments
Closed

Comments

@xudjx
Copy link

xudjx commented Nov 29, 2020

lib/cli/generator.dart:1: Warning: Interpreting this as package URI, 'package:flutter_ast/cli/generator.dart'.
Crash when compiling file:///Users/xud/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.7.0/lib/src/highlighter.dart,
at character offset 3663:
Internal problem: Can't extend an unmodifiable scope.
#0 internalProblem (package:front_end/src/fasta/problems.dart:45:3)
#1 Scope.declare (package:front_end/src/fasta/scope.dart:234:7)
#2 BodyBuilder.declareVariable (package:front_end/src/fasta/kernel/body_builder.dart:428:36)
#3 BodyBuilder.endInitializedIdentifier (package:front_end/src/fasta/kernel/body_builder.dart:2085:5)
#4 Parser.parseOptionallyInitializedIdentifier (package:front_end/src/fasta/parser/parser.dart:5266:14)
#5 Parser.parseVariablesDeclarationRest (package:front_end/src/fasta/parser/parser.dart:5246:13)
#6 Parser.parseForLoopPartsMid (package:front_end/src/fasta/parser/parser.dart:5380:15)
#7 ForCondition.parse (package:front_end/src/fasta/parser/literal_entry_info_impl.dart:42:20)
#8 Parser.parseListOrSetLiteralEntry (package:front_end/src/fasta/parser/parser.dart:4235:22)
#9 Parser.parseLiteralListSuffix (package:front_end/src/fasta/parser/parser.dart:4192:15)
#10 Parser.parsePrimary (package:front_end/src/fasta/parser/parser.dart:4036:14)
#11 Parser.parseUnaryExpression (package:front_end/src/fasta/parser/parser.dart:3930:12)
#12 Parser.parsePrecedenceExpression (package:front_end/src/fasta/parser/parser.dart:3742:13)
#13 Parser.parseExpression (package:front_end/src/fasta/parser/parser.dart:3714:13)
#14 Parser.parseArgumentsRest (package:front_end/src/fasta/parser/parser.dart:4912:15)
#15 Parser.parseArguments (package:front_end/src/fasta/parser/parser.dart:4884:12)
#16 Parser.parseArgumentsOpt (package:front_end/src/fasta/parser/parser.dart:4865:14)
#17 Parser.parseSend (package:front_end/src/fasta/parser/parser.dart:4844:13)
#18 Parser.parseSendOrFunctionLiteral (package:front_end/src/fasta/parser/parser.dart:4580:12)
#19 Parser.parsePrimary (package:front_end/src/fasta/parser/parser.dart:3991:14)
#20 Parser.parseUnaryExpression (package:front_end/src/fasta/parser/parser.dart:3930:12)
#21 Parser.parsePrecedenceExpression (package:front_end/src/fasta/parser/parser.dart:3742:13)
#22 Parser.parseExpression (package:front_end/src/fasta/parser/parser.dart:3714:13)
#23 Parser.parseArgumentsRest (package:front_end/src/fasta/parser/parser.dart:4912:15)
#24 Parser.parseArguments (package:front_end/src/fasta/parser/parser.dart:4884:12)
#25 Parser.parseArgumentsOpt (package:front_end/src/fasta/parser/parser.dart:4865:14)
#26 Parser.parseSend (package:front_end/src/fasta/parser/parser.dart:4844:13)
#27 Parser.parseSendOrFunctionLiteral (package:front_end/src/fasta/parser/parser.dart:4565:14)
#28 Parser.parsePrimary (package:front_end/src/fasta/parser/parser.dart:3991:14)
#29 Parser.parsePrecedenceExpression (package:front_end/src/fasta/parser/parser.dart:3783:21)
#30 Parser.parseExpression (package:front_end/src/fasta/parser/parser.dart:3714:13)
#31 Parser.parseInitializerExpressionRest (package:front_end/src/fasta/parser/parser.dart:2574:13)
#32 Parser.parseInitializer (package:front_end/src/fasta/parser/parser.dart:2467:17)
#33 Parser.parseInitializers (package:front_end/src/fasta/parser/parser.dart:2419:15)
#34 Parser.parseInitializersOpt (package:front_end/src/fasta/parser/parser.dart:2399:14)
#35 DietListener.buildFunctionBody (package:front_end/src/fasta/source/diet_listener.dart:829:22)
#36 DietListener.endMethod (package:front_end/src/fasta/source/diet_listener.dart:587:5)
#37 Parser.parseMethod (package:front_end/src/fasta/parser/parser.dart:3066:14)
#38 Parser.parseClassOrMixinMemberImpl (package:front_end/src/fasta/parser/parser.dart:2932:15)
#39 Parser.parseClassOrMixinBody (package:front_end/src/fasta/parser/parser.dart:2737:15)
#40 Parser.parseClass (package:front_end/src/fasta/parser/parser.dart:1761:13)
#41 Parser.parseClassOrNamedMixinApplication (package:front_end/src/fasta/parser/parser.dart:1721:14)
#42 Parser.parseTopLevelKeywordDeclaration (package:front_end/src/fasta/parser/parser.dart:573:14)
#43 Parser.parseTopLevelDeclarationImpl (package:front_end/src/fasta/parser/parser.dart:465:14)
#44 Parser.parseUnit (package:front_end/src/fasta/parser/parser.dart:348:15)
#45 SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart:260:14)

#46 Loader.buildBodies (package:front_end/src/fasta/loader.dart:182:15)

#47 KernelTarget.buildComponent. (package:front_end/src/fasta/kernel/kernel_target.dart:293:20)

#48 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#49 KernelTarget.buildComponent (package:front_end/src/fasta/kernel/kernel_target.dart:291:12)

#50 generateKernelInternal. (package:front_end/src/kernel_generator_impl.dart:145:38)

#51 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#52 generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:55:10)

#53 generateKernel. (package:front_end/src/kernel_generator_impl.dart:40:18)

#54 CompilerContext.runWithOptions. (package:front_end/src/fasta/compiler_context.dart:134:20)

#55 CompilerContext.runInContext.. (package:front_end/src/fasta/compiler_context.dart:122:46)
#56 new Future.sync (dart:async/future.dart:224:31)
#57 CompilerContext.runInContext. (package:front_end/src/fasta/compiler_context.dart:122:19)
#58 _rootRun (dart:async/zone.dart:1124:13)
#59 _CustomZone.run (dart:async/zone.dart:1021:19)
#60 _runZoned (dart:async/zone.dart:1516:10)
#61 runZoned (dart:async/zone.dart:1463:12)
#62 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12)
#63 CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:132:10)
#64 generateKernel (package:front_end/src/kernel_generator_impl.dart:39:32)

#65 kernelForComponent (package:front_end/src/api_prototype/kernel_generator.dart:83:17)

#66 SingleShotCompilerWrapper.compileInternal (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:266:11)

#67 Compiler.compile. (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:143:31)

#68 new Future. (dart:async/future.dart:176:37)
#69 _rootRun (dart:async/zone.dart:1120:38)
#70 _CustomZone.run (dart:async/zone.dart:1021:19)
#71 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#72 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
#73 _rootRun (dart:async/zone.dart:1124:13)
#74 _CustomZone.run (dart:async/zone.dart:1021:19)
#75 _CustomZone.bindCallback. (dart:async/zone.dart:947:23)
#76 Timer._createTimer. (dart:async/runtime/libtimer_patch.dart:21:15)
#77 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#78 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#79 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

#0 DietListener.buildFunctionBody (package:front_end/src/fasta/source/diet_listener.dart:842:7)
#1 DietListener.endMethod (package:front_end/src/fasta/source/diet_listener.dart:587:5)
#2 Parser.parseMethod (package:front_end/src/fasta/parser/parser.dart:3066:14)
#3 Parser.parseClassOrMixinMemberImpl (package:front_end/src/fasta/parser/parser.dart:2932:15)
#4 Parser.parseClassOrMixinBody (package:front_end/src/fasta/parser/parser.dart:2737:15)
#5 Parser.parseClass (package:front_end/src/fasta/parser/parser.dart:1761:13)
#6 Parser.parseClassOrNamedMixinApplication (package:front_end/src/fasta/parser/parser.dart:1721:14)
#7 Parser.parseTopLevelKeywordDeclaration (package:front_end/src/fasta/parser/parser.dart:573:14)
#8 Parser.parseTopLevelDeclarationImpl (package:front_end/src/fasta/parser/parser.dart:465:14)
#9 Parser.parseUnit (package:front_end/src/fasta/parser/parser.dart:348:15)
#10 SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart:260:14)

#11 Loader.buildBodies (package:front_end/src/fasta/loader.dart:182:15)

#12 KernelTarget.buildComponent. (package:front_end/src/fasta/kernel/kernel_target.dart:293:20)

#13 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#14 KernelTarget.buildComponent (package:front_end/src/fasta/kernel/kernel_target.dart:291:12)

#15 generateKernelInternal. (package:front_end/src/kernel_generator_impl.dart:145:38)

#16 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#17 generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:55:10)

#18 generateKernel. (package:front_end/src/kernel_generator_impl.dart:40:18)

#19 CompilerContext.runWithOptions. (package:front_end/src/fasta/compiler_context.dart:134:20)

#20 CompilerContext.runInContext.. (package:front_end/src/fasta/compiler_context.dart:122:46)
#21 new Future.sync (dart:async/future.dart:224:31)
#22 CompilerContext.runInContext. (package:front_end/src/fasta/compiler_context.dart:122:19)
#23 _rootRun (dart:async/zone.dart:1124:13)
#24 _CustomZone.run (dart:async/zone.dart:1021:19)
#25 _runZoned (dart:async/zone.dart:1516:10)
#26 runZoned (dart:async/zone.dart:1463:12)
#27 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12)
#28 CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:132:10)
#29 generateKernel (package:front_end/src/kernel_generator_impl.dart:39:32)

#30 kernelForComponent (package:front_end/src/api_prototype/kernel_generator.dart:83:17)

#31 SingleShotCompilerWrapper.compileInternal (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:266:11)

#32 Compiler.compile. (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:143:31)

#33 new Future. (dart:async/future.dart:176:37)
#34 _rootRun (dart:async/zone.dart:1120:38)
#35 _CustomZone.run (dart:async/zone.dart:1021:19)
#36 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#37 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
#38 _rootRun (dart:async/zone.dart:1124:13)
#39 _CustomZone.run (dart:async/zone.dart:1021:19)
#40 _CustomZone.bindCallback. (dart:async/zone.dart:947:23)
#41 Timer._createTimer. (dart:async/runtime/libtimer_patch.dart:21:15)
#42 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#43 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#44 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

@rodydavis
Copy link
Owner

Oh interesting 🤔 I am maybe on an older version of Flutter. Could be the null safety stuff which I have to turn off at the moment

@xudjx
Copy link
Author

xudjx commented Nov 29, 2020

Oh interesting 🤔 I am maybe on an older version of Flutter. Could be the null safety stuff which I have to turn off at the moment

The flutter engine version I use is 1.17.5.🤔

@rodydavis
Copy link
Owner

rodydavis commented Nov 29, 2020 via email

@xudjx xudjx closed this as completed Nov 30, 2020
@xudjx xudjx reopened this Nov 30, 2020
@xudjx
Copy link
Author

xudjx commented Nov 30, 2020

Can you give me an example file and the commands you are using?
On Sun, Nov 29, 2020 at 5:51 AM Weidong Xu @.***> wrote: Oh interesting 🤔 I am maybe on an older version of Flutter. Could be the null safety stuff which I have to turn off at the moment The flutter engine version I use is 1.17.5.🤔 — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOOFX7BKPTJH6UUGHPQUITSSJGWZANCNFSM4UGK5QZA .
-- Rody Davis Jr

I use your source project's example file.
The command is 'dart lib/cli/generator.dart -p samples/example.dart'.
My dart version is: 2.2.0

@xudjx
Copy link
Author

xudjx commented Nov 30, 2020

I found that this is caused by the low dart version, I modified the dart command point to the flutter engine dart-sdk can solve this problem. Thanks!

@xudjx xudjx closed this as completed Nov 30, 2020
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