-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Incremental compiler fails to compile flutter hello_world example app #30491
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
This is needed for #28051 |
I looked a bit into this with
I believe the right fix for the latter is to update how we deal with extraLibraryDependencies, I'll follow up on that. Most likely I'll remove Finally the issue reported above I believe is due to the re-exports, so they should also be covered once we fix #30448 |
sent https://codereview.chromium.org/3006483002 to address the issue in source loader, and https://codereview.chromium.org/3007503002/ to address the issue with For the latter, turns out IKG already had some of the logic for the implicit imports, but it was hardcoded to consider the VmTarget only, rather than the target that was being used during compilation. I started an email discussion to change how we use "extraRequiredLibraries" long term, but those 2 CLs should address your issues here. One issue remains about exports, which is tracked in #30448 |
Awesome, thanks @sigmundch ! |
I landed the fix for |
Thanks @sigmundch , but somehow, on eed3b5e I'm still getting many warnings when compiling with IKG:
Not sure if submitted CLs intended to get rid of those in IKG. |
Unfortunately no - I believe all those errors are a consequence of a reexport, so they will only be addressed after a fix for #30448 lands. The changes above fix the other minor issues we found in the process of reproducing your error:
|
@aam - the final fix is not in, but @peter-ahe-google just landed a workaround for #30448 in aff5d76. Can you give it a try? |
Thanks folks. Just sync'ed to aff5d76 and tried flutter gallery build - there are no warning messages, but now there is an error produced:
|
Do you use FileByteStore, or MemoryByteStore? This commit changes our expectations about libraries, so old entries in persistent ByteStore are not valid. Try to remove the results in the file system cache, or increment |
@scheglov , if I understand correctly, I didn't explicitly set which byte store to use(https://github.com/flutter/engine/blob/master/frontend_server/lib/server.dart#L114), so it defaulted to NullByteStore. |
You're correct. |
Hey Alex - this looks like a bug in the implementation with the exports. We actually noticed that the line you are hitting could cause a crash, but I thought it could only arise from erroneous code, we'll investigate and keep you posted. Thanks for giving it a shot! |
I took a brief look, and it seems the way fasta is declaring shared mixins is creating a conflict where there shouldn't be one (basically the "nits" you saw above the error). I filed #30553 to track that issue. The situation described in that bug comes up in the flutter package, and as a result, you are hitting the bugs in the implementation that follow up from that. It might be possible that the program will run if we ignore those nits, as long as we fix the bugs in the implementation. I created https://codereview.chromium.org/3004643002/ to address the bugs, if you have a chance and can patch it in, let me know if that addresses the issues. You'll likely continue to see the nits until #30553 gets fixed. |
I have a fix for #30553, please see that bug for a link to the code review if you'd like to patch it in. |
Thanks Peter! Alex - Peter also landed fixes for the null error, so the CL I sent out is now unnecessary and you can ignore it. |
Thank you folks! Both fixes(including Peter's 30553) seem to work nicely. Only diagnostics that is reported for flutter gallery app points to identifiers exported from two libraries and overridden methods not having matching signatures(see below). Not sure if it is as expected. (last one about super class mixin method reference is as expected).
|
On Mon, Aug 28, 2017 at 6:33 PM, Alexander Aprelev ***@***.*** > wrote:
Thank you folks! Both fixes(including Peter's 30553) seem to work nicely.
Only diagnostics that is reported for flutter gallery app points to
identifiers exported from two libraries and overridden methods not having
matching signatures(see below). Not sure if it is as expected. (last one
about super class mixin method reference is as expected).
[+7516 ms] compile debug message: '$tilde' is exported from both 'package:charcode/ascii.dart' and 'package:charcode/html_entity.dart'.
[ +9 ms] compile debug message: '$minus' is exported from both 'package:charcode/ascii.dart' and 'package:charcode/html_entity.dart'.
[ ] compile debug message: '$sub' is exported from both 'package:charcode/ascii.dart' and 'package:charcode/html_entity.dart'.
This suggests updating charcode to version 1.10, which fixed those
conflicts.
[+1609 ms] compile debug message: Declared type variables of 'CachingIterable::map' doesn't match those on overridden method 'Iterable::map'.
[ ] compile debug message: Declared type variables of 'CachingIterable::expand' doesn't match those on overridden method 'Iterable::expand'.
[ +2 ms] compile debug message: Declared type variables of 'SynchronousFuture::then' doesn't match those on overridden method 'Future::then'.
[ +35 ms] compile debug message: Declared type variables of '_DelegatingIterableBase::map' doesn't match those on overridden method 'Iterable::map'.
[ ] compile debug message: Declared type variables of '_DelegatingIterableBase::fold' doesn't match those on overridden method 'Iterable::fold'.
[ ] compile debug message: Declared type variables of '_DelegatingIterableBase::expand' doesn't match those on overridden method 'Iterable::expand'.
[ +6 ms] compile debug message: Declared type variables of 'TickerFuture::then' doesn't match those on overridden method 'Future::then'.
[ +145 ms] compile debug message: Declared type variables of '_TypeSafeIterableBase::map' doesn't match those on overridden method 'Iterable::map'.
[ ] compile debug message: Declared type variables of '_TypeSafeIterableBase::fold' doesn't match those on overridden method 'Iterable::fold'.
[ ] compile debug message: Declared type variables of '_TypeSafeIterableBase::expand' doesn't match those on overridden method 'Iterable::expand'.
[ +5 ms] compile debug message: Declared type variables of 'DelegatingFuture::then' doesn't match those on overridden method 'Future::then'.
[ ] compile debug message: Declared type variables of 'DelegatingStreamSubscription::asFuture' doesn't match those on overridden method 'StreamSubscription::asFuture'.
[ +2 ms] compile debug message: Declared type variables of '_TransformedSubscription::asFuture' doesn't match those on overridden method 'StreamSubscription::asFuture'.
[ ] compile debug message: Declared type variables of 'TypeSafeFuture::then' doesn't match those on overridden method 'Future::then'.
[ ] compile debug message: Declared type variables of 'TypeSafeStream::asyncExpand' doesn't match those on overridden method 'Stream::asyncExpand'.
[ ] compile debug message: Declared type variables of 'TypeSafeStream::map' doesn't match those on overridden method 'Stream::map'.
[ ] compile debug message: Declared type variables of 'TypeSafeStream::asyncMap' doesn't match those on overridden method 'Stream::asyncMap'.
[ ] compile debug message: Declared type variables of 'TypeSafeStream::transform' doesn't match those on overridden method 'Stream::transform'.
[ ] compile debug message: Declared type variables of 'TypeSafeStream::fold' doesn't match those on overridden method 'Stream::fold'.
[ ] compile debug message: Declared type variables of 'TypeSafeStream::drain' doesn't match those on overridden method 'Stream::drain'.
[ ] compile debug message: Declared type variables of 'TypeSafeStream::expand' doesn't match those on overridden method 'Stream::expand'.
[ +1 ms] compile debug message: Declared type variables of 'TypeSafeStreamSubscription::asFuture' doesn't match those on overridden method 'StreamSubscription::asFuture'.
Looks like it's all methods that have become generic, so perhaps some
implementation is not be up-to-date with that.
|
I'm guessing this relates to erasure: the compiler is applying an erasure transformation. We normally do this whenever we build a program, so IKG does it more than when you do batch compilation (so you are more likely to see it). This is being tracked at: #30455 |
Thank you, @lrhn , for taking a look at the warnings. Are you talking about https://github.com/dart-lang/charcode ? Latest version that seems to be available is 1.1.1. |
Yes, that is |
Something else seems to be going on. The code does use 1.1.1 only, nobody refers to 1.1.0 of |
That was not a bug I was expecting, but it does indeed explain the symptoms. I guess hides in exports are rare enough that it hasn't been caught before. |
@scheglov I can't reproduce the problem with hides in exports in non-incremental. Could this be an issue with |
I don't think so, but it occurred to me that we don't need rebuilding export scopes any more, so I removed it. |
Here is repro for the problem with
|
Fix in CL 3004123002. |
Thank you @peter-ahe-google ! |
I believe this issue is now obsolete, but please reopen if I was mistaken. |
IKG compiler for flutter hello_world fails to resolve dart:ui class references, produces warnings and errors to in that regard. It's behavior is different from batch compiler
kernelFromProgram
, which compiles flutter examples correctly.Snippet of the errors:
The text was updated successfully, but these errors were encountered: