Skip to content
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

Remove ignored type failures #27223

Closed
jmesserly opened this issue Sep 1, 2016 · 11 comments
Closed

Remove ignored type failures #27223

jmesserly opened this issue Sep 1, 2016 · 11 comments
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. P1 A high priority bug; for example, a single project is unusable or has many test failures soundness status-blocked Blocked from making progress by another (referenced) issue web-dev-compiler

Comments

@jmesserly
Copy link

From @vsmenon on August 25, 2016 16:49

This was a temporary workaround until generic methods. We should eliminate this:

https://github.com/dart-lang/dev_compiler/blob/master/tool/input_sdk/private/ddc_runtime/operations.dart#L272

Copied from original issue: dart-archive/dev_compiler#630

@jmesserly jmesserly added P1 A high priority bug; for example, a single project is unusable or has many test failures soundness labels Sep 1, 2016
@jmesserly
Copy link
Author

CC @leafpetersen

@vsmenon vsmenon modified the milestone: 1.50 Jan 6, 2017
@vsmenon vsmenon modified the milestone: 1.50 Jan 6, 2017
@vsmenon
Copy link
Member

vsmenon commented Jan 24, 2017

Note, this is currently blocked on lack of typed angular templates. Related to #27255.

@vsmenon vsmenon added the status-blocked Blocked from making progress by another (referenced) issue label Jan 24, 2017
@dgrove dgrove modified the milestones: 1.50, 1.23 Feb 14, 2017
vsmenon added a commit that referenced this issue Mar 9, 2017
Run most tests without the whitelisting.

See #27223

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2739863003 .
vsmenon added a commit that referenced this issue Mar 9, 2017
Run most tests without the whitelisting.

See #27223

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2739863003 .
@vsmenon vsmenon modified the milestones: 1.24, 1.23 Mar 20, 2017
@vsmenon vsmenon assigned jmesserly and unassigned leafpetersen Mar 30, 2017
@vsmenon
Copy link
Member

vsmenon commented Mar 30, 2017

I'd start with Angular Dart apps. Possible source of type failures:

  • Handwritten code - which we should just fix.
  • SDK code - which still has type errors
  • Generated code from protobufs.
  • Generated code from ng2 templates.
  • Generated code from pageloader / mirrors.

At this point, we don't know where most ignored errors are coming from. Pageloader will only trigger problems in tests though.

vsmenon added a commit that referenced this issue Mar 31, 2017
I'll look into adding tests - these eventually supposed to *not* get ignored (see #27223)

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2788933002 .
vsmenon added a commit that referenced this issue Mar 31, 2017
I'll look into adding tests - these eventually supposed to *not* get ignored (see #27223)

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2788933002 .
@dgrove
Copy link
Contributor

dgrove commented May 12, 2017

@vsmenon is this targeted for 1.24?

@vsmenon vsmenon modified the milestones: 1.25, 1.24 May 13, 2017
@vsmenon
Copy link
Member

vsmenon commented May 13, 2017

No, good progress with angular this q. Still issues in Zone code.

@matanlurey
Copy link
Contributor

matanlurey commented May 13, 2017 via email

@vsmenon
Copy link
Member

vsmenon commented Jul 21, 2017

Note, this is now primarily blocked on #30225

@jmesserly
Copy link
Author

internally this is also blocked by code that uses mirrors to populate Dart class fields, often in unsound ways that bypasses field type checks.

@munificent
Copy link
Member

munificent commented Dec 13, 2017

As we go through and fix existing code that has these failures, here's a bit of verbiage we can use in commit logs to let people know what's going on:

In strong mode, a generic type instantiated with dynamic is not a
subtype of all types. You can't pass a List<dynamic> to something
expecting, say, List<int>.

These errors are usually detected statically, and most of those have
been fixed. However, sometimes this becomes a runtime cast, as in:

    main() {
      // Store a List<dynamic> in a variable of type dynamic.
      dynamic d = [];
    
      // Implicit runtime downcast from dynamic to List<String>.
      List<String> s = d;
    }

In order to ease the migration to strong mode, DDC has been ignoring
these cast failures when they involve certain commonly used types. We
are now in the process of actively fixing those errors.

More context: https://github.com/dart-lang/sdk/issues/27223

munificent added a commit to dart-lang/test that referenced this issue Dec 13, 2017
In strong mode, a generic type instantiated with dynamic is not a
subtype of all types. You can't pass a List<dynamic> to something
expecting, say, List<int>.

These errors are usually detected statically, and most of those have
been fixed. However, sometimes this becomes a runtime cast, as in:

main() {
  // Store a List<dynamic> in a variable of type dynamic.
  dynamic d = [];

  // Implicit runtime downcast from dynamic to List<String>.
  List<String> s = d;
}

In order to ease the migration to strong mode, DDC has been ignoring
these cast failures when they involve certain commonly used types. We
are now in the process of actively fixing those errors.

More context: dart-lang/sdk#27223
munificent added a commit to dart-lang/test that referenced this issue Dec 18, 2017
Fix a couple of strong mode runtime cast errors.

In strong mode, a generic type instantiated with dynamic is not a
subtype of all types. You can't pass a List<dynamic> to something
expecting, say, List<int>.

These errors are usually detected statically, and most of those have
been fixed. However, sometimes this becomes a runtime cast, as in:

main() {
  // Store a List<dynamic> in a variable of type dynamic.
  dynamic d = [];

  // Implicit runtime downcast from dynamic to List<String>.
  List<String> s = d;
}

In order to ease the migration to strong mode, DDC has been ignoring
these cast failures when they involve certain commonly used types. We
are now in the process of actively fixing those errors.

More context: dart-lang/sdk#27223
@munificent munificent self-assigned this Dec 21, 2017
munificent added a commit to dart-lang/stack_trace that referenced this issue Feb 14, 2018
munificent added a commit to google/observable that referenced this issue Mar 1, 2018
In strong mode, a generic type instantiated with dynamic is not a
subtype of all types. You can't pass a List<dynamic> to something
expecting, say, List<int>.

These errors are usually detected statically, and most of those have
been fixed. However, sometimes this becomes a runtime cast, as in:

    main() {
      // Store a List<dynamic> in a variable of type dynamic.
      dynamic d = [];

      // Implicit runtime downcast from dynamic to List<String>.
      List<String> s = d;
    }

In order to ease the migration to strong mode, DDC has been ignoring
these cast failures when they involve certain commonly used types. We
are now in the process of actively fixing those errors.

More context: dart-lang/sdk#27223
munificent added a commit to google/observable that referenced this issue Mar 1, 2018
* Fix runtime cast failures.

In strong mode, a generic type instantiated with dynamic is not a
subtype of all types. You can't pass a List<dynamic> to something
expecting, say, List<int>.

These errors are usually detected statically, and most of those have
been fixed. However, sometimes this becomes a runtime cast, as in:

    main() {
      // Store a List<dynamic> in a variable of type dynamic.
      dynamic d = [];

      // Implicit runtime downcast from dynamic to List<String>.
      List<String> s = d;
    }

In order to ease the migration to strong mode, DDC has been ignoring
these cast failures when they involve certain commonly used types. We
are now in the process of actively fixing those errors.

More context: dart-lang/sdk#27223

* Update SDK constraints.

* Use newer dev version of the SDK on Travis.

* Bump minimum SDK constraint.
@dgrove dgrove removed this from the 1.25 milestone Mar 20, 2018
dart-bot pushed a commit that referenced this issue May 21, 2018
See #27223

Change-Id: I9689ce9a72597b3e5c945f9787f2de6c5e8c2074
Reviewed-on: https://dart-review.googlesource.com/54701
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
dart-bot pushed a commit that referenced this issue May 22, 2018
See #27223

Change-Id: Ia23edc3700a8e0bb3d982be9b0bb36ad4522091d
Reviewed-on: https://dart-review.googlesource.com/56033
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
@natebosch
Copy link
Member

Are these still ignored in the external SDK?

@vsmenon
Copy link
Member

vsmenon commented Aug 24, 2018

Should not be, but the hook is still there for internal.

@vsmenon vsmenon closed this as completed Jul 20, 2019
@vsmenon vsmenon added the area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. label Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. P1 A high priority bug; for example, a single project is unusable or has many test failures soundness status-blocked Blocked from making progress by another (referenced) issue web-dev-compiler
Projects
None yet
Development

No branches or pull requests

7 participants