(was reverted in https://dart-review.googlesource.com/c/sdk/+/40980
due to an analyzer bot breakage)
Original commit message:
Implement proper checking for callability of Function class.
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks. This flag has been removed, since the new
behavior is now standard in Dart 2.0.
Fixes#31509
Change-Id: Ice5cf38bbc648badf7f2563ff930b69f9a799635
Reviewed-on: https://dart-review.googlesource.com/41120
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This required some changes to analysis_server, since analysis_server
used to have its own version of pumpEventQueue(). Since
pumpEventQueue() is now provided by the test package, I've removed
analysis_server's version, and I've updated some of the call sites to
pass in "times: 5000" to replicate the old analysis_server behavior.
This also required some changes to analyzer, since the fail() method
is now marked as @alwaysThrows, so no code may follow it without
producing a dead code hint.
Change-Id: Ie5ef3a5cc685c18da02de699e59f63f3bb8865f7
Reviewed-on: https://dart-review.googlesource.com/32683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
After discussion with kmillikin@, sigmund@, and scheglov@, we decided
that specifying the patch files in libraries.dart is more complex (and
less flexible) than we'd like. This CL changes things so that the
patch files are specified in analysis options using a simple map from
library name (e.g. "dart:core") to a list of patch file paths.
Clients are now allowed to put patch files wherever they want; they
don't need to be inside the sdk directory.
Note that we no longer include the patch configuration in
encodeCrossContextOptions. This should be ok, since we don't have any
use case in which a single instance of analyzer needs to accommodate
multiple patch configurations.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2560323002 .
This fix partially reverts changes made in https://github.com/dart-lang/sdk/commit/de6925a23ebf29cd587dd5f4e214cb277a7397e4
It is correct that we should ignore applyChanges() for sources with
content overridden in the content cache. But we cannot know what else
happened with results in the analysis cache at this point. So, we
should just let Analysis Server to always run analysis, so that
Driver and WorkManager(s) will decide if there is anything to do.
I believe that the original motivation for the change was to avoid
sending extr 'analysis.implemented' notifications. It does not happen
anymore, probably because we set other shortcuts using source content.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27130
Review URL: https://codereview.chromium.org/2314933003 .
There are following changes:
1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2298913003 .
This way we would be able to redirect to the SDK context, or get some
results from packages. Setting ResultProvider into AnalysisDriver does
not allow us to do this.
My quick and dirty experiment with using SDK summaries is broken now,
but I'm going to start updating actual SdkAnalysisContext using
summaries, if the bundle exists in the SDK.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1555073003 .
- If a package has an '_embedder.yaml' file with an 'embedder_libs' key two things happen:
1) We do not use the DartUriResolver to resolve dart: libraries.
2) We use the EmbedderUriResolver to resolve all dart: libraries
- If multiple packages have an '_embedder.yaml' file we merge them.
- This might not be the final behaviour that we want but I'm not sure how to surface errors to the end user.
- The '_embedder.yaml' file has a top level key 'embedder_libs' which is a map from dart: library uri to source path. Other keys are ignored by the EmbedderUriResolver.
- Unit tests for analyzer
- Integration test for analysis_server.
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1437893003 .