Commit Graph

142 Commits

Author SHA1 Message Date
Konstantin Shcheglov 5455fd0118 Remove 'initializeTestEnvironment' from 'analyzer'.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2399913002 .
2016-10-06 10:18:54 -07:00
Konstantin Shcheglov 175dad4f15 Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2391423003 .
2016-10-06 08:46:35 -07:00
Brian Wilkerson ecc84b26a4 Break up another large file
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Konstantin Shcheglov e832ab5248 Remove deprecated ChangeSet.deletedSources.
It is not used internally.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2331753002 .
2016-09-11 09:37:07 -07:00
Konstantin Shcheglov 9cf47ce04c Remove parseUriWithException() and URISyntaxException.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2321263003 .
2016-09-09 08:30:01 -07:00
Konstantin Shcheglov e976e692be Replace and remove JavaException(s).
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2326813002 .
2016-09-08 15:56:33 -07:00
Konstantin Shcheglov 7442a85cbb Issue 27130. Fix applying changes to .analysis_options on save.
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 .
2016-09-06 13:41:48 -07:00
Konstantin Shcheglov f096f7b985 Flush results when contexts are made idle.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2297343002 .
2016-08-31 14:03:25 -07:00
Konstantin Shcheglov cc6beaf56d Pull in test_reflective_loader 0.0.4 and switch analyzer to it.
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 .
2016-08-31 13:46:39 -07:00
Brian Wilkerson b888675b55 Move embedder locator and convert context builder to use the new API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2208503004 .
2016-08-04 10:41:53 -07:00
Konstantin Shcheglov ed887c09d1 Validate cache consistency asynchronously. Compute modification times of physical files in a separate isolate.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2132073003 .
2016-07-08 15:01:05 -07:00
Jaime Wren b7aff9c72f Initial Bazel file resolver support.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2079873002 .
2016-06-17 14:20:55 -07:00
Brian Wilkerson 5c97a88ddd Remove embedder locator from analysis context
R=pquitslund@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2078993002 .
2016-06-17 09:42:27 -07:00
Brian Wilkerson 7eddfb7394 Fix cross-partition dependency handling (issue 26466)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2008133002 .
2016-05-25 07:43:01 -07:00
Brian Wilkerson f9b575e5b3 More strong mode changes to analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1855643002 .
2016-04-01 18:00:04 -07:00
Brian Wilkerson 6dae827b70 More strong mode fixes for analyzer
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1842363004 .
2016-04-01 09:35:22 -07:00
Konstantin Shcheglov 3af20476d1 Add AnalysisContext.onResultInvalidated(descriptor).
This method will be used to remove index entries corresponding to
invalidated resolved units.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1776023002 .
2016-03-08 12:55:06 -08:00
pq e902b07ed4 Engine test fix to keep up with SourceFactory changes.
BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1645173002 .
2016-01-28 12:57:45 -08:00
Brian Wilkerson 21ecb14548 Clean-up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1602803002 .
2016-01-18 15:42:16 -08:00
Konstantin Shcheglov 78aad4c282 Fix the build - add the new field.
TBR

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1598183003 .
2016-01-17 09:41:21 -08:00
Konstantin Shcheglov a2d615e52a Replace ResultProvider with 'aboutToComputeResult'.
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 .
2016-01-04 10:19:16 -08:00
Brian Wilkerson 2a190aa11a Fix imports within the analyzer package
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1524893002 .
2015-12-14 12:25:41 -08:00
Konstantin Shcheglov 72cf3cbe91 Remove unnecessary 'noSuchMethod' declarations.
Also format these file.
I don't like how the new formatter changed the code :-(

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1507813004 .
2015-12-08 11:39:37 -08:00
Brian Wilkerson ea3ba0e31f Remove deprecated code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1502213002 .
2015-12-07 10:24:36 -08:00
Brian Wilkerson b9644af695 Remove the old task model
Review URL: https://codereview.chromium.org/1490233007 .
2015-12-03 10:14:06 -08:00
Brian Wilkerson 600fc17de1 Clean-up the registration of plugins
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1487953002 .
2015-12-02 13:25:28 -08:00
Brian Wilkerson 4ae8540383 Revert "Clean-up the registration of plugins"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1465983004 .
2015-11-20 14:04:53 -08:00
Brian Wilkerson 1367d2d47d Clean-up the registration of plugins
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/1460123002 .
2015-11-20 08:14:14 -08:00
Konstantin Shcheglov b46dd600d0 Remove unused declarations - skip summaries and completion.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1462463004 .
2015-11-18 15:21:01 -08:00
Konstantin Shcheglov de6925a23e Add ApplyChangesStatus to AnalysisContext.applyChanges() and use it in DAS.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1448173002 .
2015-11-16 19:42:15 -08:00
John McCutchan bb4d547a5d Add _embedder.yaml support to analyzer and analysis_server
- 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 .
2015-11-16 15:30:17 -08:00
pq 53d791d626 Option support for enableGenericMethods.
* Adds `enableGenericMethods` language configuration support to `.analysis_options`:

  analyzer:
    language:
      enableGenericMethods: true

  (with validation).

* Fixes `AnalysisOptionsImpl` to properly set (and copy) enableGenericMethods settings.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1412573012 .
2015-11-06 10:31:26 -08:00
pq 888c4c526f State-carrying context API.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1403033002 .
2015-10-14 15:33:09 -07:00
Konstantin Shcheglov ebdfa991d4 Issue 24538. Route SDK results into SDK context DartWorkManager.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24538

Review URL: https://codereview.chromium.org/1399873002 .
2015-10-09 21:45:35 -07:00
Leaf Petersen a19bd39da8 First cut at abstracting over the type system. This factors out uses of isAssignableTo and isSubtypeOf into calls through a type system object. Currently there is only one kind of type system, which just falls over to the existing implementations.
BUG=
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1329743005 .
2015-09-16 14:55:59 -07:00
Konstantin Shcheglov 3d1da0f320 Add AnalysisContext.getResult()/computeResult()
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1308033008 .
2015-08-28 13:57:25 -07:00
Konstantin Shcheglov 597f189eb4 Extension point for WorkManagerFactory(s).
I'm not quite happy that internal classes get into the extension point declaration.
But I guess that because of the nature of the work WorkManager(s) are doing, we have to have significant exposure to internals.

Also, onAnalysisOptionsChanged() and onSourceFactoryChanged()... these probably are better to implement as streams in InternalAnalysisContext.
Thoughts?

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//1311773005 .
2015-08-26 09:45:19 -07:00
John Messerly 6417c36b0a [analyzer] remove "auto-generated do not edit" comments
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1291143002 .
2015-08-13 13:36:02 -07:00
Brian Wilkerson 908708d655 More fixes for failures on the Windows bot
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
Paul Berry fcfea00af8 Implement DEP 34 (less restricted mixins) in analysis engine.
The feature is disabled by default; enable it by setting the option
"enableSuperMixins".  (This name was chosen to match the
"--supermixin" flag accepted by the VM).

The feature is not yet exposed through analysis server or the
analyzer_cli.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1262163002 .
2015-07-29 08:50:49 -07:00
Brian Wilkerson f241b383a9 Implement a strong-mode option in analyzer
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//1241243003 .
2015-07-20 12:30:05 -07:00
Brian Wilkerson d37ac8d4d0 Fixed bug in implicit analysis notification and renamed tests
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1236013003 .
2015-07-17 12:43:59 -07:00
Brian Wilkerson 503e2b68f1 Add hook for listening to implicitly analyzed files
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1239863002 .
2015-07-16 08:10:38 -07:00
Paul Berry 4b83219847 Switch on null-aware operators by default in analyzer.
Patches to update analyzer_cli and analysis_server will follow once a
new version of analyzer has been published.

BUG=dartbug.com/23793
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1239513005 .
2015-07-13 15:56:21 -07:00
Konstantin Shcheglov aa4efb8c6e One more fix for making removing overlays incremental changes.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1214853028 .
2015-07-07 14:51:44 -07:00
Konstantin Shcheglov 2a2259aec7 Try to use incremental resolution after removing overlays.
Mostly for IDEA, because Editor updates overlays before removing them.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1218573003.
2015-07-06 09:19:26 -07:00
Brian Wilkerson e575dfe1d8 Remove dead code for an unused (old) task
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1215433008.
2015-06-29 13:23:38 -07:00
Brian Wilkerson 0513859704 Re-implement the status page for the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1211243003.
2015-06-29 12:20:19 -07:00
Brian Wilkerson c9069537d8 Get more tests passing using the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1211993003.
2015-06-26 07:43:27 -07:00
Paul Berry 160645fba6 Add an analyzer method to flush resolved ASTs (for testing).
This should allow us to avoid referring to some private implementation
details of analyzer from analysis server.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1210603002.
2015-06-24 13:16:58 -07:00