| # Copyright (c) 2026, 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. |
| |
| # Test for change package |
| |
| type: newworld |
| worlds: |
| - entry: nopkg/a.dart |
| sources: |
| .dart_tool/package_config.json: | |
| { |
| "configVersion": 2, |
| "packages": [ |
| { |
| "name": "foo", |
| "rootUri": "../foo_1.0", |
| "packageUri": "lib", |
| "languageVersion": "3.12" |
| } |
| ] |
| } |
| nopkg/a.dart: | |
| import "package:foo/foo.dart"; |
| void main() { |
| var x = foo; |
| print(x); |
| } |
| foo_1.0/lib/foo.dart: | |
| int foo = 42; |
| expectedLibraryCount: 2 |
| |
| - entry: nopkg/a.dart |
| worldType: updated |
| expectInitializeFromDill: false |
| invalidate: |
| - .dart_tool/package_config.json |
| sources: |
| .dart_tool/package_config.json: | |
| { |
| "configVersion": 2, |
| "packages": [ |
| { |
| "name": "foo", |
| "rootUri": "../foo_2.0", |
| "packageUri": "lib", |
| "languageVersion": "3.12" |
| } |
| ] |
| } |
| foo_2.0/lib/foo.dart: | |
| String foo = "42"; |
| expectedLibraryCount: 2 |
| advancedInvalidation: packageUpdate |
| |
| - entry: nopkg/a.dart |
| worldType: updated |
| expectInitializeFromDill: false |
| invalidate: |
| - .dart_tool/package_config.json |
| sources: |
| .dart_tool/package_config.json: | |
| { |
| "configVersion": 2, |
| "packages": [ |
| { |
| "name": "foo", |
| "rootUri": "../foo_1.0", |
| "packageUri": "lib", |
| "languageVersion": "3.12" |
| } |
| ] |
| } |
| expectedLibraryCount: 2 |
| advancedInvalidation: packageUpdate |