-
Notifications
You must be signed in to change notification settings - Fork 125
Enable strong-mode, test FutureOr. #1507
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
Conversation
I'm a fan! |
I see two travis failures - one for Flutter and one for the core SDK after this.
A link to this SDK shows: static final Endianness HOST_ENDIAN =
(new ByteData.view(new Uint16List.fromList([1]).buffer)).getInt8(0) == 1
? LITTLE_ENDIAN
: BIG_ENDIAN; ... it looks kosher? I don't really understand this error.
I can fix this assertion to be fine with strong-mode, but I would like @jcollins-g's reaction first. |
🤷♂️
…On Thu, Sep 28, 2017 at 10:14 PM, Matan Lurey ***@***.***> wrote:
I see two travis failures - one for Flutter and one for the core SDK after
this.
- Flutter fails due to a single test
<https://travis-ci.org/dart-lang/dartdoc/jobs/281156206>:
dartdoc:stdout: [error] The list literal type 'List<dynamic>' isn't of expected type 'List<int>'. The list's type can be changed with an explicit generic type argument or by changing the element types. at /home/travis/build/dart-lang/dartdoc/doc/flutter/bin/cache/pkg/sky_engine/lib/typed_data/typed_data.dart, line 396.
A link to this SDK
<https://github.com/dart-lang/sdk/blob/master/sdk/lib/typed_data/typed_data.dart#L396>
shows:
static final Endianness HOST_ENDIAN =
(new ByteData.view(new Uint16List.fromList([1]).buffer)).getInt8(0) == 1
? LITTLE_ENDIAN
: BIG_ENDIAN;
... it looks kosher? I don't really understand this error.
- Core SDK: A failure during grinder
<https://travis-ci.org/dart-lang/dartdoc/jobs/281156207>
Generation failed: 'package:dartdoc/src/model.dart': Failed assertion: line 3038 pos 12: '!name.isEmpty ||
(this.element is TypeDefiningElement &&
(this.element as TypeDefiningElement).type.name == "dynamic")': is not true.
dart:core _AssertionError._throwNew
I can fix this assertion to be fine with strong-mode, but I would like
@jcollins-g <https://github.com/jcollins-g>'s reaction first.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1507 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABCigvi5bziPH8nnwhNdNFTdMa3i79eks5snHyxgaJpZM4PoM3O>
.
|
FYI: I just tried running the code on master and got the same assert RE SDK. |
The assert is fixed in #1506, however there are other problems in the flutter travis that seem to be related to pub that I'm currently debugging. I'll finish reviewing this once the build is fixed but the general principle looks good. |
Thanks @jcollins-g - not a priority if you're working on something else, just trying to help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've won my battle with the bots, this LGTM. Try merging with head and re-pushing the branch, bots should pass now.
woo hoo! |
@jcollins-g I still see:
on travis. Anything special I should do? Maybe I'm not synced? |
There is likely an analysis option that is missing but required to properly analyze Flutter with strong mode enabled. Dartdoc doesn't obey analysis options files the same way analyzer does, so this change usually involves reading the affected code and any relevant analysis options files, and if possible, adding the option in the same place you just did. |
Sorry for the delay. I just re-merged against master, and tests pass locally. Let's see if travis likes me 🙏 |
250fccf
to
94d12a5
Compare
😢 Flutter bot still doesn't like me. It looks like it is: I don't think it is an additional analysis option, it looks like it flags |
I've got this mostly working in a different branch now, however there is still one little wart in Flutter -- we generate a new broken link with strong-mode on. |
This probably should be blocked on #1561. |
Will be closed/replaced by #1611! |
Closes #1482.
This is a breaking change, and has been documented as such. Specifically, it looks like we now are using strong-mode inference, so many
dynamic
elements have become non-dynamic. That's probably a good thing?(
FutureOr
looks great after this)/cc @kevmoo @sethladd - is enabling
strong-mode
OK here?