| # 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: | |
| // @dart=2.9 |
| import "package:example/b.dart"; |
| main() { b(); } |
| pkg/example/b.dart: | |
| // @dart=2.9 |
| 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: | |
| // @dart=2.9 |
| main() {} |
| expectedLibraryCount: 1 |
| uriToSourcesDoesntInclude: |
| - pkg/example/b.dart |