Closed renatoathaydes closed 5 years ago
Hm... lloks like this is the problem:
[SEVERE] build_web_compilers|ddc on test/model_test.dartdevc.module (cached):
Error compiling dartdevc module:webdart_example|test/model_test.ddc.js
Why would the test file be compiled with build_web_compilers
? Probably should just skip it, after all my tests are plain Dart tests, not web tests (no browser or anything like that).
This issue was moved to dart-lang/build#2027
dart --version
)Dart VM version: 2.1.0 (Unknown timestamp) on "linux_x64"
Linux Ubuntu
I've got a simple web project started with
stagehand web-simple
.I had some dart files in the
web
folder, and decided to write some tests, so I put my test undertest/model_test.dart
.The target of the test is a file under
web/model.dart
, so I have this import on the test file:I can run this test fine from the IDE and also with:
But now, when I run
webdev serve
an error occurs:Invalid library root. /test/ does not contain /web/model.dart
0 jsLibraryName (package:dev_compiler/src/analyzer/code_generator.dart:6396:5)
1 CodeGenerator.emitLibraryName. (package:dev_compiler/src/analyzer/code_generator.dart:6153:34)
2 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23)
3 CodeGenerator.emitLibraryName (package:dev_compiler/src/analyzer/code_generator.dart:6152:18)
4 CodeGenerator._emitTopLevelNameNoInterop (package:dev_compiler/src/analyzer/code_generator.dart:3352:9)
5 CodeGenerator._emitType (package:dev_compiler/src/analyzer/code_generator.dart:3331:12)
6 CodeGenerator._emitConstructorAccess (package:dev_compiler/src/analyzer/code_generator.dart:3261:44)
7 CodeGenerator._emitConstructorName (package:dev_compiler/src/analyzer/code_generator.dart:4315:27)
8 CodeGenerator._emitInstanceCreationExpression.emitNew (package:dev_compiler/src/analyzer/code_generator.dart:4371:18)
9 CodeGenerator._emitInstanceCreationExpression (package:dev_compiler/src/analyzer/code_generator.dart:4378:51)
10 CodeGenerator.visitInstanceCreationExpression (package:dev_compiler/src/analyzer/code_generator.dart:4518:12)
11 InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:6513:15)
12 CodeGenerator._visitExpression (package:dev_compiler/src/analyzer/code_generator.dart:5805:18)
13 CodeGenerator._bindValue (package:dev_compiler/src/analyzer/code_generator.dart:5012:23)
14 CodeGenerator.visitCascadeExpression (package:dev_compiler/src/analyzer/code_generator.dart:5126:22)
15 CascadeExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:1426:49)
16 CodeGenerator._visitExpression (package:dev_compiler/src/analyzer/code_generator.dart:5805:18)
17 CodeGenerator._emitSetLocal (package:dev_compiler/src/analyzer/code_generator.dart:3534:12)
18 CodeGenerator._emitSetSimpleIdentifier (package:dev_compiler/src/analyzer/code_generator.dart:3503:14)
19 CodeGenerator._emitSet (package:dev_compiler/src/analyzer/code_generator.dart:3427:14)
20 CodeGenerator.visitAssignmentExpression (package:dev_compiler/src/analyzer/code_generator.dart:3368:52)
21 AssignmentExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:834:49)
22 CodeGenerator.visitExpressionStatement (package:dev_compiler/src/analyzer/code_generator.dart:4098:23)
23 ExpressionStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:4228:49)
24 CodeGenerator._visitStatement (package:dev_compiler/src/analyzer/code_generator.dart:5814:18)
25 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
26 ListIterable.toList (dart:_internal/iterable.dart:219:19)
27 CodeGenerator._visitStatementList (package:dev_compiler/src/analyzer/code_generator.dart:5821:41)
28 CodeGenerator.visitBlockFunctionBody (package:dev_compiler/src/analyzer/code_generator.dart:3585:21)
29 BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1181:49)
30 CodeGenerator._emitFunctionScopedBody (package:dev_compiler/src/analyzer/code_generator.dart:2802:22)
31 CodeGenerator._emitFunctionBody (package:dev_compiler/src/analyzer/code_generator.dart:2785:17)
32 CodeGenerator._emitFunction (package:dev_compiler/src/analyzer/code_generator.dart:2769:11)
33 CodeGenerator._emitArrowFunction (package:dev_compiler/src/analyzer/code_generator.dart:2724:13)
34 CodeGenerator.visitFunctionExpression (package:dev_compiler/src/analyzer/code_generator.dart:2717:14)
35 FunctionExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:5360:49)
36 CodeGenerator._visitExpression (package:dev_compiler/src/analyzer/code_generator.dart:5805:18)
37 CodeGenerator._emitArgumentList (package:dev_compiler/src/analyzer/code_generator.dart:4052:18)
38 CodeGenerator._emitFunctionCall (package:dev_compiler/src/analyzer/code_generator.dart:3880:16)
39 CodeGenerator.visitMethodInvocation (package:dev_compiler/src/analyzer/code_generator.dart:3632:14)
40 MethodInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7827:49)
41 CodeGenerator.visitExpressionStatement (package:dev_compiler/src/analyzer/code_generator.dart:4098:23)
42 ExpressionStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:4228:49)
43 CodeGenerator._visitStatement (package:dev_compiler/src/analyzer/code_generator.dart:5814:18)
44 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
45 ListIterable.toList (dart:_internal/iterable.dart:219:19)
46 CodeGenerator._visitStatementList (package:dev_compiler/src/analyzer/code_generator.dart:5821:41)
47 CodeGenerator.visitBlockFunctionBody (package:dev_compiler/src/analyzer/code_generator.dart:3585:21)
48 BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1181:49)
49 CodeGenerator._emitFunctionScopedBody (package:dev_compiler/src/analyzer/code_generator.dart:2802:22)
50 CodeGenerator._emitFunctionBody (package:dev_compiler/src/analyzer/code_generator.dart:2785:17)
51 CodeGenerator._emitFunction (package:dev_compiler/src/analyzer/code_generator.dart:2769:11)
52 CodeGenerator._emitArrowFunction (package:dev_compiler/src/analyzer/code_generator.dart:2724:13)
53 CodeGenerator.visitFunctionExpression (package:dev_compiler/src/analyzer/code_generator.dart:2717:14)
54 FunctionExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:5360:49)
55 CodeGenerator._visitExpression (package:dev_compiler/src/analyzer/code_generator.dart:5805:18)
56 CodeGenerator._emitArgumentList (package:dev_compiler/src/analyzer/code_generator.dart:4052:18)
57 CodeGenerator._emitFunctionCall (package:dev_compiler/src/analyzer/code_generator.dart:3880:16)
58 CodeGenerator.visitMethodInvocation (package:dev_compiler/src/analyzer/code_generator.dart:3632:14)
59 MethodInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7827:49)
60 CodeGenerator.visitExpressionStatement (package:dev_compiler/src/analyzer/code_generator.dart:4098:23)
61 ExpressionStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:4228:49)
62 CodeGenerator._visitStatement (package:dev_compiler/src/analyzer/code_generator.dart:5814:18)
63 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
64 ListIterable.toList (dart:_internal/iterable.dart:219:19)
65 CodeGenerator._visitStatementList (package:dev_compiler/src/analyzer/code_generator.dart:5821:41)
66 CodeGenerator.visitBlockFunctionBody (package:dev_compiler/src/analyzer/code_generator.dart:3585:21)
67 BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1181:49)
68 CodeGenerator._emitFunctionScopedBody (package:dev_compiler/src/analyzer/code_generator.dart:2802:22)
69 CodeGenerator._emitFunctionBody (package:dev_compiler/src/analyzer/code_generator.dart:2785:17)
70 CodeGenerator._emitFunction (package:dev_compiler/src/analyzer/code_generator.dart:2769:11)
71 CodeGenerator._emitFunctionExpression (package:dev_compiler/src/analyzer/code_generator.dart:2749:12)
72 CodeGenerator.visitFunctionDeclaration (package:dev_compiler/src/analyzer/code_generator.dart:2611:14)
73 FunctionDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:5197:49)
74 CodeGenerator.visitCompilationUnit (package:dev_compiler/src/analyzer/code_generator.dart:602:30)
75 List.forEach (dart:core/runtime/libarray.dart:82:8)
76 CodeGenerator.compile (package:dev_compiler/src/analyzer/code_generator.dart:335:22)
77 compileWithAnalyzer (package:dev_compiler/src/analyzer/module_compiler.dart:109:33)
78 _compile (package:dev_compiler/src/analyzer/command.dart:151:16)
79 compile (package:dev_compiler/src/analyzer/command.dart:56:18)
80 compile (package:dev_compiler/src/compiler/shared_command.dart:360:18)
81 _CompilerWorker.performRequest. (file:///tmp/tmpqIBfjJ/dart-2.1.0/dart/pkg/dev_compiler/bin/dartdevc.dart:50:36)
82 _rootRun (dart:async/zone.dart:1124:13)
83 _CustomZone.run (dart:async/zone.dart:1021:19)
84 _runZoned (dart:async/zone.dart:1516:10)
85 runZoned (dart:async/zone.dart:1463:12)
86 _CompilerWorker.performRequest (file:///tmp/tmpqIBfjJ/dart-2.1.0/dart/pkg/dev_compiler/bin/dartdevc.dart:50:21)