Before this CL, the invalidated URLs would be cleared sooner than we
threw away the old "userCode".
On a compile time error (issuing an erroneousComponent) we restore
the old userCode, thus in practical terms forgetting about whatever
had been invalidated prior to that.
This CL introduces a test and fixes the problem.
Change-Id: I8f5329c2f499ec3842d0b7d67e2eda1de1e7d938
Reviewed-on: https://dart-review.googlesource.com/52321
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
In a86b864fa9 the incremental compiler was
updated to always bypass the cache when getting a UrlTranslator to be
able to handle the case where .packages had been updated.
This was driven by Flutter not invalidating .packages.
This has now been introduced in flutter with
https://github.com/flutter/flutter/pull/16467
and we can now limit when we bypass the cache to when the .packages file
has been invalidated.
This CL does just that, and further more adds tests where .packages either
appears or disappears.
Change-Id: I3e2d001a993a59c115bc00fcf714f97094357d35
Reviewed-on: https://dart-review.googlesource.com/50940
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Prior to this CL a builder loaded from a dill file - but where the
file has now been deleted (and we've previously been told about it) -
was kept around, meaning that it could get resurrected in a later
call to computeDelta.
This CL introduces a test and fixes the problem.
Change-Id: Ia18639a1387b37f8d641f803f202288dd185af5c
Reviewed-on: https://dart-review.googlesource.com/50722
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Before this CL, if initializing from a dill file, and then,
at a subsequent call to computeDelta asks for the full Component,
the sources from the originally loaded libraries was missing.
This also meant that some fileUris were missing.
This can basically break Flutter.
This CL introduces tests that catch this, fixes the issue and bumps the
kernel version to force recompilation in Flutter.
Change-Id: I9f62962db017cec232855377835103ffc324820b
Reviewed-on: https://dart-review.googlesource.com/49642
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This CL addresses comments from previous CLs, renaming variables and
handles change package versions.
Change-Id: I83cf4a33bffe82ec137a32710cd6e8ff7f25ec8b
Reviewed-on: https://dart-review.googlesource.com/49161
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This CL follows up on a previous CL, renaming "simple tests" to
"basic tests" and gets rid of names in tests, as they no longer matter.
Change-Id: Id66368f26f8e2e36a8034d237f1708b30562de86
Reviewed-on: https://dart-review.googlesource.com/49160
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
When incrementally compiling, we can have builders for things that aren't
included anymore. Such builders should not introduce errors.
Change-Id: Ia0487d84819028913d54f6b55a2882e620009bd9
Reviewed-on: https://dart-review.googlesource.com/47223
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Prior to this CL, if loading a library from the dill file what ends
up being unused in the new program it would still be included in the
output. This CL introduces a test and fixes the problem.
Change-Id: I60dd9c3b6bdb959e103f0d2a5653d036b6653140
Reviewed-on: https://dart-review.googlesource.com/46983
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Prior to this CL, if incrementally compiling something and the .packages
file changed we could get a crash when trying to translate a package url.
This CL introduces a test and fixes the problem.
Change-Id: Ie1874780df7ade394eecef05835b0d9203f4c2b5
Reviewed-on: https://dart-review.googlesource.com/46982
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Split into 2:
- One with a "smoke-test" of dart2js.
- One with several small examples that has caused problems in the past.
The latter of the two is now based on package:testing and the test-cases
are saved as yaml files.
Change-Id: I8b588e9b42edc73f58a07292a1226e37cc458d89
Reviewed-on: https://dart-review.googlesource.com/45505
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>