-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests do not take normalization into consideration. #531
Comments
@crelier, could you say a few words about how this situation arose? Is it a log from a buildbot or trybot? |
cc @munificent @athomas What's the process we're following for keeping legacy tests (e.g. language_2 or co19_2) opted out? Is this done via package_config.json? Is this already in place for co19_2? |
I can see two parts of code that seem to be related to opting out co19_2
legacy tests:
Analyzer:
https://github.com/dart-lang/sdk/blob/38c7291e9e6ec7a22e87c7734bfbd3a38b075883/pkg/test_runner/lib/src/compiler_configuration.dart#L956
CFE:
https://github.com/dart-lang/sdk/blob/5b76fc217295a4a62f2b89a96051d8b204c433ae/pkg/front_end/lib/src/fasta/source/source_library_builder.dart#L401
…On Thu, May 7, 2020, 17:24 Leaf Petersen ***@***.***> wrote:
cc @munificent <https://github.com/munificent> @athomas
<https://github.com/athomas> What's the process we're following for
keeping legacy tests (e.g. language_2 or co19_2) opted out? Is this done
via package_config.json? Is this already in place for co19_2?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#531 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYRJBZMMNBCQW6R3FZOQADRQLHCZANCNFSM4KYEUPBA>
.
|
The original stack trace of this issue was obtained from a build bot. At the time this issue was filed, the |
I think we have two confusing elements here:
Ad 1, I believe the source code locations mentioned by @athomas here support the assumption that tests in Ad 2, I think we would need to discuss whether it is OK for a Dart execution to apply type normalization eagerly. The fact that we have a test failure here illustrates that it is an observable property, even though it does not change subtype relationships and (if I understood that correctly) only affects types obtained by inference or instantiation to bound. So will we run |
We consider type normalization as a "pre-nnbd breaking change". See the related sdk issue and language issue. Therefore, the result should be independent of the value of the Regarding the normalization itself, its spec states that "... normal forms for types could be eagerly or lazy computed and cached". The VM eagerly normalizes types, and therefore applies normalization when reading a kernel file on types left unnormalized by the CFE. |
Thanks! I was worried about the implications of performing normalization in a set of situations that isn't specified, but I think the differences are sufficiently restricted to ensure a well-defined semantics after all. @crelier wrote:
Right, dart-lang/sdk#40633 announces that type objects (that I interpret to mean instances of dart-lang/sdk#40633 also mentions that However, we obviously can't use normalization arbitrarily early, e.g., we do want the following program to have a compile-time error: import 'dart:async';
void main() {
int i = null as FutureOr;
} If we normalize In particular, I was worried when I saw this because it wasn't entirely obvious to me how early the normalization could occur, and what this could imply:
But even though the application of normalization may be considerably more implementation specific than I had expected (for instance, |
co19_2/Language/Generics/class_A03_t01
co19_2/Language/Generics/class_A03_t02
must take normalization into account:
https://github.com/dart-lang/language/blob/master/resources/type-system/normalization.md
The tests listed above will start failing after the backends implements normalization, e.g.
The text was updated successfully, but these errors were encountered: