Skip to content
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

Code navigation issue in WebStorm #24910

Closed
zoechi opened this issue Nov 13, 2015 · 15 comments
Closed

Code navigation issue in WebStorm #24910

zoechi opened this issue Nov 13, 2015 · 15 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on
Milestone

Comments

@zoechi
Copy link
Contributor

zoechi commented Nov 13, 2015

In this code file (https://github.com/bwu-dart/bwu_bind_html/blob/46720f24af481e1af97c103993f0802226355bf2/test/test_element.dart#L14-L14)

@HtmlImport('test_element.html')
library bwu_bind_html.test.test_element;

import 'dart:html' as dom;
import 'package:web_components/web_components.dart' show HtmlImport;
import 'package:polymer/polymer.dart';
import 'package:bwu_bind_html/bwu_bind_html.dart';

/// Silence analyzer [BwuBindHtml]
@PolymerRegister('test-element')
class TestElement extends PolymerElement {
  TestElement.created() : super.created();

  @property final html5Validator = new dom.NodeValidatorBuilder()..allowHtml5();

  @property final customValidator = new dom.NodeValidatorBuilder()
    ..allowElement('bwu-bind-html', attributes: ['id', 'html', 'use-light-dom']);

  @property final simpleHtml = 'xxx<br>yyy';

  @property final standardElement = '<div id="div"><div>';

  @property final customElement =
      '<bwu-bind-html id="customElementWithValidator" html="xxx<br>yyy" use-light-dom></bwu-bind-html>';
}

In this line

new dom.NodeValidatorBuilder()..allowHtml5();

I can Ctrl+click on allowHtml5 but not on NodeValidatorBuilder

Dart VM version: 1.13.0-edge.8be0d4aca16feed4edded4d03b95723f7daa879f (Thu Nov 12 17:44:20 2015) on "linux_x64"
WS 11.0.1 build #WS-143-382

@zoechi
Copy link
Contributor Author

zoechi commented Nov 13, 2015

Also no navigation to super.created();

@zoechi
Copy link
Contributor Author

zoechi commented Nov 16, 2015

I added the recent logs, it contains some Dart related exceptions.
zoechi_das_log.zip
Uploaded using ZenHub.io

I don't have the newer options mentioned in https://docs.google.com/document/d/1s4PTof1x7RyxXYX1yO31ByvZsQoDMM7edFIW1SKP25U/edit?pli=1# for Dart Plugin version 15.0.1
My WebStorm Dart plugin version is 143.382.36.
Why is my version so different from the version mentioned in this document?

@zoechi
Copy link
Contributor Author

zoechi commented Nov 16, 2015

I updated to

Dart VM version: 1.13.0-edge.73b6080a6b26ad24380477c4a584edd6cb2e2ab5 (Fri Nov 13 14:15:20 2015) on "linux_x64"

in the meantime, but still run into this issue.

@jwren
Copy link
Member

jwren commented Nov 16, 2015

Verified that navigation on those tokens does not work.

Got these exceptions out of 1.13.0_dev_7.12:

9:57:44 AM Throwable: Dart analysis server, SDK version 1.13.0-dev.7.12, server version 1.12.0, error: Task failed: GenerateLintsTask for source /usr/local/google/home/jwren/src/github/bwu_bind_html/lib/bwu_bind_html.dart
Unexpected exception while performing GenerateLintsTask for source /usr/local/google/home/jwren/src/github/bwu_bind_html/lib/bwu_bind_html.dart
#0 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)
#1 AnalysisTask.perform (package:analyzer/task/model.dart:210)
#2 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:271)
#3 AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:246)
#4 AnalysisContextImpl.performAnalysisTask. (package:analyzer/src/context/context.dart:1098)
#5 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:170)
#6 AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1096)
#7 PerformAnalysisO... (show balloon)
9:57:47 AM Throwable: Dart analysis server, SDK version 1.13.0-dev.7.12, server version 1.12.0, error: Task failed: GenerateLintsTask for source /usr/local/google/home/jwren/src/github/bwu_bind_html/test/default_validator_test.dart
Unexpected exception while performing GenerateLintsTask for source /usr/local/google/home/jwren/src/github/bwu_bind_html/test/default_validator_test.dart
#0 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)
#1 AnalysisTask.perform (package:analyzer/task/model.dart:210)
#2 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:271)
#3 AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:246)
#4 AnalysisContextImpl.performAnalysisTask. (package:analyzer/src/context/context.dart:1098)
#5 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:170)
#6 AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1096)
#7 ... (show balloon)
9:58:50 AM Throwable
Dart analysis server, SDK version 1.13.0-dev.7.12, server version 1.12.0, error: Failed to index: /usr/local/google/home/jwren/src/github/bwu_bind_html/test/test_element.dart
The null object does not have a getter 'nameOffset'.
NoSuchMethodError: method not found: 'nameOffset'
Receiver: null
Arguments: []
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2 IndexableElement.offset (package:analysis_server/src/services/index/indexable_element.dart:47)
#3 ElementCodec.encode2 (package:analysis_server/src/services/index/store/codec.dart:111)
#4 LocationData.LocationData.forObject (package:analysis_server/src/services/index/store/split_store.dart:587)
#5 IndexNode.recordRelationship (package:analysis_server/src/services/index/store/split_store.dart:522)
#6 SplitIndexStore.recordRelationship (package:analysis_server/src/services/index/store/split_store.dart:990)
#7 _IndexContr... (show balloon)

@kevmoo kevmoo added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Nov 16, 2015
@mit-mit
Copy link
Member

mit-mit commented Nov 19, 2015

@zoechi is this blocking you from moving to 1.13 to the extent that we have to provide a patch for 1.13?

@zoechi
Copy link
Contributor Author

zoechi commented Nov 19, 2015

No, it's not blocking me. I'm on bleeding edge anyway (now 1.14.0-xxx).

My WebStorm Event Log is full with these exceptions,
and because @jwren was able to reproduce, it's likely that others will run into this as well.
It's up to you to decide how important you rate this issue. It doesn't bother me much, I had to live/work worse issues in the past ;-)

@mit-mit
Copy link
Member

mit-mit commented Nov 19, 2015

Thanks. We will get it fixed in a 1.14 bleeding edge / dev build, and then take it from there depending on the general feedback.

@mit-mit mit-mit added this to the 1.14 milestone Nov 19, 2015
@scheglov scheglov assigned pq and unassigned scheglov Nov 19, 2015
@pq
Copy link
Member

pq commented Nov 19, 2015

@jwren : are you still able to reproduce?

@pq
Copy link
Member

pq commented Nov 20, 2015

@zoechi : these exceptions should be fixed with dart-lang/linter@83453a4 which was pulled into the SDK w/ 4b03a59. Please let me know if you see any other GenerateLintsTask failures.

@scheglov : do you think these linter failures are the cause of the navigation issues? On the surface they seem unrelated...

1447687038849:Log:SEVERE:1447687038837:Task failed:: GenerateLintsTask for source /home/zoechi/dart/playground/polymer1/paper_input_floating_label/web/index.dart:AnalysisException:: Unexpected exception while performing GenerateLintsTask for source /home/zoechi/dart/playground/polymer1/paper_input_floating_label/web/index.dart
Caused by The null object does not have a getter 'root'.

NoSuchMethodError:: method not found:: 'root'
Receiver:: null
Arguments:: []
#0      Object._noSuchMethod (dart::core-patch/object_patch.dart::42)
#1      Object.noSuchMethod (dart::core-patch/object_patch.dart::45)
#2      Visitor.visitLibraryDirective (package::linter/src/rules/package_prefixed_library_names.dart::86)
#3      DelegatingAstVisitor.visitLibraryDirective.<anonymous closure> (package::analyzer/src/generated/visitors.dart::440)
#4      Iterable.forEach (dart::core/iterable.dart::217)
#5      DelegatingAstVisitor.visitLibraryDirective (package::analyzer/src/generated/visitors.dart::440)
#6      LibraryDirective.accept (package::analyzer/src/generated/ast.dart::11622)
#7      NodeList.accept (package::analyzer/src/generated/ast.dart::12777)
#8      CompilationUnit.visitChildren (package::analyzer/src/generated/ast.dart::4974)
#9      DelegatingAstVisitor.visitCompilationUnit (package::analyzer/src/generated/visitors.dart::144)
#10     CompilationUnit.accept (package::analyzer/src/generated/ast.dart::4968)
#11     GenerateLintsTask.internalPerform (package::analyzer/src/task/dart.dart::2667)
#12     AnalysisTask._safelyPerform (package::analyzer/task/model.dart::310)
#13     AnalysisTask.perform (package::analyzer/task/model.dart::210)
#14     AnalysisDriver.performWorkItem (package::analyzer/src/task/driver.dart::271)
#15     AnalysisDriver.performAnalysisTask (package::analyzer/src/task/driver.dart::246)
#16     AnalysisContextImpl.performAnalysisTask.<anonymous closure> (package::analyzer/src/context/context.dart::1105)
#17     _PerformanceTagImpl.makeCurrentWhile (package::analyzer/src/generated/utilities_general.dart::188)
#18     AnalysisContextImpl.performAnalysisTask (package::analyzer/src/context/context.dart::1103)
#19     PerformAnalysisOperation.perform (package::analysis_server/src/operation/operation_analysis.dart::367)
#20     AnalysisServer.performOperation (package::analysis_server/src/analysis_server.dart::798)
#21     Future.Future.delayed.<anonymous closure> (dart::async/future.dart::228)
#22     _rootRun (dart::async/zone.dart::903)
#23     _CustomZone.run (dart::async/zone.dart::802)
#24     _CustomZone.runGuarded (dart::async/zone.dart::708)
#25     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::733)
#26     _rootRun (dart::async/zone.dart::907)
#27     _CustomZone.run (dart::async/zone.dart::802)
#28     _CustomZone.runGuarded (dart::async/zone.dart::708)
#29     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::733)
#30     Timer._createTimer.<anonymous closure> (dart::async-patch/timer_patch.dart::16)
#31     _Timer._runTimers (dart::isolate-patch/timer_impl.dart::385)
#32     _RawReceivePortImpl._handleMessage (dart::isolate-patch/isolate_patch.dart::150)

:#0      AnalysisTask._safelyPerform (package::analyzer/task/model.dart::320)
#1      AnalysisTask.perform (package::analyzer/task/model.dart::210)
#2      AnalysisDriver.performWorkItem (package::analyzer/src/task/driver.dart::271)
#3      AnalysisDriver.performAnalysisTask (package::analyzer/src/task/driver.dart::246)
#4      AnalysisContextImpl.performAnalysisTask.<anonymous closure> (package::analyzer/src/context/context.dart::1105)
#5      _PerformanceTagImpl.makeCurrentWhile (package::analyzer/src/generated/utilities_general.dart::188)
#6      AnalysisContextImpl.performAnalysisTask (package::analyzer/src/context/context.dart::1103)
#7      PerformAnalysisOperation.perform (package::analysis_server/src/operation/operation_analysis.dart::367)
#8      AnalysisServer.performOperation (package::analysis_server/src/analysis_server.dart::798)
#9      Future.Future.delayed.<anonymous closure> (dart::async/future.dart::228)
#10     _rootRun (dart::async/zone.dart::903)
#11     _CustomZone.run (dart::async/zone.dart::802)
#12     _CustomZone.runGuarded (dart::async/zone.dart::708)
#13     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::733)
#14     _rootRun (dart::async/zone.dart::907)
#15     _CustomZone.run (dart::async/zone.dart::802)
#16     _CustomZone.runGuarded (dart::async/zone.dart::708)
#17     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::733)
#18     Timer._createTimer.<anonymous closure> (dart::async-patch/timer_patch.dart::16)
#19     _Timer._runTimers (dart::isolate-patch/timer_impl.dart::385)
#20     _RawReceivePortImpl._handleMessage (dart::isolate-patch/isolate_patch.dart::150)

@pq pq assigned scheglov and unassigned pq Nov 20, 2015
@scheglov scheglov added the closed-obsolete Closed as the reported issue is no longer relevant label Nov 20, 2015
@scheglov
Copy link
Contributor

OK, I guess this is fixed now.

@zoechi
Copy link
Contributor Author

zoechi commented Nov 21, 2015

I'm still getting lots of these execptions

Dart analysis server, SDK version 1.14.0-edge.0f477023a4b0af017d20db8ad67ba602920829ed, server version 1.12.0, error: Task failed: GenerateLintsTask for source /home/zoechi/dart/bwu_datagrid/lib/components/bwu_column_picker/bwu_column_picker.dart
Unexpected exception while performing GenerateLintsTask for source /home/zoechi/dart/bwu_datagrid/lib/components/bwu_column_picker/bwu_column_picker.dart
#0 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)
#1 AnalysisTask.perform (package:analyzer/task/model.dart:210)
#2 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:272)
#3 AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:247)
#4 AnalysisContextImpl.performAnalysisTask. (package:analyzer/src/context/context.dart:1116)
#5 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:188)
#6 AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1114)
#7 PerformAnalysisOperation.perform (package:analysis_server/src/operation/operation_analysis.dart:367)
#8 AnalysisServer.performOperation (package:analysis_server/src/analysis_server.dart:797)
#9 Future.Future. (dart:async/future.dart:118)
#10 _rootRun (dart:async/zone.dart:903)
#11 _CustomZone.run (dart:async/zone.dart:802)
#12 _CustomZone.runGuarded (dart:async/zone.dart:708)
#13 _CustomZone.bindCallback. (dart:async/zone.dart:733)
#14 _rootRun (dart:async/zone.dart:907)
#15 _CustomZone.run (dart:async/zone.dart:802)
#16 _CustomZone.runGuarded (dart:async/zone.dart:708)
#17 _CustomZone.bindCallback. (dart:async/zone.dart:733)
#18 Timer._createTimer. (dart:async-patch/timer_patch.dart:16)
#19 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:385)
#20 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

Caused by The null object does not have a getter 'offset'.

NoSuchMethodError: method not found: 'offset'
Receiver: null
Arguments: []
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2 ErrorReporter.reportErrorForToken (package:analyzer/src/generated/error.dart:3236)
#3 LintRule.reportLintForToken (package:linter/src/linter.dart:269)
#4 Visitor.visitVariableDeclarationList (package:linter/src/rules/always_specify_types.dart:83)
#5 DelegatingAstVisitor.visitVariableDeclarationList. (package:analyzer/src/generated/visitors.dart:740)
#6 Iterable.forEach (dart:core/iterable.dart:217)
#7 DelegatingAstVisitor.visitVariableDeclarationList (package:analyzer/src/generated/visitors.dart:740)
#8 VariableDeclarationList.accept (package:analyzer/src/generated/ast.dart:20348)
#9 AstNode._safelyVisitChild (package:analyzer/src/generated/ast.dart:3095)
#10 FieldDeclaration.visitChildren (package:analyzer/src/generated/ast.dart:7351)
#11 DelegatingAstVisitor.visitFieldDeclaration (package:analyzer/src/generated/visitors.dart:275)
#12 FieldDeclaration.accept (package:analyzer/src/generated/ast.dart:7346)
#13 NodeList.accept (package:analyzer/src/generated/ast.dart:12777)
#14 ClassDeclaration.visitChildren (package:analyzer/src/generated/ast.dart:4419)
#15 DelegatingAstVisitor.visitClassDeclaration (package:analyzer/src/generated/visitors.dart:116)
#16 ClassDeclaration.accept (package:analyzer/src/generated/ast.dart:4349)
#17 NodeList.accept (package:analyzer/src/generated/ast.dart:12777)
#18 CompilationUnit.visitChildren (package:analyzer/src/generated/ast.dart:4975)
#19 DelegatingAstVisitor.visitCompilationUnit (package:analyzer/src/generated/visitors.dart:144)
#20 CompilationUnit.accept (package:analyzer/src/generated/ast.dart:4968)
#21 GenerateLintsTask.internalPerform (package:analyzer/src/task/dart.dart:2667)
#22 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:310)
#23 AnalysisTask.perform (package:analyzer/task/model.dart:210)
#24 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:272)
#25 AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:247)
#26 AnalysisContextImpl.performAnalysisTask. (package:analyzer/src/context/context.dart:1116)
#27 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:188)
#28 AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1114)
#29 PerformAnalysisOperation.perform (package:analysis_server/src/operation/operation_analysis.dart:367)
#30 AnalysisServer.performOperation (package:analysis_server/src/analysis_server.dart:797)
#31 Future.Future. (dart:async/future.dart:118)
#32 _rootRun (dart:async/zone.dart:903)
#33 _CustomZone.run (dart:async/zone.dart:802)
#34 _CustomZone.runGuarded (dart:async/zone.dart:708)
#35 _CustomZone.bindCallback. (dart:async/zone.dart:733)
#36 _rootRun (dart:async/zone.dart:907)
#37 _CustomZone.run (dart:async/zone.dart:802)
#38 _CustomZone.runGuarded (dart:async/zone.dart:708)
#39 _CustomZone.bindCallback. (dart:async/zone.dart:733)
#40 Timer._createTimer. (dart:async-patch/timer_patch.dart:16)
#41 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:385)
#42 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

#0 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)
#1 AnalysisTask.perform (package:analyzer/task/model.dart:210)
#2 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:272)
#3 AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:247)
#4 AnalysisContextImpl.performAnalysisTask. (package:analyzer/src/context/context.dart:1116)
#5 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:188)
#6 AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1114)
#7 PerformAnalysisOperation.perform (package:analysis_server/src/operation/operation_analysis.dart:367)
#8 AnalysisServer.performOperation (package:analysis_server/src/analysis_server.dart:797)
#9 Future.Future. (dart:async/future.dart:118)
#10 _rootRun (dart:async/zone.dart:903)
#11 _CustomZone.run (dart:async/zone.dart:802)
#12 _CustomZone.runGuarded (dart:async/zone.dart:708)
#13 _CustomZone.bindCallback. (dart:async/zone.dart:733)
#14 _rootRun (dart:async/zone.dart:907)
#15 _CustomZone.run (dart:async/zone.dart:802)
#16 _CustomZone.runGuarded (dart:async/zone.dart:708)
#17 _CustomZone.bindCallback. (dart:async/zone.dart:733)
#18 Timer._createTimer. (dart:async-patch/timer_patch.dart:16)
#19 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:385)
#20 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115)
at com.jetbrains.lang.dart.analyzer.DartAnalysisServerService$1.serverError(DartAnalysisServerService.java:196)
at com.google.dart.server.internal.BroadcastAnalysisServerListener.serverError(BroadcastAnalysisServerListener.java:180)
at com.google.dart.server.internal.remote.processor.NotificationServerErrorProcessor.process(NotificationServerErrorProcessor.java:37)
at com.google.dart.server.internal.remote.RemoteAnalysisServerImpl.processNotification(RemoteAnalysisServerImpl.java:660)
at com.google.dart.server.internal.remote.RemoteAnalysisServerImpl.processResponse(RemoteAnalysisServerImpl.java:673)
at com.google.dart.server.internal.remote.RemoteAnalysisServerImpl.access$100(RemoteAnalysisServerImpl.java:109)
at com.google.dart.server.internal.remote.RemoteAnalysisServerImpl$ServerResponseReaderThread.run(RemoteAnalysisServerImpl.java:152)

_

Dart VM version: 1.14.0-edge.4992bc72a0565cff507fb8aa94ce3fd330467cf9 (Fri Nov 20 12:56:39 2015) on "linux_x64"

@pq
Copy link
Member

pq commented Nov 22, 2015

@zoechi : it looks like you've discovered another issue. Thanks!

@pq pq reopened this Nov 22, 2015
@pq
Copy link
Member

pq commented Nov 22, 2015

pq added a commit to dart-lang/linter that referenced this issue Nov 22, 2015
Background here: dart-lang/sdk#24910

The rub is we need to be careful in case nodes or tokens are null (for example when analyzing invalid source).

BUG=24910
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1464173002 .
@zoechi
Copy link
Contributor Author

zoechi commented Nov 25, 2015

I don't get any exceptions from dart analyzer anymore after updating to the latest bleeding edge Dart version. The code navigation issue remains though.

@scheglov
Copy link
Contributor

The latest build of the IDEA plugin include support for this.named() and super.created(); navigation.

pq added a commit that referenced this issue Nov 25, 2015
* Protects against errors in linting invalid source (#24910).
* Adds `avoid_empty_else` lint rule (dart-lang/sdk#224936).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1472403002 .
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on and removed Priority-Medium labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

7 participants