blob: 0b9ff3618373f9b7468a0cc05e0cee96ff436a84 [file] [log] [blame]
# 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.md file.
# Compile an application with a package. Update the world so that the
# .dart_tool/package_config.json no longer reference the package (and the source
# no longer use it) and recompile. The now no longer referenced package library
# should also have been removed from the uri to sources.
type: newworld
worlds:
- entry: main.dart
sources:
.dart_tool/package_config.json: |
{
"configVersion": 2,
"packages": [
{
"name": "example",
"rootUri": "../pkg/example"
}
]
}
main.dart: |
import "package:example/b.dart";
main() { b(); }
pkg/example/b.dart: |
b() {}
expectedLibraryCount: 2
- entry: main.dart
worldType: updated
invalidate:
- main.dart
- .dart_tool/package_config.json
expectInitializeFromDill: false
sources:
.dart_tool/package_config.json: |
{
"configVersion": 2,
"packages": []
}
main.dart: |
main() {}
expectedLibraryCount: 1
uriToSourcesDoesntInclude:
- pkg/example/b.dart
advancedInvalidation: packageUpdate