-
Notifications
You must be signed in to change notification settings - Fork 1.7k
dev_compiler emits errors compiling SDK #27260
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
Comments
Here's the current count - many are analyzer warnings that we should treat as errors: package AE IMO IRCE STE LOC package AE IMO IRCE STE LOC Where: |
*** Compiling SDK to JavaScript |
From @jmesserly on May 27, 2015 22:23 for JSDouble/JSInt/JSBool/JSString, ideally we could find a way to make those work with the checker. My current CL that attempts to fix the double/int/bool/string methods is using those dart2js types. They're a little strange ... for one thing, they illegally implement the primitive interfaces ... and int/double/num have some magic typing rules for operators (special cases in the spec). Hmmm, maybe I will take another look at just getting rid of those types. |
Note, some of the errors are recently promoted analyzer warnings that were introduced in this CL: |
From @leafpetersen on May 27, 2015 23:12 The analyzer errors are (as you mention) new since I last looked at this. The _interceptor/ errors I had ignored, since it wasn't clear what we were going to do with that code. Some of it is definitely oddly typed. The (v is K) code is interesting. This seems to be the only use of this idiom in the sdk, but it's a pretty hard one to work around. We might want to allow these "is" checks and throw at runtime if they turn out to be questions we can't accurately answer. |
From @jmesserly on May 28, 2015 18:32 @leafpetersen not sure we can throw at runtime ... this is for map/set lookups. It would be unfortunate if If the key is "invalid", Set/Map want to bail early, rather than look up the item. Ignoring the test entirely (
If we did want to be more strict, IMO, we could just constrain lookup to require a K: V operator [](K key) { ... } That would disallow lookups from other key types. Alternatively, we can change how our SDK is implemented, it doesn't need to use the Of these, I think my favorite is the |
From @leafpetersen on May 28, 2015 19:46 Related: http://dartbug.com/23356 . |
From @jmesserly on May 28, 2015 20:9 ah, yup. I forgot about compareTo. Yeah that makes more sense. |
From @jmesserly on May 28, 2015 20:9 Based on that, maybe require |
From @jmesserly on June 24, 2015 19:15 Somewhat related: https://github.com/chalin/DEP-non-null/blob/master/doc/dep-non-null-AUTOGENERATED-DO-NOT-EDIT.md#ii32-dart-sdk-library the non-null DEP changes library methods like |
From @chalin on June 25, 2015 1:7 On Wed, Jun 24, 2015 at 12:15 PM, John Messerly [email protected]
bool isSubset(MySet s, MySet t) { will result in a dynamic type error when invoked with sets, say, {'a', 1} CheersPatrice [image: View my LinkedIn Profile.] |
From @jmesserly on June 26, 2015 17:55 btw, we should look at warnings too. DownCastComposite casts probably fail. For example:
from this code: factory StreamController({void onListen(),
void onPause(),
void onResume(),
onCancel(),
bool sync: false}) {
if (onListen == null && onPause == null &&
onResume == null && onCancel == null) {
return sync
? new _NoCallbackSyncStreamController/*<T>*/()
: new _NoCallbackAsyncStreamController/*<T>*/();
}
return sync
? new _SyncStreamController<T>(onListen, onPause, onResume, onCancel)
: new _AsyncStreamController<T>(onListen, onPause, onResume, onCancel);
} |
From @jmesserly on September 18, 2015 15:18 fyi, I landed a change to allow us to implement the disallowed types (e.g. int/double/bool/String) so when we update Analyzer, those will go away at least. |
From @jmesserly on September 18, 2015 21:28 more progress: https://codereview.chromium.org/1348453004/ |
From @jmesserly on September 19, 2015 0:12 dart-archive/dev_compiler@94d823b too |
We have errors here again. Marking as a soundness issue as we're force compiling. |
@vsmenon this is starting to look a bit stale, is this still an issue? |
@munificent - can you triage & reassign this to the actual libraries with errors? Some may be in DDC patch files, but I believe most are in shared SDK code: https://github.com/dart-lang/sdk/blob/master/pkg/dev_compiler/tool/sdk_expected_errors.txt |
@munificent any updates here? Do we need this for 1.23? |
I'll take a look. I don't think we need it for 1.23, but @vsmenon can correct me if I'm wrong. |
Should we open an issue under the SDK label? this isn't really a DDC issue anymore (except inasmuch as we have patch file problems). See also #29296 |
Any updates here? |
Yes! Florian fixed most of the SDK errors, and I fixed a couple more. He didn't rebuild the DDC SDK, so you don't see him in the history, but you can see most of the errors going away. We're down to 12 errors and a pile of warnings. All of the warnings are the same root cause in dart:html. The errors are here and there. I'll try to beat them into submission. I don't see anything too alarming, except for |
FYI @munificent -- I previously split out min/max into issue #28909, it has a link to your old CL and some backstory. |
Ah, cool. Thanks. I'll claim that and try to get it fixed. |
Is this on target for 1.24? |
No, good progress, but html ones will not be done in time. |
Errors gone in html now. Still have some bogus warnings. |
🎉 🎉🎉🎉🎉🎉 |
From @jmesserly on March 19, 2015 17:42
related to dart-archive/dev_compiler#58, but this is tracking the errors instead of the JS code issues. The errors can be seen with:
Copied from original issue: dart-archive/dev_compiler#103
The text was updated successfully, but these errors were encountered: