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
2 late field of the same type leads to error #2273
Comments
FWIW this issue is blocking flutter migration to nullsafety. |
Where's the cringey-face emoji... What a weird bug. I'll look at this today. |
dartdoc does not see your source as being opted in to the null-safety feature. There are like, 17 reasons this might be, haha. Can you check the following:
analyzer:
enable-experiment:
- non-nullable
|
yes I have a simple package with
And I run You can see the failure on my flutter PR https://cirrus-ci.com/task/4975447580606464?command=main#L137 |
@srawlins have you been able to reproduce the issue? |
Is this blocking the migration? Blocking some aspect of it? Do you have a workaround in the near-term? |
I have not been able to reproduce this when opting in to null safety via pubspec: environment:
sdk: '>=2.9.0-18.0 <2.9.0' and analysis_options: analyzer:
enable-experiment:
- non-nullable and using dartdoc at head, running
I am in the process of releasing dartdoc, since its been a while. I'll also check on the current most recent release. |
Yes because
Remove all |
The failing job mention |
Gotcha; I was hoping for some flags we could pass to dartdoc (or flags we could omit) which would let us proceed in the meantime. @srawlins - I think a fix here will be important to let the nnbd migration progress generally. |
Yes it looks like I can reproduce this on 0.32.1, using Dart 2.10.0-dev.something. There is an unreleased 0.32.2 which might work. I'll try that as well. |
Scratch that. I had a stray I cannot reproduce the error with |
FWIW, I don't see |
I don't see |
Good catch! It should fix the issue. (But locally I really don't know what I did to see this issue) |
Let us know if that works. I plan on publishing dartdoc tomorrow morning, after it is vetted internally. |
Adding |
With 2 late fields of the same type like the following code:
dartdoc --enable-experiment=non-nullable
outputs error:With only one late field no issue appears.
The text was updated successfully, but these errors were encountered: