Commit Graph

4090 Commits

Author SHA1 Message Date
pq 6d9cb5e48a Move diagnostics to diagnostics domain (#24931).
Still flagged `experimental` so no docs created.

See: https://github.com/dart-lang/sdk/issues/24931

BUG=24931
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1453433002 .
2015-11-16 14:10:10 -08:00
Konstantin Shcheglov c295410852 If analysis is already complete, don't start it again in onFileAnalysisComplete().
This should fix the first two problems you found yesterday in the IDEA / DAS log - start/stop analysis on analysis.getErrors and as a consequence an extra analysis.implemented notification.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1451893002 .
2015-11-16 14:00:51 -08:00
Konstantin Shcheglov 9b7e011920 Optimize 'isWithin'.
Its "in stack" percent is down from 2.82% to 0.16% now.

This makes total MDL project analysis about 3% faster.

Also exchange the 'suffix' arguments to make them consistent with the parent/child order everywhere else.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1444983002 .
2015-11-16 08:45:27 -08:00
Konstantin Shcheglov 508b70bdab Replace Glob implementation.
This makes MDL analysis another 5% faster.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1452473002 .
2015-11-15 12:17:17 -08:00
Konstantin Shcheglov f464e2eddb Use AbsolutePathContext in Folder.contains().
This makes MDL analysis about 5% faster, from 5900 samples to 5600 samples.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1444943003 .
2015-11-15 09:33:16 -08:00
Konstantin Shcheglov b45f941d1e Optimize work with absolute paths.
This significantly improves MDL project analysis time.

Cold VM: 24600 ms -> 21586 ms, about 14% faster.
Hot  VM: 13100 ms -> 10080 ms, about 30% faster.

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

Review URL: https://codereview.chromium.org/1443173004 .
2015-11-14 14:40:47 -08:00
Konstantin Shcheglov 610401a8d5 Fix for the watcher leak.
We need not just to cancel the subscription, but also to remove it from the map.

It's not so bad now for the MDL project, but any similar project will use a lot
of memory even after closign the project. This may be the reason of one of
the issues opened against DAS.

R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/24613

Review URL: https://codereview.chromium.org/1447603004 .
2015-11-13 18:23:58 -08:00
pq a8ef8cf84e Fix to suppress (redundant) parse error reporting.
Background: https://github.com/dart-lang/sdk/issues/24911

BUG=24911
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1439403002 .
2015-11-13 10:25:29 -08:00
pq eac5a0eb15 Status page indicator for contexts w/o .packages.
For diagnostic purposes.

See: https://github.com/dart-lang/sdk/issues/24900 for more context.

BUG=24900
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1436343002 .
2015-11-12 14:49:40 -08:00
pq 92fdffbf29 Revert package logging (moving to status pages).
Context:

https://github.com/dart-lang/sdk/issues/24900

BUG=24900
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1441673003 .
2015-11-12 13:58:47 -08:00
pq 4680736a8f Server notification to indicate pub list-dir fallback.
For diagnostic purposes.

See: https://github.com/dart-lang/sdk/issues/24900 for more context.

BUG=24900
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1438293002 .
2015-11-12 13:24:25 -08:00
pq 60e04f734a Static warning fixes.
The good news is that I reproduced a server issue; the bad news is I landed a change with unnoticed static warnings! :/

(This fixes them.)

BUG=

Review URL: https://codereview.chromium.org/1441763002 .
2015-11-12 10:22:20 -08:00
pq b0a08827aa Improves options validation type safety (#24885).
Fixes #24885.

https://github.com/dart-lang/sdk/issues/24885

BUG=24885
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1437703003 .
2015-11-12 09:44:25 -08:00
Konstantin Shcheglov 5b61845221 Send any logError() information to the IDE.
I have not seen any errors sent so far after several minutes of playing with it.
Adding and removing files does not cause any errors.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1432423004 .
2015-11-12 08:16:24 -08:00
Brian Wilkerson e1c39602ba Guard against null pointer exception in status page generation
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1440693004 .
2015-11-11 14:54:57 -08:00
Konstantin Shcheglov 31b1288f06 Fix for test - don't depend on the order of errors.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1434063002 .
2015-11-11 14:03:54 -08:00
Konstantin Shcheglov 02fe5bcd5a Exclude 'doc' folders.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1439723002 .
2015-11-11 13:10:35 -08:00
Konstantin Shcheglov 0e712ea00c Remove task inputs performance statistics.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1432293002 .
2015-11-11 10:04:17 -08:00
Konstantin Shcheglov e4fae0658d Tweaks for the status page.
1. We need to escape Element toString().
2. Wrap separate lists into <li>.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1416603008 .
2015-11-06 12:47:44 -08:00
Konstantin Shcheglov a19b2985dc Fix for the case when a class appears twice in a type hierarchy.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1406403009 .
2015-11-06 11:14:30 -08:00
pq 82e83bb34d Experimental getDiagnostics request (#24480).
* Adds `getDiagnostics` request with *very* provisional diagnostics payload (primary goal here is to plumb this fully through and iterate).
* Updates codegenerator to skip doc generation for experimental APIs.

Additional context here: https://github.com/dart-lang/sdk/issues/24480.

BUG=24480
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1416093007 .
2015-11-05 15:05:21 -08:00
Konstantin Shcheglov 61ee6dff5f Roll instrumentation log files.
Keep up to 5 old log files.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1418143006 .
2015-11-05 08:40:43 -08:00
Konstantin Shcheglov dee2660831 Publish new analyzer version and use in analysis_server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1408943008 .
2015-11-04 10:33:38 -08:00
Konstantin Shcheglov d49d0f7e06 Wait for InstrumentationService.shutdown() before exit(0).
Otherwise we don't get the last portion of instrumentation data in the
file at all.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1413403007 .
2015-11-04 10:08:20 -08:00
pq 9e9b7c0aaf Add Server PID to Server Status page.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1415573012 .
2015-11-04 09:25:42 -08:00
Brian Wilkerson aaaf7c2de8 Fix glob patterns to work on Windows
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1426353002 .
2015-11-03 15:35:26 -08:00
pq 7a6bf51504 Doc generator tweak to skip experimental domains.
Prevents domains flagged as experimental from having server apidocs generated.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1419793004 .
2015-11-03 13:12:00 -08:00
Konstantin Shcheglov f49612ba51 Covering expression offsets/lengths integration.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1411973006 .
2015-11-03 10:45:17 -08:00
Konstantin Shcheglov 069ba985de Fix protocol for EXTRACT_LOCAL_VARIABLE and coveringExpressionOffsets/lengths.
Unfortunately we have to make coveringExpressionOffsets and coveringExpressionLengths optional.
Otherwise new clients cannot correctly parse responses from old servers.

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

Review URL: https://codereview.chromium.org/1407333006 .
2015-11-03 10:19:41 -08:00
Brian Wilkerson 879cf82b6b Rework analyzed files support to use globs
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1413643006 .
2015-11-03 07:11:29 -08:00
Konstantin Shcheglov 128250a9ea Compute covering offsets/lengths.
Drop support for binary expressions fragments.

Reduce number of reported problems, provide best guess results instead.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1431673003 .
2015-11-02 18:22:12 -08:00
Paul Berry ac5578d03d Refactor analysis server code generation to re-use logic from analyzer.
The code generation infrastructure logic is now shared.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1431683002 .
2015-11-02 16:18:03 -08:00
Konstantin Shcheglov 1bc7f93009 Adding a not explicit source makes it explicit.
When we add a new file in IDEA and open it in the editor, this causes
analysis.setSubscriptions to be send immediately, even before watcher
notices it. The server reacts by requesting the fully resolved unit, and
so causes creation of a not-explicit CacheEntry. So, when later we handle
applyChanges(), the entry already exists. In this case we still need to
mark it as explicit.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1411243010 .
2015-10-30 08:04:27 -07:00
Konstantin Shcheglov 765c7fd0f1 Mark HintCode.CAN_BE_NULL_AFTER_NULL_AWARE as fixable.
R=pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org/1428903002 .
2015-10-30 08:02:29 -07:00
Konstantin Shcheglov 03eed1c3c9 Fix for duplicate priority sources.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1408163008 .
2015-10-29 17:46:00 -07:00
pq af7017e585 Option support for enableSuperMixins (and more).
* Adds language configuration support to `.analysis_options`:

  analyzer:
    language:
      enableSuperMixins: true

  (with validation).

* Extracts context configuration out of `server` context_manager and into `analyzer` where it can be re-used by `analyzer_cli`.
* Some general cleanup of option validation (with more to come!)

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1423333002 .
2015-10-29 14:11:26 -07:00
Konstantin Shcheglov 851dc4ea97 Quick Fix for CAN_BE_NULL_AFTER_NULL_AWARE.
Also fix for false positive :-(

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1423993005 .
2015-10-29 13:47:17 -07:00
Konstantin Shcheglov 7b75a53fef Fix for regions reported with multiple targets.
We should merge them into single NavigationRegion(s) with multiple targets.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1403373018 .
2015-10-28 16:38:12 -07:00
pq 5accd7a72e Error code validation for error filters.
Screenshots and background can be found on the tracking bug: https://github.com/dart-lang/sdk/issues/24618

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1411053003 .
2015-10-28 16:37:34 -07:00
pq ff08fe58b6 Stop unwanted sharing between filter closures.
BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1414863004 .
2015-10-28 13:02:28 -07:00
pq 2f9c4af993 Error Suppression FTW.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1420363005 .
2015-10-28 09:59:05 -07:00
pq c4ccdb462a LineInfo line-end detection fixes.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1413783005 .
2015-10-27 09:39:30 -07:00
pq 808f32d61d Fix to give LineInfo to options error spans.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1417363007 .
2015-10-26 21:09:48 -07:00
pq 52fb3b3bab Introducing a lint server plugin.
Avoids introducing an unwanted dependency on the options plugin to server (efects discovered: https://codereview.chromium.org/1411313005/). Also soon to be future home for fixes and completions.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1410553005 .
2015-10-26 12:11:38 -07:00
Konstantin Shcheglov cbea0dedf9 Issue 24714. Check other libraries that define unresolved class.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24714

Review URL: https://codereview.chromium.org/1413973007 .
2015-10-26 11:32:59 -07:00
pq b32e2ce0db Analyzer dep bump.
BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1415693004 .
2015-10-26 10:02:57 -07:00
pq 15c9636924 Backed out validator registration.
Net-net: this bakes in an (unsafe in tests) assumption that the options plugin has been contributed and registered.

Backing out pending a revisit.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1411313005 .
2015-10-26 09:46:09 -07:00
pq 68dc36a3e7 OptionsValidator plugin extension and linter service.
* Adds a new extension point to allow for contributing OptionsValidators.
* Adds a new linter 'service' to server that contributes a lint-aware validator.

You'll notice that the warning code I added is NOT in `errors.dart`.  I did that in anticipation of plugin-specifc warnings living elsewhere.  If that's not the right angle, happy to un-do!

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1418333002 .
2015-10-26 08:50:55 -07:00
pq bb431bbec4 Publish optionValidator extentsion API.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1420903003 .
2015-10-25 20:49:49 -07:00
Konstantin Shcheglov 289bd0a056 [Atom] Issue 424. Fix for 'getNavigation' and index expressions.
R=brianwilkerson@google.com
BUG= https://github.com/dart-atom/dartlang/issues/424

Review URL: https://codereview.chromium.org/1402353009 .
2015-10-25 11:29:54 -07:00