9394b30b77
Bug: b/286184681 Change-Id: I903528c4adfbc576644aec7541903df6b9633e26 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325523 Reviewed-by: Jonas Termansen <sortie@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Alexander Thomas <athom@google.com>
134 lines
3.0 KiB
YAML
134 lines
3.0 KiB
YAML
# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
# Compile an application with a number of modules.
|
|
# Try out "trickery" in the module dependencies to force needing more or less
|
|
# dill libraries.
|
|
|
|
type: newworld
|
|
modules:
|
|
moduleB:
|
|
moduleB/b.dart: |
|
|
import 'package:moduleC/c.dart';
|
|
|
|
var bVar = 42;
|
|
var bVarFromC = baz2;
|
|
var mya2 = new A2();
|
|
|
|
class A2 extends A3 {
|
|
int bar = 42;
|
|
}
|
|
moduleB/.dart_tool/package_config.json: |
|
|
{
|
|
"configVersion": 2,
|
|
"packages": [
|
|
{
|
|
"name": "moduleB",
|
|
"rootUri": ".."
|
|
},
|
|
{
|
|
"name": "moduleC",
|
|
"rootUri": "../../moduleC"
|
|
},
|
|
{
|
|
"name": "moduleD",
|
|
"rootUri": "../../moduleD"
|
|
}
|
|
]
|
|
}
|
|
moduleC:
|
|
moduleC/c.dart: |
|
|
import 'package:moduleD/d.dart';
|
|
|
|
String baz = "42";
|
|
String baz2 = baz3;
|
|
|
|
class A3 {
|
|
int foo = 42;
|
|
}
|
|
moduleC/.dart_tool/package_config.json: |
|
|
{
|
|
"configVersion": 2,
|
|
"packages": [
|
|
{
|
|
"name": "moduleC",
|
|
"rootUri": ".."
|
|
},
|
|
{
|
|
"name": "moduleD",
|
|
"rootUri": "../../moduleD"
|
|
}
|
|
]
|
|
}
|
|
moduleD:
|
|
moduleD/d.dart: |
|
|
String baz3 = "baz3";
|
|
moduleD/.dart_tool/package_config.json: |
|
|
{
|
|
"configVersion": 2,
|
|
"packages": [
|
|
{
|
|
"name": "moduleD",
|
|
"rootUri": ".."
|
|
}
|
|
]
|
|
}
|
|
worlds:
|
|
- entry: a.dart
|
|
fromComponent: true
|
|
sources:
|
|
a.dart: |
|
|
import "package:moduleB/b.dart";
|
|
|
|
var foo = bVar;
|
|
var foo2 = bVarFromC;
|
|
|
|
class A1 extends A2 {
|
|
String fooMethod() => "42!";
|
|
}
|
|
.dart_tool/package_config.json: |
|
|
{
|
|
"configVersion": 2,
|
|
"packages": [
|
|
{
|
|
"name": "moduleB",
|
|
"rootUri": "../moduleB"
|
|
},
|
|
{
|
|
"name": "moduleC",
|
|
"rootUri": "../moduleC"
|
|
},
|
|
{
|
|
"name": "moduleD",
|
|
"rootUri": "../moduleD"
|
|
}
|
|
]
|
|
}
|
|
modules:
|
|
- moduleB
|
|
- moduleC
|
|
- moduleD
|
|
expectedLibraryCount: 4
|
|
neededDillLibraries:
|
|
# A class in 'a.dart' has a super in 'c.dart'.
|
|
- package:moduleB/b.dart
|
|
- package:moduleC/c.dart
|
|
expectedContent:
|
|
org-dartlang-test:///a.dart:
|
|
- Field foo
|
|
- Field foo2
|
|
- Class A1
|
|
package:moduleB/b.dart:
|
|
- Class A2
|
|
- Field bVar
|
|
- Field bVarFromC
|
|
- Field mya2
|
|
package:moduleC/c.dart:
|
|
- Class A3
|
|
- Field baz
|
|
- Field baz2
|
|
package:moduleD/d.dart:
|
|
- Field baz3
|
|
advancedInvalidation: modulesToLoad
|