blob: 41da81fad86206ae71cb8012b29331dcea21dcf9 [file] [log] [blame]
# Copyright (c) 2024, 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.
# Incremental compiler scenario coped from the tests in
# tests/language/macros/error/
# where a macro error from a previous entry shouldn't "infect" a new scenario.
type: newworld
worlds:
- entry: error_one.dart
errors: true
printErrorsInExpect: true
experiments: macros
sources:
.dart_tool/package_config.json: |
{
"configVersion": 2,
"packages": [
{
"name": "macros",
"rootUri": "holePunch:pkg/macros",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "_macros",
"rootUri": "holePunch:pkg/_macros",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "meta",
"rootUri": "holePunch:pkg/meta",
"packageUri": "lib/"
}
]
}
error_one.dart: |
import 'cycle_one.dart';
@AnyMacroOne()
class A {}
int get someValue => 0;
cycle_one.dart: |
import 'package:macros/macros.dart';
import 'error_one.dart';
macro class AnyMacroOne implements ClassDeclarationsMacro {
const AnyMacroOne();
Future<void> buildDeclarationsForClass(
ClassDeclaration clazz, MemberDeclarationBuilder builder) async {}
}
int get someOtherValue => someValue;
expectedLibraryCount: 4
- entry: error_two.dart
errors: true
printErrorsInExpect: true
worldType: updated
expectInitializeFromDill: false
experiments: macros
sources:
error_two.dart: |
import 'cycle_two.dart';
@AnyMacroTwo()
class A {}
int get someValue => 0;
cycle_two.dart: |
import 'package:macros/macros.dart';
import 'error_two.dart';
macro class AnyMacroTwo implements ClassDeclarationsMacro {
const AnyMacroTwo();
Future<void> buildDeclarationsForClass(
ClassDeclaration clazz, MemberDeclarationBuilder builder) async {}
}
int get someOtherValue => someValue;
expectedLibraryCount: 4
advancedInvalidation: noDirectlyInvalidated